I have my xml document containing several elements which have an attribute xml:lang.
I want to restrict the values which are allowable for the attribute's value; i.e. only allow "en-US, en-CA".
I've tried adding a restriction, but since the value is referenced that doesn't seem to be valid:
<xs:element name="translation">
<xs:complexType>
<xs:sequence>
<xs:element ref="name" />
</xs:sequence>
<xs:attribute ref="xml:lang" use="required"/>
</xs:complexType>
</xs:element>
Getting the namespace to import was difficult enough and I can't seem to find any good resources on adding restrictions/enumerations to it =(