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

RE: Determining the context node

Subject: RE: Determining the context node
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 13 Apr 2006 11:23:58 +0100
determine node name path
You can get the name of the context node using name(). Saxon has an
extension function saxon:path() which gives you a full path to a node; I
believe there are portable solutions to this problem at


but it seems to be down.

Michael Kay

> -----Original Message-----
> From: Allison Bloodworth [mailto:abloodworth@xxxxxxxxxxxx] 
> Sent: 13 April 2006 01:15
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Determining the context node
> Hi, 
> I sometimes get confused about what the context node is when 
> I'm writing a
> complicated XSL stylesheet. I'm wondering if someone can 
> suggest an easy way
> to determine what node I'm on (e.g. by using some code to 
> print this info
> out to my output)? 
> I've tried xsl:copy, xsl:copy-of, and xsl:value-of, but I 
> don't want to know
> the value of the element, I want to know the name of the 
> element (e.g. for
> <EventWebsite>www.berkeley.edu</EventWebsite> I want to know 
> that I'm on
> EventWebsite, not that the value is www.berkeley.edu). Also, 
> because most of
> my elements contain other elements instead of text, often 
> doing xsl:copy
> (which is more rational than using copy-of) doesn't get me anything. I
> assume there's probably an easy XPath expression for this, 
> but even after
> doing quite a bit of research I can't find it.
> Thanks for any suggestions on this!
> Allison Bloodworth
> Principal Administrative Analyst
> Technology Program Office
> University of California, Berkeley
> (415) 377-8243
> abloodworth@xxxxxxxxxxxx

Current Thread


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.
First Name
Last Name
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.