H
Hauke Fuhrmann
Hello,
You can use the attribute type IDREF, if you want to make a reference to
the ID of other elements like so:
Also z.B.:
<entry id="e1" name="n1" phonenumber="p1"/>
<name id="n1" firstname="Robert" surname="Mustermann"/>
<phone id="p1" number="1234567"/>
In the schema definition the attributes "name" and "phonenumber" will be
typed as xs:IDREF.
The validator will check, if the IDs of all elements are unique and if
the Values of those Attributes are from within these IDs.
This is my question: How can I restrict the set of valid IDs for a
special attribute to a smaller subset of IDs?
For example I want to force the attribute "name" to only use references
to name-elements and "phonenumber" to only use references to
phone-elements, in order to not allow such thing:
<entry id="e1" name="p1" phonenumber="n1"/>
how do I do that?
greetings,
Hauke
You can use the attribute type IDREF, if you want to make a reference to
the ID of other elements like so:
Also z.B.:
<entry id="e1" name="n1" phonenumber="p1"/>
<name id="n1" firstname="Robert" surname="Mustermann"/>
<phone id="p1" number="1234567"/>
In the schema definition the attributes "name" and "phonenumber" will be
typed as xs:IDREF.
The validator will check, if the IDs of all elements are unique and if
the Values of those Attributes are from within these IDs.
This is my question: How can I restrict the set of valid IDs for a
special attribute to a smaller subset of IDs?
For example I want to force the attribute "name" to only use references
to name-elements and "phonenumber" to only use references to
phone-elements, in order to not allow such thing:
<entry id="e1" name="p1" phonenumber="n1"/>
how do I do that?
greetings,
Hauke