Actions
Bug #5540
closedNamespace context should be reset at the beginning of an XSLT stylesheet
Start date:
2022-05-26
Due date:
% Done:
100%
Estimated time:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-
Description
Martin Honnen reports that the following transformation works successfully in SaxonJS:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes">
<xsl:template match="/" name="xsl:initial-template">
<xsl:comment>Run with {system-property('xsl:product-name')} {system-property('xsl:product-version')} {system-property('Q{http://saxon.sf.net/}platform')}</xsl:comment>
<test>{fn:current-dateTime()}</test>
</xsl:template>
</xsl:stylesheet>
If you run fn:transform()
through SaxonJS.XPath.evaluate
. Note also that the documentation for XPath.evaluate
says "For convenience the usual namespaces for prefixes xml, fn, xs, map, array, math, and saxon are defined by default, but can be overwritten."
It appears that the namespace context of XPath.evaluate
"leaks" into the transformation allowing the undeclared use of "fn:".
Please register to edit this issue
Actions
Also available in: Atom PDF Tracking page