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

Re: Filtering a node-set

Subject: Re: Filtering a node-set
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 9 Jan 2008 11:23:15 GMT
Re:  Filtering a node-set
      <xsl:variable name="boxSize" select="'0.002'"/>

why make this a string rather than a number?

      <xsl:variable name="boxSize" select="0.002"/>

will save the system coercing it to a number every time you use it.


  you rarely want to do test="count(...) =0" as (unless your system
rewrites this away that forces it to work out how many things there are
and count them when in fact it could stop as soon as it finds any.
just do

test="not(....)"

as a node set tests as true if non empty.
 

> I can't see a way of eliminating the use of
> the $top, $bottom, $left and $right variables.  Is it possible?
 
possibly not, if there were just one, say right you could do something
like

select="$elements[$elements[(@lon+180) &lt; @lon + 180 + $boxSize]]

but I don't think you can handle multiple attribute comparisons without
introducing variables anywhere.

is node-set() really not availabe to you? there arever few processors
where it is not supported.


David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

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.