[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|