Hi all!I am working on a schema file where I want to use something like inheritance or interfaces (cf. Java), but I don't have any idea how to start. In particular, I would like to realize the following example. In schema A I define the general structure of an entity:
<xs:element name="elem" type="xs:string"> <xs:attribute name="attr" type="xs:string" /></xs:element>
An instance would look like this:
<elem attr="anything" />
In schema B I would like to refine the attribute type mentioned in schema A:
???<xs:attribute name="attr"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="value1" /> <xs:enumeration value="value2" /> </xs:restriction> </xs:simpleType></xs:attribute>???
So that I can decide in an instance if I want to use the general definition or the refined one, e.g. by using a prefix:
<elem attr="anything" />or<elem attr="B:value1" /><elem attr="B:value2" />
Basically, I want to put special values for attributes in an external schema file (as kind of a taxonomy) and decide in an instance if I want to use the general definition or the specialzed one. In the general schema I don't want to place anything that is related to the specialized values so that I could define lots of specialized schemas (other taxonomies) without the need to change the general schema. Hope you got my idea.. Does anyone have an idea whether this is possible an how I have to build my schemas and instances to achieve this?Thanks in advance!!!!!