Bug #4858
closedNamespace not serialized (wrapped DOM Node)
0%
Description
Reported today by email:
we just switched from saxon 9.9.1-7 to 10.3. We found an unexpected difference in a serialization of an element in the HTML default namespace ("http://www.w3.org/1999/xhtml"):
Consider the following fragment
1 <xsl:variable name="body" select="imf:parse-wiki(.,$value-format)" as="element(xhtml:body)"/>
2 <xsl:message select="namespace-uri($body)"/>
3 <xsl:sequence select="$body"/>
The function imf:parse-wiki() in (1) is a wrapper around an extension function, that produces a body element in the default xhtml namespace (i.e. no prefix). This is confirmed by the as-clause (no warnings/errors) as well as the statement (2) that shows http://www.w3.org/1999/xhtml in the console. However, the xsl:sequence statement in (3) produces the element without a default namespace ("
"), like:<body xmlns:html="http://www.w3.org/1999/xhtml">
<p>Dit type is in IMKAD gemodelleerd,......</p>
</body>
The extension function uses the DocumentWrapper() class, as per the following code:
a Node node = ((DOMSource)source).getNode();
b String baseURI = source.getSystemId();
c return = new DocumentWrapper(node.getOwnerDocument(), baseURI, configuration);
Hope this info is sufficient to pinpoint a possible flaw in 10.3 code. This issue did not exist in Saxon 9.9.1-7.
Thanks in advance!
Please register to edit this issue