Subject: Re: [xsl] redundancy in string(number(current())) = 'NaN' ?? From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 11 Jun 2003 22:05:29 +0100 |
//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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] redundancy in string(number(c, Robert P. J. Day | Thread | Re: [xsl] redundancy in string(numb, Robert P. J. Day |
[xsl] Announcement : XML Appliance , Ritu | Date | Re: [xsl] Processing a <br> in XSL-, G. Ken Holman |
Month |