0
對不起,我的英文。 片段我的XSD文件:或XSD文件中的邏輯
<!--ru-RU: Группа настроек-->
<!--en-US: Settings group-->
<xs:complexType name="settingsGroup" >
<xs:sequence>
<xs:element name="string" type="stringValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="bool" type="boolValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="date" type="dateValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="dateTime" type="dateTimeValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="int" type="intValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="double" type="doubleValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="day" type="dayValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="month" type="monthValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="year" type="yearValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="localization" type="languageValue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="nameId" type="xs:ID" use="required"/>
</xs:complexType>
我需要改變「settingsGroup」類型,以便它能夠得到或「settingsGroup」類型的集合,或者是由我指定在上述方案的.. 。我如何在XSD文件中編寫OR邏輯?
類似的東西:
<!--ru-RU: Группа настроек-->
<!--en-US: Settings group-->
<xs:complexType name="settingsGroup" >
<!--en-US: Something like it:-->
<xs:or>
<xs:sequence>
<xs:element name="group" type="settingsGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element name="string" type="stringValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="bool" type="boolValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="date" type="dateValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="dateTime" type="dateTimeValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="int" type="intValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="double" type="doubleValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="day" type="dayValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="month" type="monthValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="year" type="yearValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="localization" type="languageValue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:or>
<xs:attribute name="nameId" type="xs:ID" use="required"/>
</xs:complexType>
問候
非常感謝您! – 2012-04-03 08:58:30
嘿,別忘了接受答案! :) – 2012-04-03 12:04:54
我該怎麼辦? – 2012-04-05 11:21:02