Hello,
I'm having problems with the sch閙a for a document. I'd like to define an entity with an attribute and a enumeration or pattern restriction but my editor keeps telling me that something is wrong.
I've also tried extending a data type first (with an attribute) and then restricting that subtype with the pattern or enumeration restriction, but could find no way of getting no errors.
Could you tell me what the problem is or how I could combine restrictions with attributes? Here's my code:
Code:
<xs:element name="generic">
<xs:complexType>
<xs:complexContent>
<xs:extension>
<xs:restriction base="xs:string">
<xs:enumeration value=http://www.webdeveloper.com/forum/archive/index.php/"man"/>
<xs:enumeration value="woman"/>
</xs:restriction>
<xs:attribute name="gender" type="xs:string" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
Thanks a lot!
xinelo
I'm having problems with the sch閙a for a document. I'd like to define an entity with an attribute and a enumeration or pattern restriction but my editor keeps telling me that something is wrong.
I've also tried extending a data type first (with an attribute) and then restricting that subtype with the pattern or enumeration restriction, but could find no way of getting no errors.
Could you tell me what the problem is or how I could combine restrictions with attributes? Here's my code:
Code:
<xs:element name="generic">
<xs:complexType>
<xs:complexContent>
<xs:extension>
<xs:restriction base="xs:string">
<xs:enumeration value=http://www.webdeveloper.com/forum/archive/index.php/"man"/>
<xs:enumeration value="woman"/>
</xs:restriction>
<xs:attribute name="gender" type="xs:string" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
Thanks a lot!
xinelo