|
Subject: RE: attributes ordering From: Samuel Yang <syang@xxxxxxxxxxxxxxxxxx> Date: Wed, 22 Sep 1999 16:03:00 -0700 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: FO. Is XSL FO realy XML? Re: a, Stephen Deach | Thread | Sorting attributes with XSL - Is th, XSL Mailing List |
| Sorting attributes with XSL - Is th, XSL Mailing List | Date | RE: How to use xslt to transform xm, Michael Teigman |
| Month |