Xml Schema: Nodes with same name but different types based on attribute value
问题 I need a schema that accomplished this: <object type="possession"> <property name="VIN">1111111111111111</property> <property name="Year">2003</property> <property name="Make">Chevrolet</property> </object> The "VIN" property must be 17 characters The "Year property must be of type gYear The "Make" property must conform to an enumeration of {Ford, Chevrolet, Mazda} Right now I have this: <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault=