OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Questions on XML Schema "all" and RELAX NG "interleave"

[ Lists Home | Date Index | Thread Index ]



> -----Original Message-----
> From: Jeni Tennison [mailto:jeni@jenitennison.com] 
> Sent: Monday, January 06, 2003 05:22
> To: Alessandro Triglia
> Cc: '[XML-DEV]'
> Subject: Re: [xml-dev] Questions on XML Schema "all" and 
> RELAX NG "interleave"
> 
> 
> Hi Alessandro,
> 
> Henry Thompson wrote:
> >> The chances ought to be high if the <all> group is being used 
> >> responsibly (which it often isn't, in my experience). 
> Let's approach 
> >> this from the other side -- if an element is declared to 
> contain a, 
> >> then b, then c as children, then the relative order of a, 
> b and c in 
> >> an instance carries no semantics. From this Occam suggests that in 
> >> cases where there is no intention to convey different 
> semantics with 
> >> different order among siblings, a sequence should always 
> be used, to 
> >> avoid potential misunderstanding. _If_ this argument is 
> persuasive, 
> >> then you should _only_ use <all> when order _does_ matter, 
> in which 
> >> case re-arrangement changes the meaning of the document 
> and should be 
> >> avoided.
> [snip]
> > I would like to hear other people's views as well.
> 
> I agree with Henry. To give an example, in RELAX NG, a common 
> use for <interleave> is for mixed content. If you imagine:
> 
>   <p>
>     A paragraph with <em>emphasised</em> text.
>   </p>
> 
> with the simple schema:
> 
>   element p { text & em* }
>   
> it would be very wrong to move the <em> element to the start 
> of the paragraph -- it would change the meaning of the document.
> 
> There's a distinction between whether the order of elements is
> *constrained* and whether their order is *significant*. all 
> and interleave simply indicate that the order is 
> unconstrained, they say nothing about whether the order is 
> significant. Unfortunately we use "matters" when talking 
> about both of these.


By the way, I have read somewhere about a suggestion to extend <all> to
allow any maxOccurs in the next version of XML Schema.  

Is this likely to happen?

Alessandro


> 
> See also Tommie Usdin's paper from Extreme last year:
> 
 
http://www.idealliance.org/papers/extreme02/html/2002/Usdin01/EML2002Usd
in01.html

which is a great read on precisely this topic.
  
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS