RE: specifying attribute choice
David Tolpin <[email protected]>
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
> From [email protected] Tue Feb 10 00:53:46 2004 > Date: Mon, 09 Feb 2004 15:42:25 -0500 > To: [email protected] > From: "G. Ken Holman" <[email protected]> > Subject: RE: [relaxng-user] specifying attribute choice > Content-Type: text/plain; charset="us-ascii"; format=flowed > > At 2004-02-09 14:25 -0500, DuCharme, Bob (LNG-CHO) wrote: > >Thanks Ken! That worked. Maybe I was misunderstanding the problem of the > >original one, though, because the syntax of the solution still seems to tell > >me that multiple x attributes are OK in the element. > > But that wouldn't be well-formed. My reasoning was that a well-formedness > checker would stop the XML instance before the semantics of RELAX-NG > validation would kick in. So the fact that the semantics might allow two > "x" attributes is moot because it would never have the opportunity to check > two "x" attributes. The original solution, with group (the same as interleave for attributes) does not work because of restriction 7.1.2, namely, oneOrMore//group//attribute is not allowed. And it is not what you want anyway. oneOrMore//choice//attribute is allowed, Ken is right. It specifies the grammar you need because of well-formedness restriction. David Tolpin