This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: referencing elements
- From: Andreas Leitner <nozone at sbox dot tugraz dot at>
- To: xsl-list at lists dot mulberrytech dot com
- Date: 29 Mar 2002 17:27:38 +0100
- Subject: Re: [xsl] referencing elements
- References: <1017366809.1237.49.camel@wien> <E16qmty-0001Sz-00@pdavis.cx>
- Reply-to: xsl-list at lists dot mulberrytech dot com
On Fri, 2002-03-29 at 04:18, Peter Davis wrote:
> You want to use the current() function in order to do
> "chapter[@name=current()/id]". You are right that the brackets "override"
> the current context node; the current() function gets the context node in the
> containing <xsl:for-each> or <xsl:template>. But your templates are a little
> confused over what the context is (not to mention syntax). See below.
Hmmm, looking at it again. I have to say I am sorry. It was quite late
and I did not want to post the file where my problem originated, so I
decided to slim it down and write a xsl file by heart in the email
composer - I guess that went quite wrong (;
Thanks alot for the clarification!
> On Thursday 28 March 2002 17:53, Andreas Leitner wrote:
> Hope that makes sense. You might also want to look up key() and <xsl:key/>,
> since they provide an alternative and probably better way of doing this.
Now this is a nice one. Haven't noticed key() and <xsl:key> before.
Works great here! Thanks alot.
regards,
Andreas
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list