RNC Question | Element Dependency on Enumerated Attribute
Oli Young <[email protected]> Thu, 10 Mar 2005 16:47:27 +1030
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
--===============10844438151143176==
Content-Transfer-Encoding: 7bit
Content-Type: multipart/signed; protocol="application/pgp-signature";
micalg=pgp-sha1; boundary="Apple-Mail-12--1015738872"
--Apple-Mail-12--1015738872
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
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
--Apple-Mail-12--1015738872
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCL+Z3BB4sb6gN6kwRAv7CAJ9XR3hglZOkcl9Ai+VHiVt7rahG4QCgjnpF
8jzU463kr62D6UyHFJS2MUc=
=h40a
-----END PGP SIGNATURE-----
--Apple-Mail-12--1015738872--
--===============10844438151143176==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
relaxng-user mailing list
[email protected]
http://relaxng.org/mailman/listinfo/relaxng-user
--===============10844438151143176==--