[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Numbering

Subject: RE: Numbering
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 11 Oct 2001 09:20:53 +0100
RE:  Numbering
Variables don't work like that in a functional language.

Use position().

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of kobily
> Sent: 10 October 2001 18:14
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Numbering
> 
> 
> Hi !!!
> 
> I have to create a list of options:
> <select>
> <option value="1">Some
> <option value="2">some-elem
> <option value="3">other elem
> </select>
> 
> This should be only for the elements that have content (tgis 
> have been 
> solved), my problem is to give the number of each elem. I 
> can´t increase 
> a variable.
> I´m using:
> 
> <xsl:variable name="values">0</xsl:variable>
> <xsl:for-each select="elem">
>     <option><xsl:attribute name="value"><xsl:value-of 
> select="$values + 
> 1"/></xsl:attribute><xsl:value-of select="elem"/></option>
> </xsl:for-each>
> 
> But the variable "values" is always 1.
> 
> 
> Thanks
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • Numbering
    • kobily - Wed, 10 Oct 2001 13:24:27 -0400 (EDT)
      • Jeni Tennison - Wed, 10 Oct 2001 13:50:42 -0400 (EDT)
        • kobily - Wed, 10 Oct 2001 14:30:24 -0400 (EDT)
      • Michael Kay - Thu, 11 Oct 2001 04:26:41 -0400 (EDT) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.