I have a possible bug with namespace-alias and exclude-result-prefixes. The
xslt below demonstrates the problem:
<xsl:namespace-alias stylesheet-prefix="ixsl" result-prefix="xsl"/>
The output that I expect is as follows:
Instead, it is
I have run into this behavior with saxon 9-3-0-4j and an unknown version of
Hmm. For some reason the forum has put semicolons behind lines containing http
URIs. Please remove these if you try the xslt.
the spec states (in "11.1.4 Namespace Aliasing"):
"A namespace node whose string value is a target namespace
URI is copied to the result tree, whether or not the URI identifies
an excluded namespace."
Doesn't that mean that the result you get is correct?
Markus is correct. The reason for this rule is that it's designed for the
primary use case for xsl:namespace-alias, which is generating XSLT
Hi Markus, Michael,
Thanks for clearing that up. I completely missed that part of the spec. Sorry
for posting a non-bug.
(It's unfortunate, though, that it is not possible to scope xsl:namespace-
alias to xsl:result-document somehow. In my own use case, I am using a single
xslt to generate a large number of related xml files, some of which are xslts
and some of which are not (but which still end up with xsl namespace
declarations due to xsl:namespace-alias). Maybe something for xslt 3.0. ;-))
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.