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

Re: Should we care about elements order ?

  • From: "Paul W. Abrahams" <abrahams@v...>
  • Date: Mon, 23 Oct 2000 14:45:10 -0400

order among elements
Ronald Bourret wrote:

> Eric van der Vlist wrote:
> > 1) Should we always pay attention to the relative order of the elements
> > within XML documents ?
>
> First, I think it is important here to clarify that there are three
> types of order in an XML document: hierarchical order, sibling order,
> and document order.
>
> Hierarchical order determines who is the parent and who is the child. I
> cannot think of any reasonable cases for which hierarchical order is not
> important.
>
> Sibling order is the order in which siblings (elements/text with the
> same parent) appear in that parent. To me, this discussion is about
> sibling order, so more about that in a moment.
>
> Document order is the order in which elements/text appear in the
> document. This is important in some cases (such as XSLT), unimportant in
> others. Note that document order can be determined from hierarchical and
> sibling order, and that if you preserve hierarchical and sibling order
> you preserve document order.
>
> So the question is, is sibling order always important. The answer is,
> absolutely not. Here's the two cases:
>
> In general, sibling order is always important in document-centric
> applications.
> On the other hand, sibling order is often unimportant in data-centric
> applications. The reason for this is that objects have no notion of order
> among their
> properties.

For what it's worth, the XML Infoset lists among the core properties of an
element both its children and its attributes.   The children constitute an
ordered list of references, while the attributes constitute an unordered
set.   Of course, one could say, as you do, that in particular cases the
ordering of elements, though it exists, has no useful significance; the
elements are in a particular order only because they have to be in *some*
order.

Paul Abrahams



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.