Re: Re: Jing and libxml2 is right, Trang is wrong
David Tolpin <[email protected]> Sat, 6 Mar 2004 12:12:04 +0400 (AMT)
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
> > It's done on purpose because > > <quote src=" > http://lists.oasis-open.org/archives/relax-ng/200301/msg00006.html"> > > The reason why the latter is forbidden is that there's > a tendency to use it assuming it means > > <start> > <choice> > <ref name="foo"/> > <ref name="bar"/> > </choice> > </start> > > </quote> > > Eric Eric, 1) at the URL below, a patch for trang-20030619 that generates correct patterns for start with implicit grouping. http://ftp.davidashen.net/misc/trang-20030619-sig.patch 2) I tend to disagree with James. Either implicit grouping is not allowed anywhere, or it is consistently allowed; start = foo,bar is perfectly correct and normally used in nested grammars. Nested grammars are very useful in conjunction with parentRef elements. Trying to fix a hypothetic bug James introduced a real one. 3) In cases where start = foo, bar is a bug, <start> <ref name="foo"/> <ref name="bar"/> </start> does not have a chance to be misused as it were a choice, because this pattern is forbidden in top-level grammars. Cases where start = foo, bar is correct is used in nested grammars; and in most cases nested grammars are used by people who know what they are doing. I think this artificial limitation should be lifted. David Tolpin http://davidashen.net/