|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: attributes ordering
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








