[Bug 9812] New: [XSLT] Excluded namespace nodes and namespace aliases

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9812

           Summary: [XSLT] Excluded namespace nodes and namespace aliases
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/xslt20/#dt-target-namespace-uri
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The XSLT 2.0 specification states:

"[Definition: The namespace URI that is to be used in the result tree as a
substitute for a literal namespace URI is called the target namespace URI.]"

and later

"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."

Suppose we have two stylesheets:

main.xsl

<xsl:stylesheet
  version="2.0" 
  xmlns="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:x="http://www.example.org/alias"
  xmlns:y="http://www.example.org/My/Transform/Language">

  <xsl:import href="import.xsl" />

  <xsl:namespace-alias stylesheet-prefix="x" result-prefix="y"/>

  <xsl:template match="/">
    <x:transform />
  </xsl:template>

</xsl:stylesheet>


import.xsl

<xsl:stylesheet
  version="2.0" 
  xmlns="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:x="http://www.example.org/alias"
  xmlns:y="http://www.example.org/My/Transform/Language">

  <xsl:namespace-alias stylesheet-prefix="x" result-prefix="#default"/>

</xsl:stylesheet>

Is "http://www.w3.org/1999/XSL/Transform" (ordinarily an excluded namespace)
considered as a target namespace URI, even though the xsl:namespace-alias is
overridden by a higher priority xsl:namespace-alias for the same literal
namespace URI?

i.e. is the correct result:

<y:transform 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns="http://www.w3.org/1999/XSL/Transform" 
  xmlns:y="http://www.example.org/My/Transform/Language"/>

or

<y:transform xmlns:y="http://www.example.org/My/Transform/Language"/>

?

I would presume that the latter is correct, because
"http://www.w3.org/1999/XSL/Transform" is not going to be used in the result
tree as a substitute for a literal namespace URI due to the higher precedence
xsl:namespace-alias declaration.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 27 May 2010 14:03:04 UTC