This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
What happens when the user specifies the validation or type attributes on the xsl:copy or xsl:copy-of instructions, and the value returned by this instruction is a node other than an element or attribute node, or indeed an atomic value? The specification does not appear to answer this question. I would propose: (a) validation = (preserve | strip | lax) is a no-op: the validation attribute is ignored, and the supplied item is copied as-is. (b) validation = strict causes a type error (c) type = type-name causes a type error
I almost submitted this same bug report a few months ago, until I noticed that sections 11.9.1[1] and 11.9.2[2] state that the 'validation' and 'type' attributes are ignored when copying anything other than a document, element or attribute node. In the paragraph following the second note in section 11.9.1, we have "The optional attributes type and validation may be used on the xsl:copy instruction.... These attributes are ignored when copying an item that is not an element, attribute or document node." In the paragraph following the bulleted list in section 11.9.2, we have "The optional attributes type and validation may be used on the xsl:copy-of instruction.... These attributes are applied individually to each element, attribute, and document node that is selected by the expression in the select attribute. These attributes are ignored when copying an item that is not an element, attribute or document node." [1] http://www.w3.org/TR/xslt20/#shallow-copy [2] http://www.w3.org/TR/xslt20/#copy-of
Thanks, Henry!