This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30053 - [FO31]Example for parse-xml-fragment has several syntax errors
Summary: [FO31]Example for parse-xml-fragment has several syntax errors
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Proposed Recommendation
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2017-01-23 14:14 UTC by Martin Honnen
Modified: 2017-02-01 08:37 UTC (History)
0 users

See Also:


Description Martin Honnen 2017-01-23 14:14:39 UTC
The last paragraph in the Examples section of says:

The expression fn:parse-xml-fragment('<xml version="1.0" encoding="utf8" standalone="yes"?></a>") results in a dynamic error [err:FODC0006] because the "standalone" keyword is not permitted in the text declaration that appears at the start of an external general parsed entity.

The snippet has several syntax errors, the text declaration is missing the question mark in <?xml, the opening single quote ' does not have a matching closing single quote but instead the strings ends with a double quote ", and the markup </a> is also not well-formed. So I think to simply generate the error the example is supposed to demonstrate it needs to be

fn:parse-xml-fragment('<?xml version="1.0" encoding="utf8" standalone="yes"?><a/>')
Comment 1 Michael Kay 2017-02-01 08:37:25 UTC
Thanks for pointing out these errors. Now fixed.