You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frank Rocholl <fr...@gmx.li> on 2006/02/22 11:13:46 UTC

Order of attributes in XSL Transformation

Dear all,

I'ld like to generate a simple xml/html page with a xsl transformation.
I wondering that I get the atrributes in an other order than I've given
in the xsl stylesheet. 

Here are the files:

### BEGIN starget.xml ###
<?xml version="1.0" encoding="UTF-8"?>
<Document>
  <Item file="http://www.hottemax.org" target="_blank"/>
</Document>
### END starget.xml ###



### BEGIN starget.xsl ###
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
  <xsl:template match="/">
    <xsl:apply-templates select="Document/Item"/>
  </xsl:template>
 
  <xsl:template match="Item">
    <a href="{@file}" target="{@target}">Testlink</a>
  </xsl:template>
</xsl:stylesheet>
### END  starget.xsl ###

### BEGIN sitemap.xmap entry ###
<map:pipeline match="de_DE/test/starget.xml">
   <map:generate src="de_DE/test/starget.xml"/>
   <map:transform type="xslt" src="de_DE/test/starget.xsl"/>
   <map:serialize type="xml"/>
</map:pipeline>
### END  sitemap.xmap entry ###


I get the output:
### BEGIN OUTPUT ###
<a target="_blank" href="http://www.hottemax.org">Testlink</a>
### END OUTPUT ###


But I would expect:
<a href="http://www.hottemax.org" target="_blank">Testlink</a>

Many thanks for help


Frank


-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse f�r Mail, Message, More +++

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org