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

RE: sorting question

Subject: RE: sorting question
From: "Americo Albuquerque" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Wed, 28 May 2003 18:08:35 +0100
RE:  sorting question
Hi

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Lars Huttar
> Sent: Tuesday, May 27, 2003 9:17 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  sorting question
> 
> 
> >   I want to process all 'sd:Service' nodes that have
> > sd:ServiceDescription/@ServiceName='Y', 
> > except the one with min 'sd:ServiceID'.
> > 
> >   What is the condition returning the node-set I want ?
> > (I have done it by " xsl:sort + xsl:if test='position() > 
> 1'>  ", but 
> > I would like more elegant solution -> only one xsl:for-each)
> 
> I don't know of any way more elegant.
> 
> Maybe you're thinking of something that uses simply a select 
> expression without any xsl:sort or xsl:if, e.g.
> 
>   select="/*/sd:Service[sd:ServiceDescription/@ServiceName='Y'
> 	and ../sd:Service[sd:ServiceID &lt; current()/sd:ServiceID]]"
> 

  select="sd:Service[sd:ServiceDescription/@ServiceName='Y' and
sd:ServiceID &gt; ../sd:Service/sd:ServiceID]" will work too if the
current node is sd:Services. It is similar to yours but with just one
predicate.

(...)




 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.