Kohsuke KAWAGUCHI wrote:
>
> P.S. I think we are looking for a constraint that makes it TDLL(1),
> rather than making it unambiguous.
I have changed the name. The new name is "restrained competition".
In XML Schema, a tag name within a single content model can have
at most one type. I call this restriction "single type", and your
proposal is basically based on "single type".
Kohsuke KAWAGUCHI wrote:
> The following constraints might work:
>
> 1. the parent element/attribute (of key/keyref) must has a simple name.
> 2. its name may not be accepted by any other elements/attributes that
> are in the same content model.
The same constraint should be applied to ancestors recursively. If <grammar>
or <define> appears, recursion stop there. Moreover, if the key/keyref
appears as a non-immediate subordinate of <define>, the same constraint
should be applied to all <ref> elements that reference to this <define>.
Cheers,
Makoto