re,
indeed perhaps if i explain more what i would like to do, you could give
me better solution than mine :
a part of my xml file looks like that :
- <xsl:for-each select="toto">
- <tr>
<xsl:apply-templates select="titi" />
<xsl:apply-templates select="tata" />
</tr>
</xsl:for-each>
the templates for the sub elements looks like that :
<xsl:template match="titi">
- <xsl:choose>
- <xsl:when test="current()=''">
- <td>
<input border="0" name="test/toto/titi" size="10" type="text" />
</td>
</xsl:when>
- <xsl:otherwise>
- <td>
<xsl:value-of select="." />
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tata">
- <xsl:choose>
- <xsl:when test="current()=''">
- <td>
<input border="0" name="test/toto/tata" size="10" type="text" />
</td>
</xsl:when>
- <xsl:otherwise>
- <td>
<xsl:value-of select="." />
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
the objectif is for the input tags to pass all the couples (name, value)
to a server.
The problem is the following to determine a soltiuon to create these
couples (name, value) :
if i have twice the toto element, i will have twice the titi and tata
sub elements. So, i have to distinguish the two input tags per sub
element by their "name" attribute! like this for instance :
name="test/toto/titi1" and name="test/toto/titi2", for the titi sub
element. This was the reason why i would like to create a counter on the
toto element.
if you have an other solution, it would be fine!!!!!!!
many thanks in advance
Laurence Mossuz
--
Laurence MOSSUZ
LAPP Service Informatique
Chemin de Bellevue BP 110
74941 Annecy-Le-Vieux CEDEX
Tel : 04 50 09 17 31 _ Fax : 04 50 27 94 95
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list