xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] TagSoup, malformed comments and XOM
- From: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
- To: John Cowan <cowan AT ccil.org>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] TagSoup, malformed comments and XOM
- Date: Thu, 6 Jul 2006 20:25:46 -0700
On Jun 30, 2006, at 3:10 PM, John Cowan wrote:
Wolfgang Hoschek scripsit:
It would be nice if tagsoup could internally try to fix up the
comments, if possible.
While we're at it, it would also be nice for tagsoup not to report
malformed public IDs, as in the following case:
TagSoup 1.0.1 fixes both problems, as well as adding XMLWriter logic
to actually print DOCTYPE declarations if the --lexical switch
is present.
This update doesn't affect people who aren't using a LexicalHandler
the --lexical switch.
Thanks, but it looks like 1.0.1 doesn't solve the problem completely:
[hoschek /Users/hoschek/unix/devel/nux/samples/data] head ../../doc/ index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http:// www.w3.org/TR/html4/loose.dtd">
<!--Do not edit this autogenerated HTML file; edit src/xdocs files instead. --><html><head>
[hoschek /Users/hoschek/unix/devel/nux/samples/data] fire-xquery -- validate=html --query='{//*:img/string(@src)}' ../../doc/index.html -- debug
Oopsla: nu.xom.ParsingException: Multiple consecutive spaces in public IDs are not round trippable.
at nu.xom.Builder.build(Builder.java:1179)
at nu.xom.Builder.build(Builder.java:627)
at nux.xom.pool.DocumentFactory.createDocument (DocumentFactory.java:119)
at nux.xom.tests.XQueryCommand$4.createDocument (XQueryCommand.java:695)
at nux.xom.pool.DocumentFactory.createDocument (DocumentFactory.java:88)
at nux.xom.pool.DocumentPool.getDocument(DocumentPool.java:161)
at nux.xom.tests.XQueryCommand.run(XQueryCommand.java:565)
at nux.xom.tests.CmdLineProgram.doMain(CmdLineProgram.java:62)
at nux.xom.tests.XQueryCommand.main(XQueryCommand.java:132)
Caused by: nu.xom.IllegalDataException: Multiple consecutive spaces in public IDs are not round trippable.
at nu.xom.DocType._setPublicID(DocType.java:314)
at nu.xom.DocType.<init>(DocType.java:92)
at nu.xom.NodeFactory.makeDocType(NodeFactory.java:318)
at nu.xom.XOMHandler.startDTD(XOMHandler.java:523)
at org.ccil.cowan.tagsoup.Parser.decl(Parser.java:681)
at org.ccil.cowan.tagsoup.HTMLScanner.scan(HTMLScanner.java: 492)
at org.ccil.cowan.tagsoup.Parser.parse(Parser.java:399)
at nu.xom.Builder.build(Builder.java:1160)
... 8 more
[hoschek /Users/hoschek/unix/devel/nux/samples/data]
- Re: [XOM-interest] TagSoup, malformed comments and XOM, Wolfgang Hoschek, 07/06/2006
Archive powered by MHonArc 2.6.24.