Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check namespace on fn:transform map #18

Open
mricaud opened this issue Oct 12, 2020 · 0 comments
Open

Check namespace on fn:transform map #18

mricaud opened this issue Oct 12, 2020 · 0 comments

Comments

@mricaud
Copy link
Owner

mricaud commented Oct 12, 2020

From @Arithmeticus on slack xml.com:

Lesson learned. If building a map for fn:transform() , as a habit put an xmlns="[target XSLT default XPath namespace]" in the appropriate xsl:map-entry, e.g.,
<xsl:map-entry key="'static-params'" xmlns="">
xsl:map
<xsl:map-entry key="xs:QName('diagnostics-on')" select="true()"/>
</xsl:map>
</xsl:map-entry>
(Heck, put it at the topmost xsl:map.) If you don't and if you're working in an XSLT file whose default namespace is bound to something else (e.g., HTML), that default NS will get attached to any unprefixed result of xs:QName() . Good chance your parameter bindings will be ignored. One more test worth adding to one's Schematron XSLT checker. (Note, the target default XPath namespace, /*/@xpath-default-namespace should not be confused with the target default namespace xmlns="...".)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant