[relaxng-user] examples of application of interleave?

Eric van der Vlist vdv at dyomedea.com
Tue Sep 30 17:01:50 ICT 2003


On Tue, 2003-09-30 at 16:50, David Tolpin wrote:
> > On Tue, 2003-09-30 at 16:23, David Tolpin wrote:
> > > Hi,
> > > 
> > > I have difficulty trying to find real-life examples of application of 'interleave'.
> > > Where can I look at a schema with it?
> > 
> > Any document oriented application (such as XHTML 2.0 [1]) contain good
> > examples, but I do believe that data oriented applications should take
> > advantage of this feature too even though there are probably less
> > examples in this domain.
> > 
> > [1] http://www.w3.org/TR/xhtml2/xhtml20_relax.html
> 
> The only use for interleave in XHTML 2.0 is to combine header.contents from various
> modules;

There is also an hidden use of "interleave" in each "mixed" template
since "mixed" is a shortcut for "interleave" with a "text" pattern.

>  and in this context there is no order significance within the patterns
> to be combined. This part can be done easily without interleave.

How can you do this (I mean combining without order) without interleave?

> I am trying to solve a problem for which every construct must be converted into a
> set of productions and am having difficulty translating interleave into a set
> of productions in general case. It is possible and easy in general, but complicates
> my particular algorithm. 

Interleave does complicate the algorithm, that's why it has been kept
away from other schema languages, but it gives a flexibility to users
which is unique amongst schema languages...

> I am considering dropping interleave and trying to find out what kind of grammars
> will be beyond the scope. I haven't yet seen one.

Again, any mixed content model is in this scope.

Eric
-- 
See you in Philadelphia for XML 2003.
                                    http://www.xmlconference.org/xmlusa/
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



More information about the relaxng-user mailing list