Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XSl Var out of scope XSl Var out of scopeTo: NULL Date: 4/4/2006 8:48:00 AM Hi, This is a snippet of the XML I am dealing with, <LOG_MESSAGE type="START DATATABLE" date="03-04-2006" time="16:45:20" > <MESSAGE_TEXT><![CDATA[\\gbahes75\Projects\AddressService\Datapool\GetTestID.sdd]]></MESSAGE_TEXT> </LOG_MESSAGE> There is a number of <LOG_MESSAGE> elements My aim in the xsl in pseudo code is; IF THE <LOG_MESSAGE> ATTRIBUTE TYPE = "START DATATABLE" THEN GET THE <MESSAGE_TEXT> VALUE END IF This is my XSL <xsl:for-each select = "LOG_MESSAGE"> <xsl:if test="LOG_MESSAGE[type='START DATATABLE']"> <xsl:variable name="host2" select="MESSAGE_TEXT"/> <BR> xsl:value-of select="substring-after($host2,'\')"/> </BR> </xsl:if> </xsl:for-each> note: (I actually want the last field [GetTestID.sdd] of the <MESSAGE_TEXT> but that is a different problem) I am using XSLDebugger, but when I attempt to run the XSL I get the error: 'A reference to variable 'host2' cannot be resolved. The variable or parameter may not be defined, or it may not be in scope' And I am not sure why. Cheers Aidy | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
