Test results for Linux

test_004062_xsd_multitree_3

Test description

Test for element sequence number handling, wildcard handling, and
hierarchical element handling with element records that have more
than one structure in a complex XSD schema.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.xsd -A number

Input data

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12 13
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Schema

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://xmlfy.sourceforge.net"
           xmlns="http://xmlfy.sourceforge.net"
           elementFormDefault="qualified">
  <xs:element name="multitree">
    <xs:sequence>
      <xs:element name="rec_A" type="AType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:element>
  <xs:complexType name="AType">
    <xs:choice>
      <xs:sequence>
        <xs:element name="branch0" type="xs:string" />
        <xs:element name="rec_AA" type="AAType" />
        <xs:element name="b" type="xs:string" />
        <xs:element name="c" type="xs:string" />
        <xs:element name="rec_BB" type="BBType" />
        <xs:element name="rec_BB" type="BBType" />
        <xs:element name="rec_CCC" type="CCCType" />
        <xs:element name="rec_BB" type="BBType" />
        <xs:element name="rec_BBB" type="BBBType" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:sequence>
        <xs:element name="branch1" type="xs:string" />
        <xs:element name="c" type="xs:string" />
        <xs:element name="rec_BB" type="BBType" />
      </xs:sequence>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="AAType">
    <xs:choice>
      <xs:element name="branch0" type="xs:string" />
      <xs:sequence>
        <xs:element name="branch1" type="xs:string" />
        <xs:element name="rec_AAA" type="AAAType" />
        <xs:element name="b" type="xs:string" />
      </xs:sequence>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="AAAType">
    <xs:choice>
      <xs:element name="branch0" type="xs:string" />
      <xs:element name="branch1" type="xs:string" />
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="BBType">
    <xs:choice>
      <xs:sequence>
        <xs:element name="branch0" type="xs:string" />
        <xs:element name="rec_BBB" type="BBBType" />
      </xs:sequence>
      <xs:sequence>
        <xs:element name="branch1" type="xs:string" />
        <xs:element name="rec_CCC" type="CCCType" />
      </xs:sequence>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="BBBType">
    <xs:choice>
      <xs:element name="branch0" type="xs:string" />
      <xs:sequence>
        <xs:element name="branch1" type="xs:string" />
        <xs:element name="b" type="xs:string" />
      </xs:sequence>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="CCCType">
    <xs:choice>
      <xs:sequence>
        <xs:element name="branch0" type="xs:string" />
        <xs:element name="b" type="xs:string" />
      </xs:sequence>
      <xs:sequence>
        <xs:element name="branch1" type="xs:string" />
        <xs:element name="rec_DDDD" type="DDDDType" />
      </xs:sequence>
      <xs:element name="branch2" type="xs:string" />
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="DDDDType">
    <xs:sequence>
      <xs:element name="branch0" type="xs:string" />
      <xs:element name="a" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>

Output result

<?xml version="1.0" encoding="UTF-8"?>
<multitree xmlns="http://xmlfy.sourceforge.net"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlfy.sourceforge.net schema.xsd">
  <rec_A number="1">
    <branch1 number="1">1</branch1>
    <c number="1">2</c>
    <rec_BB number="1">
      <branch0 number="1">3</branch0>
      <rec_BBB number="1">
        <branch0 number="1">4</branch0>
      </rec_BBB>
    </rec_BB>
  </rec_A>
  <rec_A number="2">
    <branch1 number="1">1</branch1>
    <c number="1">2</c>
    <rec_BB number="1">
      <branch0 number="1">3</branch0>
      <rec_BBB number="1">
        <branch1 number="1">4</branch1>
        <b number="1">5</b>
      </rec_BBB>
    </rec_BB>
  </rec_A>
  <rec_A number="3">
    <branch1 number="1">1</branch1>
    <c number="1">2</c>
    <rec_BB number="1">
      <branch1 number="1">3</branch1>
      <rec_CCC number="1">
        <branch1 number="1">4</branch1>
        <rec_DDDD number="1">
          <branch0 number="1">5</branch0>
          <a number="1">6</a>
        </rec_DDDD>
      </rec_CCC>
    </rec_BB>
  </rec_A>
  <rec_A number="4">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch2 number="1">9</branch2>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">10</branch0>
      <rec_BBB number="1">
        <branch0 number="1">11</branch0>
      </rec_BBB>
    </rec_BB>
  </rec_A>
  <rec_A number="5">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
  </rec_A>
  <rec_A number="6">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="7">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="8">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
    <rec_BBB number="3">
      <branch0 number="1">15</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="9">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
    <rec_BBB number="3">
      <branch0 number="1">15</branch0>
    </rec_BBB>
    <rec_BBB number="4">
      <branch0 number="1">16</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="10">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
    <rec_BBB number="3">
      <branch0 number="1">15</branch0>
    </rec_BBB>
    <rec_BBB number="4">
      <branch0 number="1">16</branch0>
    </rec_BBB>
    <rec_BBB number="5">
      <branch0 number="1">17</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="11">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
    <rec_BBB number="3">
      <branch0 number="1">15</branch0>
    </rec_BBB>
    <rec_BBB number="4">
      <branch0 number="1">16</branch0>
    </rec_BBB>
    <rec_BBB number="5">
      <branch0 number="1">17</branch0>
    </rec_BBB>
    <rec_BBB number="6">
      <branch0 number="1">18</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="12">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
    <rec_BBB number="3">
      <branch0 number="1">15</branch0>
    </rec_BBB>
    <rec_BBB number="4">
      <branch0 number="1">16</branch0>
    </rec_BBB>
    <rec_BBB number="5">
      <branch0 number="1">17</branch0>
    </rec_BBB>
    <rec_BBB number="6">
      <branch0 number="1">18</branch0>
    </rec_BBB>
    <rec_BBB number="7">
      <branch0 number="1">19</branch0>
    </rec_BBB>
  </rec_A>
  <rec_A number="13">
    <branch0 number="1">1</branch0>
    <rec_AA number="1">
      <branch0 number="1">2</branch0>
    </rec_AA>
    <b number="1">3</b>
    <c number="1">4</c>
    <rec_BB number="1">
      <branch0 number="1">5</branch0>
      <rec_BBB number="1">
        <branch0 number="1">6</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BB number="2">
      <branch0 number="1">7</branch0>
      <rec_BBB number="1">
        <branch0 number="1">8</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_CCC number="1">
      <branch0 number="1">9</branch0>
      <b number="1">10</b>
    </rec_CCC>
    <rec_BB number="3">
      <branch0 number="1">11</branch0>
      <rec_BBB number="1">
        <branch0 number="1">12</branch0>
      </rec_BBB>
    </rec_BB>
    <rec_BBB number="1">
      <branch0 number="1">13</branch0>
    </rec_BBB>
    <rec_BBB number="2">
      <branch0 number="1">14</branch0>
    </rec_BBB>
    <rec_BBB number="3">
      <branch0 number="1">15</branch0>
    </rec_BBB>
    <rec_BBB number="4">
      <branch0 number="1">16</branch0>
    </rec_BBB>
    <rec_BBB number="5">
      <branch0 number="1">17</branch0>
    </rec_BBB>
    <rec_BBB number="6">
      <branch0 number="1">18</branch0>
    </rec_BBB>
    <rec_BBB number="7">
      <branch0 number="1">19</branch0>
    </rec_BBB>
    <rec_BBB number="8">
      <branch0 number="1">20</branch0>
    </rec_BBB>
  </rec_A>
</multitree>

Goto:   Top of page.   Section "Environment".   Section "Summary".   Section "Test cases".