This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: attribute order
- From: "Andrew Welch" <awelch at piper-group dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 22 Feb 2002 11:31:19 -0000
- Subject: RE: [xsl] attribute order
- Reply-to: xsl-list at lists dot mulberrytech dot com
>Current releases of Saxon will output attributes in the order they are
>processed in the stylesheet, unless you attempt to output two attributes
>with the same name. But attributes copied from the source document can be
>reordered by the XML parser (and sometimes are).
FWIW, Msxml3 (and Instant Saxon) seem to maintain the order in which the
attributes are written (both inline and as an attribute-set). If two
attributes have the same name, the position of the first occurance is used
with the value of the last occurance, and all other occurances are dropped:
<xsl:attribute-set name="foobar">
<xsl:attribute name="z">26</xsl:attribute>
<xsl:attribute name="a">1</xsl:attribute>
<xsl:attribute name="b">2</xsl:attribute>
<xsl:attribute name="z">26(b)</xsl:attribute>
</xsl:attribute-set>
produces z="26(b)" a="1" b="2"
Is this useless information? I suppose it is friday...
andrew
===
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/02
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list