Hallo,
<xsl:variable name="Jan">01</xsl:variable>
<xsl:variable name="Feb">02</xsl:variable>
...
<xsl:value-of select="$Jan" />
Ich habe das jetzt hinbekommen:
~~~xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:arr="http://example.com/XSL/jeena/arr">
<arr:months>
<arr:month n="01">Jan</arr:month>
<arr:month n="02">Feb</arr:month>
<arr:month n="03">Mar</arr:month>
<arr:month n="04">Apr</arr:month>
<arr:month n="05">May</arr:month>
<arr:month n="06">Jun</arr:month>
<arr:month n="07">Jul</arr:month>
<arr:month n="08">Aug</arr:month>
<arr:month n="09">Sep</arr:month>
<arr:month n="10">Oct</arr:month>
<arr:month n="11">Nov</arr:month>
<arr:month n="12">Dec</arr:month>
</arr:months>
<xsl:key name="month" match="arr:month" use="."/>
<xsl:template match="/">
<xsl:for-each select="/rss/channel/item">
<xsl:variable name="month"><xsl:value-of select="substring(pubDate, 9, 3)" /></xsl:variable>
<xsl:for-each select="document('')"><xsl:value-of select="key('month',$month)/@n"/></xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Das erste Problem besteht aber immer noch.
Jeena