zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #11272
[Bug 1016606] Re: xml:parse unable to parse content containing a DOCTYPE
For the example above, an exception is raised in loader_dtd.cpp
295 if ( ! theXQueryDiagnostics->errors().empty())
296 throw 0; // the argument to throw is not used by the catch clause
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1016606
Title:
xml:parse unable to parse content containing a DOCTYPE
Status in Zorba - The XQuery Processor:
New
Bug description:
The xml:parse function is unable to parse an XML document/fragment if
it starts with a doctype definition.
For example,
import module namespace file = "http://expath.org/ns/file";
import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";
import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
for $i at $y in parse-xml:parse(
file:read-text("tmp.xml"),
<opt:options>
<opt:parse-external-parsed-entity opt:skip-root-nodes="1" />
</opt:options>)
return
$i
with tmp.xml containing
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<a><b/></a>
raises
[err:FODC0006]: invalid content passed to parse-xml:parse(): loader
parsing error: internal error;
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1016606/+subscriptions
References