2010-07-14 58 views
1

這是我的架構和xml文件內容。
當我想用模式文件驗證我的xml文件時,出現錯誤:元素X1未在此範圍內定義。 錯誤行:25 錯誤列:12.
問題在哪裏?哪一個是錯誤的?架構文件或Xml文件

<xs:complexType name="LabelType"> 
    <xs:sequence> 
     <xs:element name="Text" type="xs:string"/> 
     <xs:element name="X" type="xs:short"/> 
     <xs:element name="Y" type="xs:short"/> 
     <xs:element name="RotateAngle" type="xs:short" minOccurs="0"/> 
    </xs:sequence> 
</xs:complexType> 

<xs:complexType name="ItemType"> 
    <xs:choice> 
     <xs:element name="Label" type="LabelType" minOccurs="0"></xs:element> 
     <xs:element name="X1" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Y1" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Normal" type="xs:string" minOccurs="0"></xs:element> 
     <xs:element name="Reverse" type="xs:string" minOccurs="0"></xs:element> 
     <xs:element name="SwitchType" minOccurs="0"> 
      <xs:simpleType> 
       <xs:restriction base="xs:string"> 
        <xs:pattern value="MANUEL|AUTO"/> 
       </xs:restriction> 
      </xs:simpleType> 
     </xs:element> 
     <xs:element name="X2" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Y2" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Signalization" minOccurs="0"> 
      <xs:simpleType> 
       <xs:restriction base="xs:string"> 
        <xs:pattern value="YES|NO"/> 
       </xs:restriction> 
      </xs:simpleType> 
     </xs:element> 
     <xs:element name="RotateAngle" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Width" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Height" type="xs:short" minOccurs="0"></xs:element> 
     <xs:element name="Source" type="xs:string" minOccurs="0"></xs:element> 
     <xs:element name="Item" type="ItemType" minOccurs="0"></xs:element> 
    </xs:choice> 
    <xs:attribute name="id" type="xs:string" use="required"/> 
    <xs:attribute name="type" use="required"> 
     <xs:simpleType> 
      <xs:restriction base="xs:string"> 
       <xs:enumeration value="SWITCH"/> 
       <xs:enumeration value="BLOCKSEGMENT"/> 
       <xs:enumeration value="SIGNAL"/> 
       <xs:enumeration value="GROUP"/> 
       <xs:enumeration value="LEVELCROSSING"/> 
       <xs:enumeration value="SIGN"/> 
       <xs:enumeration value="TRAINIDBOX"/> 
      </xs:restriction> 
     </xs:simpleType> 
    </xs:attribute> 
    <xs:attribute name="ssid" type="xs:string" use="optional"/> 
    <xs:attribute name="blockId" type="xs:string" use="optional"/> 
</xs:complexType> 
<xs:complexType name="IndicatorType"> 
    <xs:attribute name="id" type="xs:string" use="required"/> 
    <xs:attribute name="type" use="required"> 
     <xs:simpleType> 
      <xs:restriction base="xs:string"> 
       <xs:enumeration value="SWITCHHEATERSSTATE"/> 
       <xs:enumeration value="SIGNALSDAYNIGHTMODE"/> 
       <xs:enumeration value="POWERSUPPLY"/> 
      </xs:restriction> 
     </xs:simpleType> 
    </xs:attribute> 
</xs:complexType> 

<xs:element name="FieldVisual"> 
<xs:complexType> 
     <xs:sequence> 
      <xs:element name="Region" maxOccurs="unbounded"> 
       <xs:complexType> 
        <xs:sequence> 
         <xs:element name="Indicators"> 
          <xs:complexType> 
           <xs:sequence> 
            <xs:element name="Indicator" type="IndicatorType" maxOccurs="3"/> 
           </xs:sequence> 
          </xs:complexType> 
         </xs:element> 
         <xs:element name="Track"> 
          <xs:complexType> 
           <xs:sequence> 
            <xs:element name="Item" type="ItemType" maxOccurs="unbounded"></xs:element> 
           </xs:sequence> 
           <xs:attribute name="id" type="xs:string" use="required"/> 
           <xs:attribute name="X" type="xs:integer" use="required"/> 
           <xs:attribute name="Y" type="xs:integer" use="required"/> 
          </xs:complexType> 
         </xs:element> 
        </xs:sequence> 
        <xs:attribute name="id" type="xs:string" use="required"/> 
        <xs:attribute name="name" type="xs:string" use="required"/> 
       </xs:complexType> 
      </xs:element> 
     </xs:sequence> 
    </xs:complexType> 
</xs:element> 

<FieldVisual> 
<Region id="MIT" name="TEST"> 
    <Indicators> 
     <Indicator id="[email protected]" type="SWITCHHEATERSSTATE"/> 
     <Indicator id="[email protected]" type="SIGNALSDAYNIGHTMODE"/> 
     <Indicator id="[email protected]" type="POWERSUPPLY"/> 
    </Indicators> 
    <Track id="TEST" X ="632" Y="0"> 
     <Item id="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>D</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>US</Normal> 
     <Reverse>UU</Reverse> 
     <SwitchType>MANUEL</SwitchType> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>0</Y1> 
      <X2>60</X2> 
      <Y2>-60</Y2> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>(5S)</Text> 
      <X>110</X> 
      <Y>-135</Y> 
      </Label> 
      <X1>60</X1> 
      <Y1>-60</Y1> 
      <X2>120</X2> 
      <Y2>-120</Y2> 
      <Signalization>NO</Signalization> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>80</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGN"> 
      <X1>90</X1> 
      <Y1>-5</Y1> 
      <RotateAngle>180</RotateAngle> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>(4S)</Text> 
      <X>85</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>180</X2> 
     <Y2>15</Y2> 
     <Signalization>NO</Signalization> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>80</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>56D</Text> 
      <X>10</X> 
      <Y>30</Y> 
      <RotateAngle>90</RotateAngle> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3lr</Source> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>80</X1> 
      <Y1>0</Y1> 
      <X2>20</X2> 
      <Y2>-60</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGN"> 
      <X1>5</X1> 
      <Y1>-65</Y1> 
      <RotateAngle>45</RotateAngle> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>(6S)</Text> 
      <X>-50</X> 
      <Y>-135</Y> 
      </Label> 
      <X1>20</X1> 
      <Y1>-60</Y1> 
      <X2>-40</X2> 
      <Y2>-120</Y2> 
      <Signalization>NO</Signalization> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>59</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>US</Reverse> 
     </Item> 
     <Item id="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>61</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>SD</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>59T</Text> 
      <X>85</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>180</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>56B</Text> 
      <X>155</X> 
      <Y>-15</Y> 
      </Label> 
      <X1>145</X1> 
      <Y1>0</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3rl</Source> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>(003D)</Text> 
      <X>45</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>100</X2> 
     <Y2>15</Y2> 
     <Signalization>NO</Signalization> 
     </Item> 
    </Track> 
    <Track id="TEST" X="542" Y="90"> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>5</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>UU</Normal> 
     <Reverse>US</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id ="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>130</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>2BB</Text> 
      <X>100</X> 
      <Y>-15</Y> 
      </Label> 
      <X1>95</X1> 
      <Y1>0</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3rl</Source> 
     </Item> 
     <Item id ="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>0</Y1> 
      <X2>60</X2> 
      <Y2>-60</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>3ST</Text> 
      <X>130</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>320</X2> 
     <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>52DB</Text> 
      <X>5</X> 
      <Y>30</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3lr</Source> 
     </Item> 
     <Item id="53T.6" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>100</X2> 
      <Y2>15</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>57</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>DD</Normal> 
     <Reverse>SD</Reverse> 
     </Item> 
     <Item id="53T.7" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>-30</X1> 
      <Y1>0</Y1> 
      <X2>-90</X2> 
      <Y2>-60</Y2> 
     </Item> 
    </Track> 
    <Track id="TEST" X="19" Y="180"> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>001BT</Text> 
      <X>70</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>150</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
       <Text>B2D</Text> 
       <X>15</X> 
       <Y>30</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>40</Width> 
      <Height>10</Height> 
      <Source>sgt3lr</Source> 
      </Item> 
    </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>150</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="LEVELCROSSING"> 
       <X1>60</X1> 
       <Y1>-80</Y1> 
     </Item> 
     <Item id="[email protected]" type="TRAINIDBOX"> 
      <X1>10</X1> 
      <Y1>-20</Y1> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>2D</Text> 
      <X>20</X> 
      <Y>30</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>50</Width> 
      <Height>10</Height> 
      <Source>sgt4lr</Source> 
     </Item> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>1A</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>SD</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id ="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>3T</Text> 
      <X>30</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>100</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id ="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>30</Y1> 
      <X2>30</X2> 
      <Y2>60</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>3</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SU</Normal> 
     <Reverse>SS</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>150</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>2BA</Text> 
      <X>120</X> 
      <Y>30</Y> 
      </Label> 
      <X1>110</X1> 
      <Y1>20</Y1> 
      <Width>40</Width> 
      <Height>10</Height> 
      <Source>sgt3rl</Source> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>0</Y1> 
      <X2>60</X2> 
      <Y2>-60</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>2ST</Text> 
      <X>145</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>300</X2> 
     <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>150</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>150</X1> 
      <Y1>30</Y1> 
      <X2>120</X2> 
      <Y2>60</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>52DA</Text> 
      <X>20</X> 
      <Y>30</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>50</Width> 
      <Height>10</Height> 
      <Source>sgt4lr</Source> 
     </Item> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>55A</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>US</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>98</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>98</X1> 
      <Y1>0</Y1> 
      <X2>38</X2> 
      <Y2>-60</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>53</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>US</Reverse> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>51B</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>SD</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>53T</Text> 
      <X>20</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>150</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>52B</Text> 
      <X>120</X> 
      <Y>-15</Y> 
      </Label> 
      <X1>100</X1> 
      <Y1>0</Y1> 
      <Width>50</Width> 
      <Height>10</Height> 
      <Source>sgt4rl</Source> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>30</Y1> 
      <X2>30</X2> 
      <Y2>60</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>001DT</Text> 
      <X>60</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>150</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>D52B</Text> 
      <X>115</X> 
      <Y>-15</Y> 
      </Label> 
      <X1>110</X1> 
      <Y1>0</Y1> 
      <Width>40</Width> 
      <Height>10</Height> 
      <Source>sgt3rl</Source> 
     </Item> 
     </Item> 
    </Track> 
    <Track id="TEST" X="19" Y="270"> 
     <Item id="(002B)@MIT" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>(002B)</Text> 
      <X>70</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>150</X2> 
     <Y2>15</Y2> 
     <Signalization>NO</Signalization> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>1T</Text> 
      <X>116</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>242</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>4D</Text> 
      <X>10</X> 
      <Y>30</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3lr</Source> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>242</X1> 
      <Y1>0</Y1> 
      <X2>214</X2> 
      <Y2>-28</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>1B</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>DS</Normal> 
     <Reverse>DD</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>185</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>4B</Text> 
      <X>160</X> 
      <Y>-15</Y> 
      </Label> 
      <X1>150</X1> 
      <Y1>0</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3rl</Source> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>1ST</Text> 
      <X>145</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>300</X2> 
     <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>62</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>54D</Text> 
      <X>10</X> 
      <Y>30</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>20</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3lr</Source> 
     </Item> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>55B</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>SU</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>0</Y1> 
      <X2>28</X2> 
      <Y2>-28</Y2> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <Label> 
      <Text>51T</Text> 
      <X>135</X> 
      <Y>-5</Y> 
      </Label> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>314</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>314</X1> 
      <Y1>0</Y1> 
      <X2>286</X2> 
      <Y2>-28</Y2> 
     </Item> 
     </Item> 
     <Item id="[email protected]" ssid="[email protected]" type="SWITCH"> 
     <Label> 
      <Text>51A</Text> 
      <X>10</X> 
      <Y>30</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>0</Y1> 
     <Normal>SS</Normal> 
     <Reverse>US</Reverse> 
     </Item> 
     <Item id="[email protected]" type="GROUP"> 
     <Item id="[email protected]" blockId="[email protected]" type="BLOCKSEGMENT"> 
      <X1>0</X1> 
      <Y1>15</Y1> 
      <X2>60</X2> 
      <Y2>15</Y2> 
     </Item> 
     <Item id="[email protected]" type="SIGNAL"> 
      <Label> 
      <Text>54B</Text> 
      <X>35</X> 
      <Y>-15</Y> 
      </Label> 
      <X1>25</X1> 
      <Y1>0</Y1> 
      <Width>35</Width> 
      <Height>10</Height> 
      <Source>sgs3rl</Source> 
     </Item> 
     </Item> 
     <Item id="[email protected]" type="BLOCKSEGMENT"> 
     <Label> 
      <Text>(002D)</Text> 
      <X>70</X> 
      <Y>-5</Y> 
     </Label> 
     <X1>0</X1> 
     <Y1>15</Y1> 
     <X2>150</X2> 
     <Y2>15</Y2> 
     <Signalization>NO</Signalization> 
     </Item> 
    </Track> 
    </Region> 
</FieldVisual> 

回答

1

這是因爲它沒有你的<xs:complexType name="ItemType">定義中預計的<xs:choice>多個元素。將其更改爲<xs:choice minOccurs="0" maxOccurs="unbounded">以解決第一個錯誤。在此之後,您會在<Track>的定義中發現另一個類似的錯誤。將其更改爲<xs:element name="Track" minOccurs="0" maxOccurs="unbounded">並且一切都會好的。