This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: attribute order




>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]