<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=XML_Tutorial%2FXML_Schema%2FSequence</id>
		<title>XML Tutorial/XML Schema/Sequence - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=XML_Tutorial%2FXML_Schema%2FSequence"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Sequence&amp;action=history"/>
		<updated>2026-04-04T18:51:46Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Sequence&amp;diff=10563&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Sequence&amp;diff=10563&amp;oldid=prev"/>
				<updated>2010-05-26T08:26:43Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 08:26, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Sequence&amp;diff=10562&amp;oldid=prev</id>
		<title> в 18:22, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML_Tutorial/XML_Schema/Sequence&amp;diff=10562&amp;oldid=prev"/>
				<updated>2010-05-25T18:22:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Fixed Order: All Elements Required==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;xs:schema xmlns:xs=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;br /&gt;
  targetNamespace=&amp;quot;http://www.wbex.ru&amp;quot; xmlns=&amp;quot;http://www.wbex.ru&amp;quot;&lt;br /&gt;
  elementFormDefault=&amp;quot;qualified&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xs:element name = &amp;quot;Count&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;
         &amp;lt;xs:element name = &amp;quot;One&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;xs:element name = &amp;quot;Two&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;xs:element name = &amp;quot;Three&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;
   &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;
&amp;lt;/xs:element&amp;gt;&lt;br /&gt;
&amp;lt;/xs:schema&amp;gt;&lt;br /&gt;
So the following example would be a conforming structure:&lt;br /&gt;
&amp;lt;Count&amp;gt;&lt;br /&gt;
   &amp;lt;One&amp;gt;&amp;lt;/One&amp;gt;&lt;br /&gt;
   &amp;lt;Two&amp;gt;&amp;lt;/Two&amp;gt;&lt;br /&gt;
   &amp;lt;Three&amp;gt;&amp;lt;/Three&amp;gt;&lt;br /&gt;
&amp;lt;/Count&amp;gt;&lt;br /&gt;
But this would not:&lt;br /&gt;
&amp;lt;Count&amp;gt;&lt;br /&gt;
   &amp;lt;Two&amp;gt;&amp;lt;/Two&amp;gt;&lt;br /&gt;
   &amp;lt;One&amp;gt;&amp;lt;/One&amp;gt;&lt;br /&gt;
&amp;lt;/Count&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Fixed Order Optional Elements==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;schema xmlns=&amp;quot;http://www.w3.org/2001/10/XMLSchema&amp;quot;&lt;br /&gt;
targetNamespace=&amp;quot;http://www.wbex.runs/&amp;quot;&lt;br /&gt;
xmlns:end=&amp;quot;http://www.wbex.ru/&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;element name = &amp;quot;Add&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;complexType&amp;gt;&lt;br /&gt;
           &amp;lt;sequence&amp;gt;&lt;br /&gt;
             &amp;lt;element name = &amp;quot;Namespace&amp;quot; minOccurs = &amp;quot;0&amp;quot; maxOccurs = &amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;element name = &amp;quot;FilePath&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/sequence&amp;gt;&lt;br /&gt;
       &amp;lt;/complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/element&amp;gt;&lt;br /&gt;
&amp;lt;/schema&amp;gt;&lt;br /&gt;
So, both of the following would be valid instances:&lt;br /&gt;
&amp;lt;Add&amp;gt;&lt;br /&gt;
   &amp;lt;Namespace&amp;gt;http://www.wbex.ru/books&amp;lt;/Namespace&amp;gt;&lt;br /&gt;
   &amp;lt;FilePath&amp;gt;http://www.wbex.ru/books/books.xsd&amp;lt;/FilePath&amp;gt;&lt;br /&gt;
&amp;lt;/Add&amp;gt;&lt;br /&gt;
&amp;lt;Add&amp;gt;&lt;br /&gt;
   &amp;lt;FilePath&amp;gt;http://www.wbex.ru/books/books.xsd&amp;lt;/FilePath&amp;gt;&lt;br /&gt;
&amp;lt;/Add&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Require Both Elements or None==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
File: Schema.xsd&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;xs:schema xmlns:xs = &amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;xs:element name=&amp;quot;Book&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;xs:sequence minOccurs = &amp;quot;0&amp;quot; maxOccurs = &amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;xs:element name=&amp;quot;Title&amp;quot; type=&amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;xs:element name=&amp;quot;Author&amp;quot; type=&amp;quot;xs:string&amp;quot;  /&amp;gt;&lt;br /&gt;
          &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;
       &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/xs:element&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;/xs:schema&amp;gt;&lt;br /&gt;
