<?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>30141</bug_id>
          
          <creation_ts>2017-07-10 15:27:56 +0000</creation_ts>
          <short_desc>[xslt30] Schema for XSLT 3.0 describes xsl:accept/@names and xsl:expose/@names incorrectly</short_desc>
          <delta_ts>2018-01-03 00:11: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>Proposed Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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>
          <cc>martin.honnen</cc>
          
          <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>128689</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 15:27:56 +0000</bug_when>
    <thetext>Resolution of test case bug 30140 reveals that xsl:accept/@names and xsl:expose/@names are described in schema-for-stylesheet-documents to have type xsl:EQNames. This type does not allow wildcard tokens such as &quot;*&quot;, &quot;p&quot;*&quot;, or &quot;*:local&quot;, which the normative prose clearly allows.

As far as I can see the bug is not present in the Relax NG version of the schema, which uses the type &quot;tokens&quot; for these attributes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128690</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 15:33:05 +0000</bug_when>
    <thetext>Changing the type of these attributes from xs:EQNames to xs:nametests is probably sufficient to fix the problem. I am provisionally applying this change in the version of the schema that appears in the test suite test-set named &quot;catalog&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128691</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 15:45:41 +0000</bug_when>
    <thetext>Unfortunately this reveals another error: the definition of type xsl:nametests does not permit the value &quot;Q{uri}*&quot; which is allowed in existing attributes of type xsl:nametests as well as these new uses. Again, I&apos;ve fixed this in the test suite version of the schema.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128692</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 15:49:22 +0000</bug_when>
    <thetext>The schema also fails to permit the attribute xsl:mode/@_use-accumulators.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128694</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 16:06:41 +0000</bug_when>
    <thetext>The schema includes an assertion for xsl:function elements:

&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;

This disagrees with §9.2 which states that the attribute @required is permitted provided it has the value yes|true|1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128695</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 16:11:41 +0000</bug_when>
    <thetext>The definition of xsl:function allows attribute _identity-sensitive in place of _new-each-time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128697</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 16:29:15 +0000</bug_when>
    <thetext>The definition of xsl:nametests also does not allow tokens such as f:foo#2 - which are allowed on xsl:accept/@names and xsl:expose/@names, but not on xsl:strip-space/elements, making this a different data type.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128699</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 21:33:52 +0000</bug_when>
    <thetext>I&apos;ve now made changes to the version of the schema in the test suite such that all correct schemas now validate.

Had to make a few further adjustments to the catalog-005 test:

* Don&apos;t attempt to validate stylesheets with literal result elements in the fn namespace (they won&apos;t be valid if the schema for the fn namespace is known)

* Exclude stylesheets with //@xsl:version &gt; 3.0 (forwards compatibility mode - everything is allowed)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128700</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-07-10 21:35:44 +0000</bug_when>
    <thetext>One other problem was fixed:

The simple type &quot;method&quot; does not allow the values &quot;json&quot; or &quot;adaptive&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128930</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-10-13 20:21:28 +0000</bug_when>
    <thetext>Erratum E10 has been drafted.

We need to work out how best to publish a corrected schema.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128948</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-10-29 23:13:15 +0000</bug_when>
    <thetext>The changes were accepted. We discussed the process issues of how to republish a revised schema. In the short term, the version of the schema published at

https://www.w3.org/TR/xslt-30/schema-for-xslt30.xsd

(which is linked from the spec) will remain unchanged, and the corrected schema will be published in errata space at

http://www.w3.org/XML/2017/qt-errata/schema-for-xslt30.xsd

which will be linked from the errata document.

----

There is another minor issue with the schema that should be fixed. In the simple type &quot;nametest&quot; we allow the options prefix:* and *:local using the patterns

&lt;xs:pattern value=&quot;\i\c*:\*&quot;/&gt;
&lt;xs:pattern value=&quot;\*:\i\c*&quot;/&gt;

However, the character classes \i and \c both allow a colon (they correspond to NamestartChar and NameChar in the XML recommendation), so this definition is excessively liberal. They should be replaced by [\i-[:]] and [\c-[:]] respectively.

I have fixed this, but leaving the bug open for another round of WG review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128965</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-11-09 17:22:29 +0000</bug_when>
    <thetext>Resolution accepted by the WG</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129042</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2018-01-03 00:11:52 +0000</bug_when>
    <thetext>*** Bug 30215 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>