title: how to convert Json array to XSD
body: <p>I am currently mapping Json and XSD.
  In Json there is array contains several items with same elements.</p>
  
  <p>the Json array is like:</p>
  
  <pre><code>"Item":[  
     {  
        "ItemSequenceNo":0,
        "AQuantity":{  
           "code":"aaa",
           "quantity":1
        },
        "DQuantity":{  
           "code":"ddd",
           "quantity":4
        },
        "Amount":{  
           "currencyID":"USD",
           "value":111
        },
  
     },
     {  
        "ItemSequenceNo":1,
        "AQuantity":{  
           "code":"aaa",
           "quantity":4
        },
        "DQuantity":{  
           "code":"ddd",
           "quantity":9
        },
        "Amount":{  
           "currencyID":"USD",
           "value":123
        },
     }
  ]
  </code></pre>
  
  <p>I tried to map this Json array with XSD:</p>
  
  <pre><code>&lt;xs:element name="Item"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence minOccurs="1" maxOccurs="50"&gt;
              &lt;xs:element ref="p:ItemSequenceNo" minOccurs="1" maxOccurs="1"/&gt;
              &lt;xs:element ref="p:AQuantity" minOccurs="1" maxOccurs="1"/&gt;
              &lt;xs:element ref="p:DQuantity" minOccurs="1" maxOccurs="1"/&gt;
              &lt;xs:element ref="p:Amount" minOccurs="1" maxOccurs="1"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>where the ref is like: </p>
  
  <pre><code>&lt;xs:element name="ItemSequenceNo"&gt;
      &lt;xs:simpleType&gt;
          &lt;xs:restriction base="xs:integer"&gt;
              &lt;xs:totalDigits value="5"/&gt;
          &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="AQuantity"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:simpleContent&gt;
              &lt;xs:extension base="xs:integer"&gt;
                  &lt;xs:attribute name="code"&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base="xs:string"&gt;
                              &lt;xs:minLength value="0"/&gt;
                              &lt;xs:maxLength value="3"/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:attribute&gt;
              &lt;/xs:extension&gt;
          &lt;/xs:simpleContent&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="DQuantity"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:simpleContent&gt;
              &lt;xs:extension base="xs:integer"&gt;
                  &lt;xs:attribute name="code"&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base="xs:string"&gt;
                              &lt;xs:minLength value="0"/&gt;
                              &lt;xs:maxLength value="3"/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:attribute&gt;
              &lt;/xs:extension&gt;
          &lt;/xs:simpleContent&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="Amount"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:simpleContent&gt;
              &lt;xs:extension base="xs:integer"&gt;
                  &lt;xs:attribute name="CurrencyID"&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base="xs:string"&gt;
                              &lt;xs:minLength value="0"/&gt;
                              &lt;xs:maxLength value="3"/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:attribute&gt;
              &lt;/xs:extension&gt;
          &lt;/xs:simpleContent&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>The thing is when I am mapping Json array with XSD, the output XML ordered by array item(elements) like below:</p>
  
  <pre><code>&lt;item&gt;
      &lt;ItemSequenceNo &gt;0&lt;/ItemSequenceNo&gt;
      &lt;ItemSequenceNo &gt;1&lt;/ItemSequenceNo&gt;
      &lt;AQuantity code="aaa"&gt;1&lt;/AQuantity&gt;
      &lt;AQuantity code="aaa"&gt;4&lt;/AQuantity&gt;
      &lt;DQuantity code="ddd"&gt;4&lt;/DQuantity&gt;
      &lt;DQuantity code="ddd"&gt;9&lt;/DQuantity&gt;
      &lt;Amount CurrencyID="USD"&gt;111&lt;/Amount&gt;
      &lt;Amount CurrencyID="USD"&gt;123&lt;/Amount&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>while the result I am expecting is two separate blocks:</p>
  
  <pre><code>&lt;item&gt;
      &lt;ItemSequenceNo &gt;0&lt;/ItemSequenceNo&gt; 
      &lt;AQuantity code="aaa"&gt;1&lt;/AQuantity&gt; 
      &lt;DQuantity code="ddd"&gt;4&lt;/DQuantity&gt; 
      &lt;Amount CurrencyID="USD"&gt;111&lt;/Amount&gt;
  &lt;/item&gt;
  
  &lt;item&gt;
      &lt;ItemSequenceNo &gt;1&lt;/ItemSequenceNo&gt;
      &lt;AQuantity code="aaa"&gt;4&lt;/AQuantity&gt;
      &lt;DQuantity code="ddd"&gt;9&lt;/DQuantity&gt;
      &lt;Amount CurrencyID="USD"&gt;123&lt;/Amount&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>Does anyone have any idea on how can I get this? By modifying Json/XSD, or is there any function in <code>MapForce</code> that could achieve this?</p>