[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Current Context and document()

Subject: RE: Current Context and document()
From: "Dion Houston" <dionh@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Feb 2003 13:19:55 -0800
what is xsl current context
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"/>

HTH!

Dion

-----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
current()
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:for-each>
</xsl:template>


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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.