mehrere Attribute

anmae

Erfahrenes Mitglied
hallt
ich habe in einem xml entry 2 Attribute.
<a href="" class="">link</a>
ich möchte das ganze mittels xslt in html wandeln.

mit einem Attribut geht das wunderbar, aber das zweite geht nie.
hier mein code:
Code:
<xsl:template match="a">
 <a>
    <xsl:attribute name="href">
        <xsl:value-of select="@href" />
    </xsl:attribute>
    <xsl:attribute name="class">
        <xsl:value-of select="@class" />
    </xsl:attribute>    
    <xsl:apply-templates/>
 </a>
</xsl:template>

Danke
 
Zurück