考虑以下XSD代码......
<xs:group name="foo.cnt">
<xs:choice>
<xs:group ref="blah"/>
</xs:choice>
</xs:group>
<xs:element name="foo">
<xs:complexType mixed="true">
<xs:complexContent mixed="true">
<xs:extension base="foo.class">
<xs:attribute ref="bar" default="sample"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="foo.class" mixed="true">
<xs:sequence>
<xs:group ref="foo.content"/>
</xs:sequence>
<xs:attributeGroup ref="foo.attributes"/>
</xs:complexType>
<xs:group name="foo.content">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="foo.cnt" minOccurs="0"/>
</xs:choice>
</xs:sequence>
</xs:group>
我尝试创建重定义(在单独的XSD中)以添加字符串长度限制...
<xs:restriction base="xs:string">
<xs:length value="8"/>
</xs:restriction>
我一直在尝试解析错误。我在哪里/如何添加限制?
谢谢!