Subject: RE: [xsl] putting number values From: "Allan Jones" <allan.jones@xxxxxxxxxxxx> Date: Tue, 4 Mar 2003 10:49:16 -0000 |
|in the bellow code you can see that with the <xsl:value-of |select="name"/> i writte the value of name tag with this i get |100 values. |<xsl:for-each select="registro"> |<xsl:value-of select="name"/> |</xsl:for-each> |but with xslt how can i number them? |how can i put in this method: |1 value of name 1 |2 value of name 2 |.... |how can i put the number, the result number? |thanks If they're all separate elements (and your for-each select implies that this is the case) you can probably just use the position() function: <xsl:for-each select="registro"> <xsl:value-of select="concat(position(), ' ', name)"/> </xsl:for-each> Here, I've used concat to format the output text a little. The other option might be to use <xsl:number />, which would number all the sibling elements consecutively. Have a look at Michael Kay's XSLT programmer's reference for more information about these. Regards Allan Jones Tel: 0121 506 9111 Fax: 0121 506 9112 ------------------------------------------------------------------------ ---------------- HYFINITY LIMITED. Registered in England & Wales 4136884. Registered Office: Blythe Valley Innovation Centre, Central Boulevard, Blythe Valley Park, Solihull, West Midlands, B90 8AJ. Tel: +44 (0)121 506 9111. The information contained within this email, together with any attachments, is intended solely for the named recipient(s) and may contain privileged and/or confidential information. If you receive this in error, please notify hyfinity limited immediately and delete this e-mail. Any views or opinions represented in this e-mail are solely those of the author and do not necessarily represent those of hyfinity or its affiliate companies. Although this e-mail and its attachments have been scanned for the presence of computer viruses, hyfinity will not be liable for any losses as a result of any viruses being passed on. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] putting number values, Dionisio Ruiz de Zar | Thread | [xsl] tu put one value into the rad, Dionisio Ruiz de Zar |
RE: [xsl] Setting up style sheets i, Allan Jones | Date | Re: the future (was RE: [xsl] Locat, Andrew Watt |
Month |