XML 1.0 - query - ambiguous syntax in choice/seq ?

Regarding syntax rules [48]-[50], if I'm parsing for a cp and see the text:

 (Foo)*

is the "(Foo)" a choice or a seq?  Unless there is a clarification 
somewhere, it seems to me to match both.  And I'm uncomfortable 
picking one or the other arbitrarily.

Perhaps you should define [a]:

 choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'
    seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'

OR [b}:

 choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'
    seq ::= '(' S? cp ( S? ',' S? cp )+ S? ')'

In fact, I believe the draft spec [a], presumably to avoid just this
ambiguity.  Why was a change made to introduce an ambiguity?

- - - - -

By the way, I mentioned this during draft stages but it was not fixed:
I really think ('?' | '*' | '+') deserves a syntax rule
of its own for modularity since it occurs in at least two rules 
[47] and [48] and since it is a proper conceptual entity of its own.

Received on Sunday, 3 May 1998 19:38:45 UTC