Hi Martin,
Thanks for the explanation.
This looks convincing to me.
On Thu, Oct 8, 2026 at 9:50b/PM Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> My understanding is that the code
>
> <xsl:variable name="x" as="element()">
> <a a1="a1" xmlns:a="http://a.uri/" <http://a.uri/>>
> <b b1="b1">
> <c/>
> <d/>
> </b>
> </a>
>
> </xsl:variable>
>
> with the exclude-result-prefixes="s" creates an "a" element and its
> descendants (like the "c") element without any namespace node for the s/
> http://s.com/ namespace.
>
> Then the code
>
> <xsl:for-each select="$x//c">
> <ns>
> <xsl:value-of select="s:sort(namespace::*)" separator=","/>
> </ns>
> </xsl:for-each>
>
> selects the namespace nodes of the "c" element, sorts and outputs them.
>
> As, as I tried to explain above, the "c" element is created as a
> descendant of the "a" element while exclude-result-prefixes="s" holds and
> that way neither the "a" nor the "c" element node constructed have a
> namespace node for s/http://s.com/, the selection of the namespace nodes
> of the "c" element with namespace::* doesn't have any node for "s/
> http://s.com/" and that way it is also not output, simply as the only two
> namespace nodes the "c" element carries are the "a"/"http://a.uri/"
> <http://a.uri/> namespace and the XML namespace.
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3430162> (by
> email <>)
>
--
Regards,
Mukul Gandhi
|