[XML Schema] Key-values

kelvSYC

Usenet Archive
Joined
Jun 18, 2002
Messages
131
Reaction score
0
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

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,798
Members
249,594
Latest member
henrywalsh

Latest Threads

Top