我有一个类似的xml文件
<?xml version="1.0" encoding="utf-8"?>
<list>
<some_element code="AA">some text</some_element>
<same_name_tag style="header1">some text</same_name_tag>
<same_name_tag style="header2">some text</same_name_tag>
<same_name_tag style="header3">some text</same_name_tag>
<sometimes_here_can_be_tag/>
<same_name_tag style="body1">
<new number="1"/>
<new number="2"/>
</same_name_tag>
<same_name_tag style="body2">
<new number="1"/>
<new number="2"/>
</same_name_tag>
</list>
xsd我需要类似的东西(这是错误的)
<xs:element name="list">
<xs:complexType>
<xs:sequence>
<xs:element name="some_element" type="element" />
<xs:element name="some_name_tag" type="header" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="sometimes_here_can_be_tag" type="sometimes"/>
<xs:element name ="some_name_tag" type="body"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
所以我有2个问题
<new numbers/>
且必须在<same_name_tag style="bodytags">
之前<xs:attribute code ="AA">
,则属性编号必须为100最大值,如果BB大于50最大谢谢