Re: [xml] libxml2 testXPath chokes on W3C strict/loose.dtd



On Mon, Jul 21, 2003 at 05:06:20PM -0400, Larry Siden wrote:
lsiden lsiden libxml2-2.5.8 $ ./testXPath  -i /tmp/b.html
'//*[ id="study-text"]'
http://www.w3.org/TR/html4/loose.dtd:31: error: xmlParseEntityDecl:
entity HTML.Version not terminated
  -- Typical usage:
  ^
[...]
this has come up already, but I can't tell how it was resolved.  In any
case, if libxml2 doesn't parse the strict.dtd or loose.dtd posted by
W3C, then what does it parse?

Respectfully,

  I respectfully suggest that if you want to process SGML DTDs, then
you use an SGML parser ! Libxml2 does not include an SGML parser.
It does include XML parser and a specific parser for HTML SGML.
  However I am using XPath on HTML documents parsed with the HTML parser.
But what you're trying to do (using an XML parser for an HTML resource)
will lead you nowhere, that's sure...

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]