This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XPath question


> 
> <xsl:variable name="keyName"><xsl:value-of 
> select="substring-after(../../ViewKey, ';')"/></xsl:variable>
> 
> <xsl:apply-templates select="//appInfo[ViewName='viewName' 
> and ViewKey=$keyName]/Structure[@StructId='VFM']/Row[@DEPEND='001']" >
> 
> If I use an explicit string in place of $keyName, it works. 
> 

Perhaps the context node at the time of doing the xsl:variable was
different from the context node at the time of xsl:apply-templates?

This isn't the cause of the trouble, but

<xsl:variable name="keyName"><xsl:value-of 
> select="substring-after(../../ViewKey, ';')"/></xsl:variable>

is a grotesquely convoluted (and probably expensive) way of doing

<xsl:variable name="keyName"
   select="substring-after(../../ViewKey, ';')"/>

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]