[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng-comment] Definition of mixed pattern?
Hi Peter, > The 1.0 specification (4.13) defines: > > <mixed> <ref name="font"/> </mixed> > as equivalent to: > <interleave> <ref name="font"/> <text> </interleave> > > Hoever, this does not allow instances like > <body>Some text<font/>some other text</body> My understanding is that your pattern _should_ match instances such as the one above. ( But then, I've been known to be wrong before!) The <text> pattern will match any number of sequential text nodes, so the above instance could be considered as an interleaving of the two sequences <font/> and "Some text" "Some other text" the latter of which is (conceptually) reduced to a single text node. Granted it would _not_ match instances with multiple <font/> elements, such as <body>Some text<font/>some <font/> other text</body> which both your DTD and your rng pattern would. To achieve this you would need to define your mixed pattern as: <mixed> <zeroOrMore> <ref name="font"/> </zeroOrMore> </mized> or perhaps modify the "ref" define pattern itself to suit. cheers, gary
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC