Subject: Re: [xsl] Determining the context node From: Evan Lenz <evan@xxxxxxxxxxxx> Date: Wed, 12 Apr 2006 22:58:56 -0700 |
1. Only two instructions change it: <xsl:for-each> and <xsl:apply-templates> 2. <xsl:call-template> does *not* change the context
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Determining the context n, G. Ken Holman | Thread | [xsl] Modify XML using XSL, Santanu Choudhury |
Re: [xsl] Determining the context n, G. Ken Holman | Date | [xsl] Modify XML using XSL, Santanu Choudhury |
Month |