[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng] Control of the combinations of patterns
> I allow grammars which will include this one to combine this definition > by choice or interleave while if I write: > > foo = &bar > > I forbid combinations by choice and if I write > > foo = |bar > > I forbid combinations by interleave. This doesn't seem very useful to me. If you forbid this, then I can instead completely override the definitions instead of using combine. In the context of RELAX NG, this sort of thing is at most a hint to users that want to customize a schema, and, as such, I think some conventional annotation attributes would be enough: eg an annotation attribute on a define that says whether is/is not intended to be combined with choice/interleave. > Questions: > - would it be useful to be able to forbid both (similar to the notion > of "final" definition)? > - would it be usefull to impose that a combination is applied (notion of > "abstract" definition)? You can get something very similar to an abstract definition by using notAllowed. For example, in the original schema use: a = notAllowed Then in the overriding schema use: a |= element .... James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC