[Bug 29866] New: [XSLT30] EQName type in XSD for XSLT 3.0 is too lenient

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29866

            Bug ID: 29866
           Summary: [XSLT30] EQName type in XSD for XSLT 3.0 is too
                    lenient
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

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:

    <xs:union memberTypes="xs:NCName xs:QName">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:pattern value="Q\{.*\}\i\c*"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>

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

A possible solution is to disallow the ":", but using a subtraction class:

<xs:union memberTypes="xs:NCName xs:QName">
  <xs:simpleType>
    <xs:restriction base="xs:token">
      <xs:pattern value="Q\{.*\}[\i-[:]][\c-[:]]*"/>
    </xs:restriction>
  </xs:simpleType>
</xs:union>

I've tested this definition and it seems correct.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 23 September 2016 13:19:48 UTC