[relaxng-user] RNC Question | Element Dependency on Enumerated
Attribute
Oli Young
oli at katalyst.com.au
Thu Mar 10 16:47:27 ICT 2005
Hi,
So, I'm writing this internal xml schema to standardise a document
creation process. What I'd like to do is (this is in RNC)
given this pattern --
element field {
attribute type ("text"|"select"),
attribute length? &
element options {
element option {
attribute value,
text
}*
}?
....
}
what i'd like to be able to do is make another element pattern
dependant on the selected 'type', so if 'text' is selected, 'length' is
required, if 'select' is selected, the 'options' attribute is required.
The elements share too many common attributes (not shown here) to
consider them seperate entities, but have minor, yet important
differences that would be elegant to handle the way I'd like ?
Is this possible or am I barking up the wrong tree ?
TIA
Oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://relaxng.org/pipermail/relaxng-user/attachments/20050310/3597a508/PGP.bin
More information about the relaxng-user
mailing list