As in the scheme to describe the condition that the text in the element always consists of a single letter of the Latin alphabet included in the HEX format.
<?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:attribute name="C"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:length value="4"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:element name="A"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="B"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute ref="C" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element maxOccurs="unbounded" name="D"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute ref="C" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
xs:choice(and you will have to explicitly list all the options one by one, since you cannot specify only the format of the string in this element). - StateItPrimitive