Attributes order after XSLT transformation

Hi - this is my another problem wyth xslt transformation

I'm using XSLT below

<xsl:output method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no"/>

<xsl:template match="/">

<xsl:element name="ofe:ofe" namespace="urn:ofe">
<xsl:attribute name="wersja">
<xsl:text>1.0</xsl:text>
</xsl:attribute>
</xsl:element>


and I'm getting result:

<?xml version="1.0"?>
<ofe:ofe wersja="1.0" xmlns:ofe="urn:ofe"/>


which it's ok but order of parameters is not correct
it should be

<?xml version="1.0"?>
<ofe:ofe xmlns:ofe="urn:ofe" wersja="1.0" />

Please help - what I have to do to change it?
Big thanx in advance.
[826 byte] By [Mr. Tomaszek] at [2007-11-19 8:00:01]
# 1 Re: Attributes order after XSLT transformation
It would surprise me if that was possible. At least not consistently.
In XML attributes may not be assigned an order.

Most likely the XSL processor stores the 2 attributes in a hash table before outputting them, thus their order depends on the order of their hash key values, which could be anything.

I'am sorry this was probably not the answer you wanted. :cry:
khp at 2007-11-10 3:27:35 >
# 2 Re: Attributes order after XSLT transformation
Hi,
maybe I can add one attribute and later (in loop or something) add another assuring in that way correct order of them? Do you think it will be possible?
Mr. Tomaszek at 2007-11-10 3:28:38 >
# 3 Re: Attributes order after XSLT transformation
No, there's a limit to how much later you can add more attributes to an element in XSL. As soon as you begin producing element content you cannot add more attributes.
khp at 2007-11-10 3:29:36 >
# 4 Re: Attributes order after XSLT transformation
I'am sorry this was probably not the answer you wanted. :cry:
Yes - really. Anyway; thanx for your time. If anything sometime comes to your mind please post it it here. Thanx.
Mr. Tomaszek at 2007-11-10 3:30:42 >