<?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>5906</bug_id>
          
          <creation_ts>2008-07-29 14:58:24 +0000</creation_ts>
          <short_desc>Problem in definition of &lt;restriction&gt; in &lt;complexType&gt;::&lt;simpleContent&gt;</short_desc>
          <delta_ts>2009-04-21 19:21:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>1.1 only</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sandy Gao">sandygao</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>David_E3</cc>
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21372</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2008-07-29 14:58:24 +0000</bug_when>
    <thetext>The content of the &lt;restriction&gt; element in &lt;complexType&gt;::&lt;simpleContent&gt; is defined as follows:
Content: (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | maxScale | minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern | assert | {any with namespace: ##other})*)?, ((attribute | attributeGroup)*, anyAttribute?), assert*)

There are 2 assert elements (one belongs in the facets and the other belongs to the complex type). However, the way the grammar is defined, there is no way to differentiate between the 2 asserts.

I would propose we either remove the assert in the facets or change its name to something like assertFacet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21379</commentid>
    <comment_count>1</comment_count>
    <who name="Mukul Gandhi">gandhi.mukul</who>
    <bug_when>2008-07-29 17:36:44 +0000</bug_when>
    <thetext>I agree with Sandy.

Apart from his comments, I have following observation ...

In the grammar fragment, which Sandy posted, there is following fragment:

(minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | maxScale |
minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern
| assert | {any with namespace: ##other})*

This is of form, (a | b | c ... | x)* , where a, b, etc. are facets. This grammar format gives me a feeling, that *only 1 facet* (because of the pipe sign) can be present in &lt;xs:restriction element. And the facet which is present, can appear 0-n times.

But in reality, I think we can have multiple facet definitions on a single xs:restriction definition, like following:

&lt;restriction base=&quot;..&quot;
 &lt;facet1 value=&quot;&quot; /&gt;
 &lt;facet2 value=&quot;&quot; /&gt;
 ... more facets
&lt;/restriction&gt;

Is the grammar format, (a | b | c ... | x)* correct regarding facets? My doubt comes from the fact, that the | symbol is used to select alternatives.

Regards,
Mukul</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22149</commentid>
    <comment_count>2</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2008-10-10 17:05:38 +0000</bug_when>
    <thetext>On 2008-10-10, the working group adopted a proposal to address this issue by changing the facet element name from &quot;assert&quot; to &quot;assertion&quot;. (This is mostly a datatypes change.)

The proposal adopted can be found here (member-only):
http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.b5906.html

There were a couple amendments to the above proposal:
- An additional &lt;assert&gt; is replaced with &lt;assertion&gt;
- Added &quot;assert&quot; to the Schema and DTD for schemas where it was missing</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>