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

Re: redundancy in string(number(current())) = 'NaN' ??

Subject: Re: redundancy in string(number(current())) = 'NaN' ??
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 11 Jun 2003 22:05:29 +0100
Re:  redundancy in string(number(current())) = 'NaN' ??




  //sales[string(number(current()))='NaN']

  just to make sure, i'm assuming the "current()" part is 
  redundant, 


Not its not redundant. current() returns the node current when this
expression is evaluated (ie typically the node matched by the template
that contains this expression) number() or number(.) would use the
contect node at that part of the expression which would be each of the
sales nodes in turn.

having said that its a strange expression as the predicate doesn't
depend on the sales node to which it applies so either the above is
equivalent to
//sales
or to the empty node set, depending on whether the current node
is a number or not. Sometimes you have to do this though as xpath
doesn't have an if statement.

David

 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.