RE: examples of application of interleave?

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Organization Dyomedea (http://dyomedea.com)
Message-ID <1064934575.5191.95.camel@delleric>
On Tue, 2003-09-30 at 16:56, DuCharme, Bob (LNG-CHO) wrote:
> >> 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.
> 
> I see it the other way around: to me, ordering matters more in
> document-oriented applications, but less in data-oriented applications. If a
> relational table has columns for firstName, lastName, empNum, homePhone,
> officePhone, hireDate, etc., the ordering of their XML equivalents inside of
> an element that represents a row of that table really doesn't matter to me,
> and probably doesn't to an importing application. I'll bet there are plenty
> of examples there. 

I thin that there is a misunderstanding here and that many users think
that "unordered" models are models where the order doesn't matter which
is very reductive.

What we often call unordered models are models where the schema doesn't
enforce the order and that doesn't mean that the order shouldn't be
considered significant for the application, on the contrary, the fact
that two elements may appear in any order may bring additional
information.

For instance, if I write:

person = element last-name{text}, element first-name{text}

The fact that I enforce a specific order means that I don't know if the
person prefers to get his/her first name before his/her last name, while
if I write:

person = element last-name{text}& element first-name{text},

I can write in my instance document either

<last-name>DuCharme</last-name><first-name>Bob</first-name>

or

<first-name>Bob</first-name><last-name>DuCharme</last-name>

In this case, this "lack" of order is an information by itself!

So, I think that in fact we all agree here :-) ...

Eric

> Bob DuCharme          www.snee.com/bob           <bob@  
> snee.com>  "The elements be kind to thee, and make thy
> spirits all of comfort!" Anthony and Cleopatra, III ii
> _______________________________________________
> relaxng-user mailing list
> [email protected]
> http://relaxng.org/mailman/listinfo/relaxng-user
-- 
If you have a XML document, you have its schema.
                                                  http://examplotron.org
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
------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.