So the following two examples would be allowed:&lt;br /&gt;
&amp;lt;Book&amp;gt;&amp;lt;/Book&amp;gt;&lt;br /&gt;
&amp;lt;Book&amp;gt;&lt;br /&gt;
   &amp;lt;Title&amp;gt;XML&amp;lt;/Title&amp;gt;&lt;br /&gt;
   &amp;lt;Author&amp;gt;author&amp;lt;/Author&amp;gt;&lt;br /&gt;
&amp;lt;/Book&amp;gt;&lt;br /&gt;
But the third is invalid because it only contains one of the child elements:&lt;br /&gt;
&amp;lt;Book&amp;gt;&lt;br /&gt;
   &amp;lt;Title&amp;gt;Professional XML Schema&amp;lt;/Title&amp;gt;&lt;br /&gt;
&amp;lt;/Book&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Requiring Elements in a Mixed Model==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
File: Data.xml&lt;br /&gt;
&amp;lt;data paperID = &amp;quot;43374&amp;quot;&amp;gt;&lt;br /&gt;
  A &amp;lt;partA&amp;gt;B&amp;lt;/partA&amp;gt;C&amp;lt;partB accepted = &amp;quot;true&amp;quot;&amp;gt;D&amp;lt;/partB&amp;gt;&lt;br /&gt;
&amp;lt;/data&amp;gt;&lt;br /&gt;
File: Schema.xsd&lt;br /&gt;
&amp;lt;xs:schema xmlns:xs = &amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;xs:element name = &amp;quot;data&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;xs:complexType  mixed = &amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;xs:element name = &amp;quot;partA&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;xs:element name = &amp;quot;partB&amp;quot; type = &amp;quot;partBType&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;
         &amp;lt;xs:attribute name = &amp;quot;paperID&amp;quot; type = &amp;quot;xs:integer&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;
   &amp;lt;/xs:element&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   &amp;lt;xs:complexType name = &amp;quot;partBType&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;xs:simpleContent&amp;gt;&lt;br /&gt;
        &amp;lt;xs:extension base=&amp;quot;xs:string&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;xs:attribute name = &amp;quot;accepted&amp;quot; type = &amp;quot;xs:boolean&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/xs:extension&amp;gt;&lt;br /&gt;
      &amp;lt;/xs:simpleContent&amp;gt;&lt;br /&gt;
   &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;/xs:schema&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Requiring Elements to Appear in Sequence==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
A sequence determines the order in which its contained elements may appear in an XML document.&lt;br /&gt;
A sequence can also contain other sequences, choices or references to named groups.&lt;br /&gt;
A sequence may be contained in a complex type definition in other sequences, or in a set of choices or in named group definitions.&lt;br /&gt;
It&amp;quot;s legitimate for a sequence to contain only one element.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;xsd:schema xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;br /&gt;
  targetNamespace=&amp;quot;http://www.wbex.ru&amp;quot; xmlns=&amp;quot;http://www.wbex.ru&amp;quot;&lt;br /&gt;
  elementFormDefault=&amp;quot;qualified&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:complexType name=&amp;quot;animalType&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:element name=&amp;quot;name&amp;quot; type=&amp;quot;xsd:string&amp;quot; minOccurs=&amp;quot;2&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;xsd:element name=&amp;quot;subspecies&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
  &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Requiring Repeating Sequences of Elements==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;xs:schema xmlns:xs=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;br /&gt;
  targetNamespace=&amp;quot;http://www.wbex.ru&amp;quot; xmlns=&amp;quot;http://www.wbex.ru&amp;quot;&lt;br /&gt;
  elementFormDefault=&amp;quot;qualified&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xs:element name = &amp;quot;data&amp;quot; &amp;gt;&lt;br /&gt;
       &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;xs:sequence minOccurs = &amp;quot;3&amp;quot; maxOccurs = &amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;xs:element name = &amp;quot;One&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;xs:element name = &amp;quot;Two&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;xs:element name = &amp;quot;Three&amp;quot; type = &amp;quot;xs:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;
       &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;
    &amp;lt;/xs:element&amp;gt;&lt;br /&gt;
&amp;lt;/xs:schema&amp;gt;&lt;br /&gt;
So, the following is the only allowable conforming instance document:&lt;br /&gt;
&amp;lt;data&amp;gt;&lt;br /&gt;
   &amp;lt;One&amp;gt;First came&amp;lt;/One&amp;gt;&lt;br /&gt;
   &amp;lt;Two&amp;gt;Second came&amp;lt;/Two&amp;gt;&lt;br /&gt;
   &amp;lt;Three&amp;gt;Third came&amp;lt;/Three&amp;gt;&lt;br /&gt;
   &amp;lt;One&amp;gt;First came&amp;lt;/One&amp;gt;&lt;br /&gt;
   &amp;lt;Two&amp;gt;Second came&amp;lt;/Two&amp;gt;&lt;br /&gt;
   &amp;lt;Three&amp;gt;Third came&amp;lt;/Three&amp;gt;&lt;br /&gt;
   &amp;lt;One&amp;gt;First came&amp;lt;/One&amp;gt;&lt;br /&gt;
   &amp;lt;Two&amp;gt;Second came&amp;lt;/Two&amp;gt;&lt;br /&gt;
   &amp;lt;Three&amp;gt;Third came&amp;lt;/Three&amp;gt;&lt;br /&gt;
&amp;lt;/data&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== &amp;lt;sequence&amp;gt; Declarations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sequence minOccurs=&amp;quot;non negative number&amp;quot; &lt;br /&gt;
          maxOccurs=&amp;quot;non negative number or unbounded&amp;quot;&amp;gt; &lt;br /&gt;
A sample sequence might appear as follows: &lt;br /&gt;
&amp;lt;sequence&amp;gt; &lt;br /&gt;
    &amp;lt;element name=&amp;quot;first&amp;quot; type=&amp;quot;string&amp;quot; minOccurs=&amp;quot;1&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;/&amp;gt; &lt;br /&gt;
    &amp;lt;element name=&amp;quot;middle&amp;quot; type=&amp;quot;string&amp;quot; minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot;/&amp;gt; &lt;br /&gt;
    &amp;lt;element name=&amp;quot;last&amp;quot; type=&amp;quot;string&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/sequence&amp;gt; &lt;br /&gt;
By utilizing a &amp;lt;sequence&amp;gt; to specify your content model, you indicate that the elements must appear &lt;br /&gt;
  within your instance document in the sequence, or order, specified. &lt;br /&gt;
For example, the following would be legal: &lt;br /&gt;
&amp;lt;first&amp;gt;first&amp;lt;/first&amp;gt; &lt;br /&gt;
&amp;lt;middle&amp;gt;middle&amp;lt;/middle&amp;gt; &lt;br /&gt;
&amp;lt;last&amp;gt;last&amp;lt;/last&amp;gt; &lt;br /&gt;
The following, however, would be illegal: &lt;br /&gt;
&amp;lt;last&amp;gt;last&amp;lt;/last&amp;gt; &lt;br /&gt;
&amp;lt;middle&amp;gt;middle&amp;lt;/middle&amp;gt; &lt;br /&gt;
&amp;lt;first&amp;gt;first&amp;lt;/first&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== The minOccurs and maxOccurs attributes can be used with compositors==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xsd:complexType name=&amp;quot;nameType&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:sequence maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;xsd:element name=&amp;quot;firstName&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;xsd:element name=&amp;quot;middleName&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;xsd:element name=&amp;quot;lastName&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
By adding the maxOccurs attribute, you allow for the following structure to occur in the document instance:&lt;br /&gt;
&amp;lt;firstName&amp;gt;A&amp;lt;/firstName&amp;gt;&lt;br /&gt;
&amp;lt;middleName&amp;gt;B&amp;lt;/middleName&amp;gt;&lt;br /&gt;
&amp;lt;lastName&amp;gt;C&amp;lt;/lastName&amp;gt;&lt;br /&gt;
&amp;lt;firstName&amp;gt;D&amp;lt;/firstName&amp;gt;&lt;br /&gt;
&amp;lt;middleName&amp;gt;E&amp;lt;/middleName&amp;gt;&lt;br /&gt;
&amp;lt;lastName&amp;gt;F&amp;lt;/lastName&amp;gt;&lt;br /&gt;
&amp;lt;firstName&amp;gt;G&amp;lt;/firstName&amp;gt;&lt;br /&gt;
&amp;lt;middleName&amp;gt;H&amp;lt;/middleName&amp;gt;&lt;br /&gt;
&amp;lt;lastName&amp;gt;I&amp;lt;/lastName&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== The sequence compositor allows you to require a sequence for child elements in a content model==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;&lt;br /&gt;
  &amp;lt;firstName&amp;gt;A&amp;lt;/firstName&amp;gt;&lt;br /&gt;
  &amp;lt;middleName&amp;gt;B&amp;lt;/middleName&amp;gt;&lt;br /&gt;
  &amp;lt;lastName&amp;gt;C&amp;lt;/lastName&amp;gt;&lt;br /&gt;
&amp;lt;/name&amp;gt;&lt;br /&gt;
To require that the child elements occur in that order, we would have to use the sequence compositor:&lt;br /&gt;
&amp;lt;xsd:element name=&amp;quot;name&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;
   &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;firstName&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;middleName&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:element name=&amp;quot;lastName&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;
  &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:element&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>