[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Questions on XML Schema "all" and RELAX NG "interleave"


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.

See also Tommie Usdin's paper from Extreme last year:

  http://www.idealliance.org/papers/extreme02/html/2002/Usdin01/EML2002Usdin01.html

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

Jeni

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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.