<?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>30002</bug_id>
          
          <creation_ts>2016-11-13 11:25:54 +0000</creation_ts>
          <short_desc>[XSLT30]XSD schema for xsl:function element does not declare the &quot;cache&quot; attribute</short_desc>
          <delta_ts>2016-11-16 17:06:25 +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>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Martin Honnen">martin.honnen</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>128163</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Honnen">martin.honnen</who>
    <bug_when>2016-11-13 11:25:54 +0000</bug_when>
    <thetext>Looking at https://www.w3.org/2012/07/schema-for-xslt30.xsd#elem_function I don&apos;t see any declaration of the boolean &quot;cache&quot; attribute introduced in https://www.w3.org/TR/xslt-30/#memoization respectively listed in https://www.w3.org/TR/xslt-30/#dt-stylesheet-function.

The schema inlined in the current spec https://www.w3.org/XML/Group/qtspecs/specifications/xslt-30/html/#xsd11-schema-for-xslt has it with 

  &lt;xs:element name=&quot;function&quot; substitutionGroup=&quot;xsl:declaration&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent mixed=&quot;true&quot;&gt;
        &lt;xs:extension base=&quot;xsl:versioned-element-type&quot;&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref=&quot;xsl:param&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
            &lt;xs:group ref=&quot;xsl:sequence-constructor-group&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name=&quot;name&quot; type=&quot;xsl:EQName-in-namespace&quot;/&gt;
          &lt;xs:attribute name=&quot;override&quot; type=&quot;xsl:yes-or-no&quot; default=&quot;yes&quot;/&gt;
          &lt;xs:attribute name=&quot;as&quot; type=&quot;xsl:sequence-type&quot; default=&quot;item()*&quot;/&gt;
          &lt;xs:attribute name=&quot;visibility&quot; type=&quot;xsl:visibility-type&quot;/&gt;
          &lt;xs:attribute name=&quot;streamability&quot; type=&quot;xsl:streamability-type&quot;/&gt;
          &lt;xs:attribute name=&quot;override-extension-function&quot; type=&quot;xsl:yes-or-no&quot;/&gt;
          &lt;xs:attribute name=&quot;new-each-time&quot; type=&quot;xsl:yes-or-no-or-maybe&quot;/&gt;
          &lt;xs:attribute name=&quot;cache&quot; type=&quot;xsl:yes-or-no&quot;/&gt;
          &lt;xs:attribute name=&quot;_name&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_override&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_as&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_visibility&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_streamability&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_override-extension-function&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_identity-sensitive&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:attribute name=&quot;_cache&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:assert test=&quot;exists(@name | @_name)&quot;/&gt;
          &lt;xs:assert test=&quot;every $e in xsl:param satisfies (empty($e/(@select | @_select)) and empty($e/child::node()))&quot;&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
                &lt;p&gt;A parameter for a function must have no default value.&lt;/p&gt;
              &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:assert&gt;
          &lt;xs:assert test=&quot;every $e in xsl:param satisfies empty($e/(@visibility | @_visibility))&quot;&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
                &lt;p&gt;A parameter for a function must have no &lt;code&gt;visibility&lt;/code&gt; attribute.&lt;/p&gt;
              &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:assert&gt;
          &lt;xs:assert test=&quot;every $e in xsl:param satisfies empty($e/(@required | @_required))&quot;&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
                &lt;p&gt;A parameter for a function must have no &lt;code&gt;required&lt;/code&gt; attribute.&lt;/p&gt;
              &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:assert&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;

but the separate online schema only has

  &lt;xs:element name=&quot;function&quot; substitutionGroup=&quot;xsl:declaration&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent mixed=&quot;true&quot;&gt;
        &lt;xs:extension base=&quot;xsl:versioned-element-type&quot;&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref=&quot;xsl:param&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
            &lt;xs:group ref=&quot;xsl:sequence-constructor-group&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name=&quot;name&quot; type=&quot;xsl:EQName&quot; use=&quot;required&quot;/&gt;
          &lt;xs:attribute name=&quot;override&quot; type=&quot;xsl:yes-or-no&quot; default=&quot;yes&quot;/&gt;
          &lt;xs:attribute name=&quot;as&quot; type=&quot;xsl:sequence-type&quot; default=&quot;item()*&quot;/&gt;
          &lt;xs:attribute name=&quot;visibility&quot; type=&quot;xsl:visibility-type&quot;/&gt;
          &lt;xs:assert test=&quot;every $e in xsl:param satisfies (empty($e/@select) and empty($e/child::node()))&quot;&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
                &lt;p&gt;A parameter for a function must have no default value.&lt;/p&gt;
              &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:assert&gt;
          &lt;xs:assert test=&quot;every $e in xsl:param satisfies empty($e/@visibility)&quot;&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
                &lt;p&gt;A parameter for a function must have no &lt;code&gt;visibility&lt;/code&gt; attribute.&lt;/p&gt;
              &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:assert&gt;
          &lt;xs:assert test=&quot;every $e in xsl:param satisfies empty($e/@required)&quot;&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
                &lt;p&gt;A parameter for a function must have no &lt;code&gt;required&lt;/code&gt; attribute.&lt;/p&gt;
              &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:assert&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;

so the &quot;cache&quot; attribute and all the shadow attributes are missing in the separate schema. I think the schemas ought to be identical.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128187</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-16 17:06:25 +0000</bug_when>
    <thetext>The schema held in W3C yyyy/mm space is updated only when we do a formal publication of a new spec draft. So this will be fixed in the fullness of time.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>