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

RE: attributes ordering

Subject: RE: attributes ordering
From: Samuel Yang <syang@xxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Sep 1999 16:03:00 -0700
samuel yang
Elements are ordered, and attributes are unordered.  Therefore, if you want
to get your attributes in "document order", you'll have to make them
subelements instead of attributes.

Instead of:

	<ATOM PHASE="GAS" NAME="Hydrogen" SYMBOL="H" ATOMIC_NUMBER="1"
ATOMIC_WEIGHT="1.00794"/>

you could use:

	<ATOM>
		<PHASE>GAS</PHASE>
		<NAME>Hydrogen</NAME>
      	<SYMBOL>H<SYMBOL>
		<ATOMIC_NUMBER>1</ATOMIC_NUMBER>
		<ATOMIC_WEIGHT>1.00794</ATOMIC_WEIGHT>
	</ATOM>

or something like:

	<ATOM>
		<PHASE value="GAS"/>
		<NAME value="Hydrogen"/>
      	<SYMBOL value="H"/>
		<ATOMIC_NUMBER value="1"/>
		<ATOMIC_WEIGHT value="1.00794"/>
	</ATOM>

Sam


-----Original Message-----
From: pandeng@xxxxxxxxxxxx [mailto:pandeng@xxxxxxxxxxxx]
Sent: Wednesday, September 22, 1999 2:03 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: attributes ordering


On Wed, 22 Sep 1999 16:14:41 -0400, you wrote:

>if the order is important, how can I keep the attribute order instead
>of using @*?

Attributes are intrinsically unordered. If you are doing some
processing that relies on the attributes being in some particular
order, you are going to have to rethink what you're doing.

-Steve


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.