Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found out myself.</p> <p>The difference between my examples is not very obvious on the first glance, but if the example had been a little more complex it would have made sense.</p> <p>The following extension clarifies the differences:</p> <pre> <code> &lt;xsd:element name="XList"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="X" type="xsd:token" minOccurs="1" maxOccurs="1"/&gt; &lt;xsd:element name="Y" type="xsd:token" minOccurs="1" maxOccurs="1"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; </code> </pre> <p>leads to</p> <pre> <code> &lt;XList&gt; &lt;X&gt;Only X&lt;/X&gt; &lt;Y&gt;Only Y&lt;/Y&gt; &lt;/XList&gt; </code> </pre> <p>whereas</p> <pre> <code> &lt;xsd:element name="XList"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="X" type="xsd:token" minOccurs="1" maxOccurs="unbounded"/&gt; &lt;xsd:element name="Y" type="xsd:token" minOccurs="1" maxOccurs="unbounded"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; </code> </pre> <p>leads to</p> <pre> <code> &lt;XList&gt; &lt;X&gt;First X&lt;/X&gt; &lt;X&gt;Second X&lt;/X&gt; &lt;X&gt;Third X&lt;/X&gt; ... &lt;Y&gt;First Y&lt;/Y&gt; &lt;Y&gt;Second Y&lt;/Y&gt; ... &lt;/XList&gt; </code> </pre> <p>and</p> <pre> <code> &lt;xsd:element name="XList"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence minOccurs="1" maxOccurs="unbounded" &gt; &lt;xsd:element name="X" type="xsd:token" minOccurs="2" maxOccurs="2"/&gt; &lt;xsd:element name="Y" type="xsd:token" minOccurs="1" maxOccurs="1"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; </code> </pre> <p>leads to</p> <pre> <code> &lt;XList&gt; &lt;X&gt;First X&lt;/X&gt; &lt;X&gt;Second X&lt;/X&gt; &lt;Y&gt;First Y&lt;/Y&gt; &lt;X&gt;Third X&lt;/X&gt; &lt;X&gt;Fourth X&lt;/X&gt; &lt;Y&gt;Second Y&lt;/Y&gt; ... &lt;/XList&gt; </code> </pre> <p>and</p> <pre> <code> &lt;xsd:element name="XList"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence minOccurs="1" maxOccurs="unbounded" &gt; &lt;xsd:element name="X" type="xsd:token" minOccurs="1" maxOccurs="unbounded"/&gt; &lt;xsd:element name="Y" type="xsd:token" minOccurs="1" maxOccurs="unbounded"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; </code> </pre> <p>leads to</p> <pre> <code> &lt;XList&gt; &lt;X&gt;First X&lt;/X&gt; &lt;X&gt;Second X&lt;/X&gt; &lt;X&gt;Third X&lt;/X&gt; ... &lt;Y&gt;First Y&lt;/Y&gt; &lt;Y&gt;Second Y&lt;/Y&gt; ... &lt;X&gt;Fourth X&lt;/X&gt; &lt;X&gt;Fifth X&lt;/X&gt; &lt;X&gt;Sixth X&lt;/X&gt; ... &lt;Y&gt;Third Y&lt;/Y&gt; &lt;Y&gt;Fourth Y&lt;/Y&gt; ... &lt;/XList&gt; </code> </pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload