Re: [xsl] referencing elements

Subject: Re: [xsl] referencing elements
From: Andreas Leitner <nozone@xxxxxxxxxxxxxx>
Date: 29 Mar 2002 17:27:38 +0100
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


Current Thread