Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<xsl:when test="position()=1">

Status
Not open for further replies.

jeorg

Programmer
Dec 2, 2002
1
DE
this code doesn't work

if I do position()!=last it works , but I want to apply a different style on the first element only

------------------------------------------------------------

<xsl:template match=&quot;/conditions/condition/para&quot;>
<xsl:choose>
<xsl:when test=&quot;position()=1&quot;>
<div class=&quot;paraDebut&quot;>
<xsl:value-of select=&quot;.&quot;/>
</div>
</xsl:when>
<xsl:eek:therwise>
<div class=&quot;paraNormal&quot;>
<xsl:value-of select=&quot;.&quot;/>
</div>
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>

------------------------------

do you know what is wrong ?

thank_you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top