RNC and repeatedPrimary
"Jeff Rafter" <[email protected]> Fri, 7 May 2004 09:29:25 -0700
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <0ae401c43450$761963e0$b101a8c0@ARIMATHEA> |
Everywhere I look I see this kind of construction (which may be the answer
to the question I am about to ask), but I have always wondered why the *, +,
? operators are at the end of constructions. Wouldn't it make more sense for
them to be at the start of a construction? For example:
foo = element foo { (bar1, bar2, bar3+, bar4)* }
could just as easily be:
foo = element foo { *(bar1, bar2, +bar3, bar4) }
Especially in the case of RNC, where a repeatedPrimary is wrapped in
something like <zeroOrMore>x</zeroOrMore> this makes sense, as it allows
parsers/producers to be written in a streaming mode.
I am sure there is a good reason, I am sure I am missing something obvious--
I have just always wondered.
Thanks,
Jeff Rafter