RE: [xsl] Current Context and document()

Subject: RE: [xsl] Current Context and document()
From: "Dion Houston" <dionh@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Feb 2003 13:19:55 -0800
Hi Marty:

Try saving the current node to a variable at the top of your template...

<xsl:variable name="curNode" select="."/>

And then refer to it later on...

<xsl:value-of select="$curNode/@name"/>



-----Original Message-----
From: Marty McKeever [mailto:marty.mckeever@xxxxxxxxxx] 
Sent: Friday, February 21, 2003 1:00 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx

When iterating through elements in an external document('foo.xml'),
how can i access the current node of the internal DOM?  I thought
would work, but apparently not.

<xsl:template match="form">
  <xsl:for-each select="document('foo.xml')/root/item">

    <xsl:value-of select="."/>
    <!-- value of foo.xml/root/item[i] -->

    <xsl:value-of select="current()/@name"/>
    <!-- attribute of the matched form element ?? -->


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread