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