Namespace-alias, exclude-result-prefixes bug?

  • Jan-Willem van den Broek

    Hmm. For some reason the forum has put semicolons behind lines containing http
    URIs. Please remove these if you try the xslt.

  • Markus Abt

    Markus Abt - 2011-02-07

    Hi Jan-Willem,

    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?


  • Michael Kay

    Michael Kay - 2011-02-07

    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

  • Jan-Willem van den Broek

    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. ;-))



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks