This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The ability to take advantage of schema-awareness in XSLT 2.0 is currently limited by the fact that most of the code consists of template rules, and in a typical template rule written with match="elementname" there is no type information available statically about the type of the context node. Rewriting all the template rules to use match="schema-element(elementname)" is laborious, and only works for elements declared globally; it also makes it very difficult to maintain parallel schema-aware and non-schema-aware versions of the stylesheet. We can reduce this problem by making schema-awareness a property of a mode. <xsl:mode name?="mode-name" typed="no|yes|strict|lax|unspecified"> "no" means that the document will be untyped; template rules in this mode will only match nodes if they are untyped. (The system can therefore assume, for example, that atomizing an attribute node will yield a single untypedAtomic value). "yes" means that the document will be schema-validated "strict" means that the document will be schema-validated, and any element name used at the start of every match pattern in this mode must be the name of a global element declaration, and is interpreted as schema-element(E). "lax" means that the document will be schema-validated, and when an element name used at the start of a match pattern corresponds to the name of a global element declaration, then it is interpreted as schema-element(E). "unspecified" default and means don't know / don't care.
The WG instructed the editor to prepare spec prose to implement this proposal.
Status: this is implemented in the current working draft (6.6.1).
Closing this as we now have a design that meets the requirement in the status quo working draft.