On 08/10/2026 17:07, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx wrote:
> W3C XSLT 3.0 test suite, specifies the following expected result for
> this XSL stylesheet,
>
> <zzz><ns>http://a.uri/,http://www.w3.org/XML/1998/namespace</ns></zzz>
>
> Whereas I think, the correct output for this XSL stylesheet should be
> following,
>
>
<zzz><ns>http://a.uri/,http://s.com/,http://www.w3.org/XML/1998/namespace</ns
></zzz>
>
> XSLT 3.0 spec, specifies that
> [xsl:]exclude-result-prefixes is applicable to 'Literal Result
> Elements', and refers the reader to following section of XSLT 3.0 spec,
> see 11.1.3 Namespace Nodes for Literal Result Elements
>
>
> Any thoughts please?
Hi Mukul,
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"
B B B B B B B B B B B B B xmlns:s="http://s.com/"
B B B B B B B B B B B B B 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?
|