RE: [xsl] Referencing original root when using document function

Subject: RE: [xsl] Referencing original root when using document function
From: Jarno.Elovirta@xxxxxxxxx
Date: Tue, 1 Apr 2003 14:40:12 +0300
Hi,

> <xsl:for-each select="document('')/*/par:paramfields/par:paramfield">
> 	<xsl:variable name="value" select="./@field"/>
> 	<xsl:apply-templates select="/traps/trap[@type=$value]"/>
> </xsl:for-each>
> 
> However this doesn't work. How to I indicate in the Xpath 
> expression, that I
> want to use my original document again ?

e.g. with a top-level variable

  <xsl:variable name="root" select="/" />

and

  <xsl:apply-templates select="$root/traps/trap[@type=$value]"/>

Cheers,

Jarno - Front Line Assembly: The Blade

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


Current Thread