Global variable

admin

Administrator
Staff member
When I try to use a global variable. I get an error - "xsl variable may notbe used here"I have given below a snapshot of my xsl file. I want to use a varible sinceI want to replace all 100 by variable name.Thanks for the help in advance.<?xml version='1.0'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:variable name="parentID" select='101'/><xsl:template match="/"><xsl:apply-templates/></xsl:template><xsl:template match="locations"><nobr><xsl:apply-templates/></nobr></xsl:template><xsl:template match="location"><DIV class="nodeheader"><xsl:if test="@parent[.='101']"><IMG SRC=http://forums.devx.com/archive/index.php/"images/foldericon.gif"><xsl:attribute name="id">nodeimage<xsl:value-ofselect="@id"/></xsl:attribute><xsl:attribute name="onDblClick">getParentID();</xsl:attribute></IMG><xsl:value-of select="@name"/></xsl:if></DIV><xsl:apply-templates/></xsl:template></xsl:stylesheet>
 
Back
Top