Re: [xsl] in-document references

Subject: Re: [xsl] in-document references
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Wed, 8 Jan 2003 13:21:47 -0500

On Wednesday, January 8, 2003, at 06:10 AM, Michael Kay wrote:


You're making things much more difficult than they are. Perhaps you have
overlooked that a path expression can start with a variable reference:

Yes!


<xsl:apply-templates select="define">
  <xsl:with-param name="ref" select="ref"/>
</xsl:apply-templates>

<xsl:template match="define">
  <xsl:param name="ref"/>
  <xsl:value-of select="$ref/ancestor::foo/@bar"/>
</xsl:template>

Thanks! That's so simple.. 8-)


simon

---
www.simonwoodside.com


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



Current Thread