[relaxng-user] A question on content models

K. Ari Krupnikov ari at lib.aero
Wed Sep 24 09:25:59 ICT 2003


James Clark <jjc at jclark.com> writes:

> Murata-san has mostly covered this already but since I had my reply
> mostly written already I'll send it as well.
> 
> > What's the difference between empty and
> > notAllowed in this context?
> 
> The following analogy may help (or it may just confuse things!): if
> you think of choice as addition and interleave as multiplication, then
> notAllowed is like 0 and empty is like 1.
> 
> Whether to use notAllowed or empty in this context depends on whether
> you are going to use combine="choice" or combine="interleave". If
> combine="choice" then use notAllowed; if combine="interleave" then use
> empty.  That's because X | notAllowed is equivalent to X for any
> pattern X; similarly, X & empty is equivalent to X for any pattern X.

OK, it all makes sense now. Conjunction for universal qualifiers,
disjunction for existential?

Ari.


More information about the relaxng-user mailing list