[Bug 6024] New: [XSLT 2++] Enhancement: modes and schema-awareness

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6024

           Summary: [XSLT 2++] Enhancement: modes and schema-awareness
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.1
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


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.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 3 September 2008 09:27:51 UTC