This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XPath question
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 10 May 2002 17:55:36 +0100
- Subject: RE: [xsl] XPath question
- Reply-to: xsl-list at lists dot mulberrytech dot com
>
> <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