RE: unique IDs for fn:id() and interaction with XSLT temporary tr ees

> 
> OK, thanks, I did miss that (and now I am wondering how), but 
> 19.2.2 says "Validation is never applied to temporary trees, 
> nor to document nodes created using xsl:message, even if the 
> default-validation attribute of the containing xsl:stylesheet 
> element requests validation."
> 
> Does this intend to say that a temporary tree's element & 
> attribute nodes actually can be validated individually as 
> they are created, but that a temporary tree's document node 
> cannot be validated at any time?

Yes, that's the position. I'm not actually too comfortable with it. It
doesn't make very much sense that we allow validation on final result
documents but not on temporary trees. We got there by a rather circuitous
route, and it was only really when all the rules for validation were put
together in one place that the difference became clear. But some WG members
have argued that it never makes sense to do "document-level" validation on
temporary trees, because things like ID/IDREF constraints will often not be
satisfied until you produce the final result.

I'm actually beginning to think it would be logical to have an instruction
that creates a document node, like XQuery's document node constructor. This
could have "validate" and "type" attributes, and the construct

<xsl:variable><stuff/></xsl:variable>

would then become a shorthand for

<xsl:variable><xsl:document><stuff/></xsl:document></xsl:variable>

Michael Kay (personal response)

Received on Thursday, 11 December 2003 18:07:21 UTC