[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [relax-ng-comment] interleave vs mixed
I would appreciate some clarification on the difference between interleave and mixed. I've read the section in the tutorial but remain confused. If I have a model thus, <interleave> <zeroOrMore> <element name="A"><text/></element> </zeroOrMore> <zeroOrMore> <element name="B"><text/></element> </zeroOrMore> <zeroOrMore> <element name="C"><text/></element> </zeroOrMore> </interleave> I seem to be able to have arbitrary numbers of <A>, <B> and <C> elements in any order, e.g. <C>c</C><A>a</A><B>b</B><A>a</A><C>c</C><C>c</C> i.e. an interleaving of the sequences <A>a</A><A>a</A> <B>b</B> <C>c</C><C>c</C><C>c</C> If I change the keyword to mixed, (which adds a <text/> element to the interleave) it doesn't quite give me the result I'd expect, which, in the case above, would be the same as <zeroOrMore> <choice> <text/> <element name="A"><text/></element> <element name="B"><text/></element> <element name="C"><text/></element> <choice> </zeroOrMore> Is the text regarded as a single "token" when it comes to interleaving, or can zero or more characters within the string constitute a token? Is interleave primarily meant for element only content models? If I use mixed, where can the text go in the example above? If I want control over occurrence frequecies (0, 1, >1) of elements but want to allow text interspersed between these elements, how do I achieve this in RELAXNG? Regards Michael -- Michael Leditschke AMMD Professional Services Pty Ltd +61 407 671 480 "The question of whether computers can think is like the question of whether submarines can swim" --Edsger W. Dijkstra, deceased 6 August 2002
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC