title: Can you have more than one indicator in an XSD complex element?
body: <p>I'm trying to build a new schema to validate XML against for my job. But I'm having a hard time answering the question: can I and how do I create a complex element that has some elements that need to be in a set sequence and other subelements that do not? Ultimately I think I should be able to have opening and closing "sequence" tags and opening and closing "all" tags around two sets of elements, but xsd doesn't seem to like that. Here's what I have:</p>
  
  <pre><code>&lt;xsd:complexType name="Original"&gt;
          &lt;xsd:sequence&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="1" name="AssetIdentifier" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;Definition: The Asset Identifier element is intended to
                          reflect the root of all following digital filenames.&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="0" name="ArchiveID" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;Definition: The Filename element in this section is
                          intended to reflect the root of all the following derivative digital
                          filenames.&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="1" name="Title" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;Definition: The known title of the asset. If no title is
                          known, one can be assigned; a number or letter sequence, whichever is
                          the most logical. Using the value "unknown" is also
                          acceptable.&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="1" name="RecordDate" type="xsd:date"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;Definition: The actual recording date of the asset.
                          Estimates, partial dates, and date ranges (i.e. 19XX, Feb. 19-24,
                          1934-1935, etc.) are allowable, as is 'unknown'. Best practice, when
                          applicable, is to use the YYYY-MM-DD format in accordance with ISO 8601.
                          Even partial dates, i.e. 1990-05 should adhere to this
                          format.&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="1" name="FormatType" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;Definition: The format of the analog asset, i.e. Open
                          Reel, Grooved Disc, DAT, Cassette, VHS, 16mm film, EIAJ,
                          etc.&lt;/xsd:documentation&gt;
                      &lt;xsd:documentation&gt;Best Practice: The MediaPreserve maintains a list of
                          controlled vocabularies organized by media type at: www.dontknowyet.com.
                          However, MP opted to meake this an unrestricted element in the event
                          that other ogranizations have their own controlled vocabularies in
                          place.&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
           &lt;/xsd:sequence&gt;
          &lt;xsd:all&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="0" name="StockBrand" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;If known definitively&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="0" name="TapeModel" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;If applicable. Usually applies to DAT tapes, open reels,
                          and wire recordings.&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
              &lt;xsd:element maxOccurs="1" minOccurs="0" name="TapeWidth" type="xsd:string"&gt;
                  &lt;xsd:annotation&gt;
                      &lt;xsd:documentation&gt;Typically only applicable for open reel
                          audio&lt;/xsd:documentation&gt;
                  &lt;/xsd:annotation&gt;
              &lt;/xsd:element&gt;
          &lt;/xsd:all&gt;
  </code></pre>
  
  <p></p>