|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Conditional Assigining
Team,
<xsl:variable name="ID">-1</xsl:variable> <xsl:for-each select="Section[parentID='0']"> <xsl:if test="$ID=-1"> <xsl:variable name="ID" select="sectionID" /> </xsl:if> id <xsl:value-of select="$ID"/> Output: ----------- id = -1. In the first instance. ********************** Please have a look on the above XML. The scope of the ID is getting lost once i get exit from the if loop which is not i want. The value of the global variable ID has to be set inside IF and then that should be visible to outer functions as well.
When the loop starts executing first time it will take the value from the sectionID and from the next time onwards i shall give the value for the variable id. Is that possible to do in XSL?? Can anyone help me out please??? Cheers Srini From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: Problem of syntax of filter ? Date: Wed, 16 May 2001 15:48:29 +0100
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
|

Cart








