[relaxng-user] specifying attribute choice

jcowan at reutershealth.com jcowan at reutershealth.com
Mon Feb 9 12:46:59 ICT 2004


DuCharme, Bob (LNG-CHO) scripsit:

> I'm trying to figure out how I can specify that an element must have at
> least one of a certain set of attributes and may have the others as well. 

An obvious approach would be to use NRL to apply two different schemas.
The first makes all the attributes optional.  The second, which should fail,
has no attributes.  If you pass the first and fail the second, you win.

-- 
John Cowan      http://www.ccil.org/~cowan      jcowan at reutershealth.com
Be yourself.  Especially do not feign a working knowledge of RDF where
no such knowledge exists.  Neither be cynical about RELAX NG; for in
the face of all aridity and disenchantment in the world of markup,
James Clark is as perennial as the grass.  --DeXiderata, Sean McGrath


More information about the relaxng-user mailing list