This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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 computation. 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]."
Note that test case baseuri20_044_01 applies here. The stylesheet does: <xsl:variable name="elemcopy" as="element()"> <xsl:copy-of select="/doc/str1" /> </xsl:variable> where the copied element has xml:base="/xml/". The expected results (which are correct according to the spec as currently written) expects the str1 element to have a base URI of http://www.xmlexample.ibm/xml/ - that is, the result of resolving xml:base against the base URI of its original parent node. (Also note comment 2 in bug #3415 concerning percent-encoding of base URIs.)
As per comment 2 in bug #3415 concerning percent-encoding of base URIs., item (b) of the proposal is withdrawn.
The following change was agreed on 2006-08-03, and has now been applied to the base document: RESOLVED: accept as specified in item (a) of the description. (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."