[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: putting number values
|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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|