[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Preceding: can't filter my nodes?

Subject: RE: Preceding: can't filter my nodes?
From: "Pollington, Lee (ELSLON)" <lee.pollington@xxxxxxxxxxxxx>
Date: Wed, 13 Sep 2000 16:35:23 +0100
t filter
Thanks Mike, I can now go on holiday without any XSLT worries :) 

That certainly does work (with a bracket change) and certainly does look
expensive. However it will only be evaluated a few times at most and on no
more than 30-40 nodes max. I still haven't got to grips with keys yet, that
will be next.

Saxon is my prefered XSLT processor, but I am running this as an Oracle
stored java procedure. It seems to perform pretty well.

regards
Lee

 -----Original Message-----
 From: Kay Michael [mailto:Michael.Kay@xxxxxxx]
 Sent: 12 September 2000 17:36
 To: 'xsl-list@xxxxxxxxxxxxxxxx'
 Subject: RE: Preceding: can't filter my nodes?
 
 
 > I'm trying to get a unique set of nodes. I can't seem to tie 
 > the preceding
 > axis to a filter on a given ID. I have tried filtering that 
 > node set into a
 > variable and then getting a unique list from that, but I am 
 > still operating
 > on the whole node set.(abbreviated XML below)
 > 
 > <xsl:variable name="ats" select="/ROWSET/ROW[R_ID='14144']"/>
 > <xsl:for-each select="$ats/AT_ID[not(.=preceding::AT_ID)]">
 >   <at_id><xsl:value-of select="."/></at_id>
 > </xsl:for-each>
 
 "preceding", like all the other axes, means "preceding in the source
 document", not "preceding in the node-set".
 
 I'm tempted to suggest the saxon:distinct() function, but I know that's
 cheating! select="saxon:distinct($ats/AT_ID)"
 
 Perhaps you want
 select="$ats/AT_ID[not(.=preceding::AT_ID[ancestor::ROW[R_ID='1
 4144']]]">
 
 but it looks horribly inefficient. If you want a solution that's both
 portable and efficient, it will probably use keys.
 
 Mike Kay
 
  
 
 
  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
 


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.