This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The last paragraph in the Examples section of https://www.w3.org/TR/xpath-functions-31/#func-parse-xml-fragment 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/>')
Thanks for pointing out these errors. Now fixed.