![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Use of a variable Use of a variableTo: NULL Date: 11/2/2007 2:56:00 AM
Hi to all,
I would like to change the value of a variable during a loop in xsl, i have
the following xslt sheet.
As you see at the begining of the document i declared the variable called
serviceid, and i would like to change to value 1 foreach node im currently
navigating.
Is it possible?
Thanks a lot.
Kind Regards.
Josema.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:variable name="serviceid"></xsl:variable>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="DocumentElement/*"/>
</xsl:template>
<xsl:template match="DocumentElement/*">
<xsl:variable name="position" select="position()"/>
<p>
ServiceStored: <xsl:value-of select="$serviceid"/></p>
<xsl:variable name="serviceid" select="1"></xsl:variable>
</xsl:template>
</xsl:stylesheet>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
