xsl-list
[Top] [All Lists]

Re: Variables

2003-08-01 03:56:36
AROSO Jose Antonio wrote:
When I save something in a variable in a loop for-each i dont have access to
this variable out of the loop for-each.
...
<xsl:for-each select="Attribute_Groups/Attribute">
        <xsl:variable name="aname" select="@Name" />
        ........
</xsl:for-each>

How can i access the variable aname out of the loop for-each?

You can't. The scope of a variable is the element where it was
declared. Your problem is that you want to program XSLT the same
way you'd do it in, say, JavaScript. If you give a description
of the original problem someone will show you a XSLT solution.

J.Pietschmann



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



<Prev in Thread] Current Thread [Next in Thread>