Hi Martin,
The stylesheet which I've provided, specifies
<xsl:stylesheet xmlns:s="http://s.com/"
exclude-result-prefixes="s"
And accordingly, an XML namespace declaration xmlns:s="http://s.com/" is
not appearing on any XML elements produced by the stylesheet that I've
cited.
But an XSL instruction
<xsl:value-of select="s:sort(namespace::*)" separator=","/>
seems to exclude http://s.com/ from the result, using information from XSL
attribute exclude-result-prefixes. I think, this is probably not correct,
because the result produced by <xsl:value-of select="s:sort(namespace::*)"
separator=","/> is not an XML element node.
On Thu, Oct 8, 2026 at 9:05b/PM Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> reading https://www.w3.org/TR/xslt-30/#lre-namespaces I find
>
> The created element node will have a copy of the namespace nodes that were
> present on the element node in the stylesheet tree with the exception of
> any namespace node whose string value is designated as an excluded
> namespace.
>
> and
>
> A namespace URI designated by using an [xsl:]exclude-result-prefixes
> attribute either on the literal result element itself or on an ancestor
> element.
>
> As your code clearly has
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> <http://www.w3.org/1999/XSL/Transform>
> xmlns:s="http://s.com/" <http://s.com/>
> exclude-result-prefixes="s"
>
>
> why do you think the http://s.com/ should be a namespace node of the
> literal result elements, it seems excluded, no?
> 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
|