[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"

  • To: "'Henry S. Thompson'" <ht@c...>
  • Subject: RE: Questions on XML Schema "all" and RELAX NG "interleave"
  • From: "Alessandro Triglia" <sandro@m...>
  • Date: Mon, 6 Jan 2003 01:38:15 -0500
  • Cc: "'[XML-DEV]'" <xml-dev@l...>
  • Importance: Normal
  • In-reply-to: <f5b3co6hqk0.fsf@e...>

xml schema all

> -----Original Message-----
> From: ht@i... [mailto:ht@i...] On Behalf Of 
> Henry S. Thompson
> Sent: Sunday, January 05, 2003 23:05
> To: Alessandro Triglia
> Cc: [XML-DEV]
> Subject: Re:  Questions on XML Schema "all" and 
> RELAX NG "interleave"
> "Alessandro Triglia" <sandro@m...> writes:
> > One concrete question I might ask is, If I have an "all" group of 3 
> > elements in a schema, and an instance contains the 3 
> elements in some 
> > order (any order being valid), how much does it matter if a tool 
> > re-orders the elements on reception, and presents them to 
> the user in a
> > fixed order?   Could I justify such a behavior of the tool by saying
> > that the order in an "all" group is not important?   What are the
> > chances that the order *is* important and the user 
> absolutely wants it 
> > to be preserved?
> 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.
> > Another possible question is, How does a user (either sending or
> > receiving) benefit, in general, in RELAX NG, from the ability to 
> > interleave, say, elements A (multiple), B (multiple), and C 
> (multiple) 
> > of an "interleave", as opposed to sending all As, then all 
> Bs, then all
> > Cs?  Or possibly all Cs, then all Bs, then all As?   Why is 
> "interleave"
> > more useful than "all", and why is "all" more useful than 
> "sequence"? 
> > What do these things enable me to do, which a mere "sequence" does 
> > not? Why do I need the extra flexibility?
> As per the above, if you need to reflect some underlying 
> ordering, then you need a *ed choice or an all.  Suppose for 
> instance you have a queue of transactions to be processed, 
> say some deposits and some withdrawals.  If you wish their 
> order in the queue to be represented by their order in the 
> document, you can't simply put all the deposits first 
> followed by all the withdrawals.
> Hope this helps

Many thanks, it surely helps.  

I would like to hear other people's views as well.


> ht
> -- 
>   Henry S. Thompson, HCRC Language Technology Group, 
> University of Edinburgh
>           W3C Fellow 1999--2002, part-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 
> 131 650-4440
> 	    Fax: (44) 131 650-4587, e-mail: ht@c...
> 		     URL: http://www.ltg.ed.ac.uk/~ht/
>  [mail really from me _always_ has this .sig -- mail without 
> it is forged spam]


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.
First Name
Last Name
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.