Tableau dans template = bug?
Salut à tous,
J'ai un problème que je n'ai jamais vu auparavant : j'ai un morceau de code archi simple qui me donne un tableau; il marche très bien dans le template principal, et ne marche pas une fois inséré dans un template dédié.
Mon tableau de dingue :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
<table>
<thead>
<tr><th colspan="2">Objects</th></tr>
</thead>
<tbody>
<xsl:for-each select="//object">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="documentation"/></td>
</tr>
</xsl:for-each>
</tbody>
</table> |
Je le mets après mon <body> : parfait.
Je le mets dans un template :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <xsl:template name="displayAllObjects">
<table>
<thead>
<tr><th colspan="2">Objects</th></tr>
</thead>
<tbody>
<xsl:for-each select="//object">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="documentation"/></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:template> |
et je l'appelle là ou il était dans le body :
Code:
<xsl:call-template name="displayAllObjects"/>
Et là c'est le drame:
http://s3.noelshack.com/uploads/imag...42_exemple.jpg
Quelqu'un a une idée ?
Merci d'avance,
Chato