[XML Schema] Key-values

K

kelvSYC

Is it possible in an XML schema to say that an attribute is valid only
when it references another attribute in some other element (similar to
IDREF but with strings)?

For example, say I have an element a with a string attribute foo. Is
it possible to define an element b with an attribute bar whose only
permitted values are the values of foo?

As a further example, suppose I have
<a foo="123"/>
<a foo="456"/>

in one document and

<a foo="abc"/>
<a foo="def"/>

in another

How can I make bar only permit "123" and "456" in the first document
and "abc" and "def" in the other?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top