<?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>29866</bug_id>
          
          <creation_ts>2016-09-23 13:19:37 +0000</creation_ts>
          <short_desc>[XSLT30] EQName type in XSD for XSLT 3.0 is too lenient</short_desc>
          <delta_ts>2016-09-28 20:33:55 +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>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="Abel Braaksma">abel.braaksma</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>127515</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-23 13:19:37 +0000</bug_when>
    <thetext>After a long discussion today with Charles Foster we concluded that the base type for all EQNames, aptly named xsl:EQName, allows for illegal names.

The current definition is:

    &lt;xs:union memberTypes=&quot;xs:NCName xs:QName&quot;&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base=&quot;xs:token&quot;&gt;
          &lt;xs:pattern value=&quot;Q\{.*\}\i\c*&quot;/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;

this allows for &quot;Q{x}a:b:c&quot;, which is illegal. Or even &quot;Q{x}:::y:::&quot;.

A possible solution is to disallow the &quot;:&quot;, but using a subtraction class:

&lt;xs:union memberTypes=&quot;xs:NCName xs:QName&quot;&gt;
  &lt;xs:simpleType&gt;
    &lt;xs:restriction base=&quot;xs:token&quot;&gt;
      &lt;xs:pattern value=&quot;Q\{.*\}[\i-[:]][\c-[:]]*&quot;/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
&lt;/xs:union&gt;

I&apos;ve tested this definition and it seems correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127516</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-23 13:22:45 +0000</bug_when>
    <thetext>As an aside, an EQName of the form &quot;Q{x{}&quot; is illegal too (according to XPath), but valid according to this type. This can be enforced by changing this further to:

&lt;xs:pattern value=&quot;Q\{[^{}]*\}[\i-[:]][\c-[:]]*&quot;/&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127585</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-28 20:33:55 +0000</bug_when>
    <thetext>Thank you, this correction has been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>