<?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>2554</bug_id>
          
          <creation_ts>2005-11-28 02:36:33 +0000</creation_ts>
          <short_desc>Should UPA be a model group or particle constraint?</short_desc>
          <delta_ts>2009-04-21 19:21:42 +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.0/1.1 both</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>important, easy</status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P4</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>
          
          
          <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>7275</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-11-28 02:36:38 +0000</bug_when>
    <thetext>Currently UPA is in 3.8.6 to constraint model groups. Consider the following:

&lt;complexType&gt;
  &lt;sequence maxOccurs=&quot;2&quot;&gt;
    &lt;element name=&quot;a&quot;/&gt;
    &lt;element name=&quot;a&quot; minOccurs=&quot;0&quot;/&gt;
  &lt;/sequence&gt;
&lt;/complexType&gt;

This should be invalid, because for the input &lt;a/&gt;&lt;a/&gt;, we don&apos;t know which 
element declaration to use for the second &lt;a/&gt;.

The content type of this complex type is a particle, whose term is a model 
gruop (the only model group in the content type). This model group is a 
sequence of 2 element declarations.

It&apos;s clear that the sequence model group itself doesn&apos;t violate UPA, then how 
do we flag this complex type as invalid? Shouldn&apos;t UPA be defined on particles?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11992</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2006-09-24 15:00:42 +0000</bug_when>
    <thetext>Strictly speaking, the Unique Particle Attribution constraint is described
(both in 1.0 and in the status quo of 1.1) as applying to a &apos;content model&apos;,
rather than a &apos;model group&apos;.  The term &apos;content model&apos; is defined in 
section 2.2.3.2 as a particle:

    A particle can be used in a complex type definition to constrain the 
    &amp;#183;validation&amp;#183; of the [children] of an element information item; such 
    a particle is called a content model.

In the example, the constraint applies to the particle whose term is the
sequence, not to the sequence group itself.  So the repetition information
which is essential to detecting the problem is not lost.

Does this sufficiently address the problem, or am I missing something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12067</commentid>
    <comment_count>2</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2006-09-27 03:02:43 +0000</bug_when>
    <thetext>The analysis in comment #1 looks correct. I&apos;m marking this bug as invalid.

I obviously must have assumed the first 3 words of UPA to be &quot;a model group&quot; as opposed to &quot;a content model&quot;. The confusion is probably caused by the fact that the constraint is in section &quot;3.8.6 Model Groups&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>