[XSLT] comment créer une liste de propriétés dans l'attribut style d'une balise
Bonjour,
j'ai un fichier XML qui se présente sous la forme suivante :
Code:
1 2 3 4 5
|
<entry>
<value text-align="left" font-style="" background-color="#FFFFFF" font-weight="" format="General">ANDORRA</value>
<value text-align="center" font-style="" background-color="#FFFFFF" font-weight="bold" format="General" />
</entry> |
Je voudrais, à partir d'un fichier XSL, obtenir le résultat suivant :
Code:
1 2 3
|
<td style="text-align:left; background-color: #FFFFFF">ANDORRA</td>
... |
J'ai essayé quelque chose comme ça
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
<xsl:attribute-set name="list-styles">
<xsl:attribute name="style">
background-color:
<xsl:value-of select="@background-color"/>
</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="value">
<td class="data-1" xsl:use-attribute-sets="list-styles">
<xsl:apply-templates />
</td>
</xsl:template> |
mais ça ne marche pas...
Une idée ?
Merci d'avance.