[Bug 3417] [XSLT] Base URI of a copied element


           Summary: [XSLT] Base URI of a copied element
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org

For xsl:copy and xsl:copy-of, the rules say that the base URI property of the
element is copied unchanged. 

If the element has an xml:base attribute, I don't feel this rule is right.

Firstly, for xsl:copy, the new element may have an xml:base attribute that
wasn't present on the original element, and it seems wrong to ignore this.

Secondly, for both instructions, the element may have a relative xml:base
attribute, and it makes sense to "re-resolve" this in the same way as we would
do with a newly constructed element. Otherwise it could lead to the element
having a base URI that is different from the one that would be obtained by

Related to this, I think we should clarify that when we make use of the value
of xml:base in determining the base URI of a node, we process the attribute as
described in the XML Base specification, in particular, we percent-encode
special characters.

Specific changes:

(a) for xsl:copy and xsl:copy-of, instead of "The base URI of the node is
copied", we should say: "The base URI of the node is copied, except in the case
of an element node having an xml:base attribute, in which case the base URI is
taken as the value of the xml:base attribute, resolved if it is relative
against the base URI of the xsl:copy|xsl:copy-of instruction."

(b) At the end of 5.8, add the rule. "In the case of xml:base this means that
the value of the attribute, before being used in any calculation of a base URI,
is percent-encoded as described in [XML Base]."

Received on Friday, 30 June 2006 11:34:54 UTC