Re: [xsl] extract the right elements

Subject: Re: [xsl] extract the right elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 30 Sep 2003 13:34:01 +0100

> <xsl:for-each select="//INSTANCE[@class='Audio' or @class='Web-Site']">
This loops over the nodes that you want but then having got there you do this:  

>   <xsl:for-each select="key('tracker','Position')">

which selects all the nodes  using the constant key 'Position' so it
does not depend in any way on the INSTANCE node and so the inner loop
will produce identical <item> elements one for each of the originally
selected  INSTANCE[@class='Audio' or @class='Web-Site' elements.

insde this for-each the current node is whatever node is returned by
your key, so your INSTANCE elements are not used at all.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread