[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: referencing elements
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|