<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6024</bug_id>
          
          <creation_ts>2008-09-03 09:27:15 +0000</creation_ts>
          <short_desc>[XSLT 2++] Enhancement: modes and schema-awareness</short_desc>
          <delta_ts>2011-06-08 20:38:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21769</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-09-03 09:27:15 +0000</bug_when>
    <thetext>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=&quot;elementname&quot; there is no type information available statically about the type of the context node. Rewriting all the template rules to use match=&quot;schema-element(elementname)&quot; 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.

&lt;xsl:mode name?=&quot;mode-name&quot; typed=&quot;no|yes|strict|lax|unspecified&quot;&gt;

&quot;no&quot; 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).

&quot;yes&quot; means that the document will be schema-validated

&quot;strict&quot; 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).

&quot;lax&quot; 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).

&quot;unspecified&quot; default and means don&apos;t know / don&apos;t care.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36939</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-07-16 09:58:40 +0000</bug_when>
    <thetext>The WG instructed the editor to prepare spec prose to implement this proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46953</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-03-24 14:10:07 +0000</bug_when>
    <thetext>Status: this is implemented in the current working draft (6.6.1).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49338</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-06-08 20:34:02 +0000</bug_when>
    <thetext>Closing this as we now have a design that meets the requirement in the status quo working draft.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>