> > > A comment on the substring function: > > I think the 3rd example is incorrect. -INF + 3 is still > -INF, so wouldn't it return ""? > > Thanks, > Priscilla > yes, you are right. There is another error here as well: -INF is not a representation of minus infinity. It should be written fn:double("-INF") or -1 div 0 (Ashok, why not simply revert to the XPath 1.0 examples?) I've just been checking the formula, which is written as: fn:round($startingLoc) <= $p < fn:round($startingLoc + fn:round($length)) whereas XPath 1.0 uses the simpler: fn:round($startingLoc) <= $p < fn:round($startingLoc) + fn:round($length) I think they're equivalent, but to avoid the effort of proving it, I think it would be better to use the latter (which is more efficient because the $startingLoc only needs to be rounded once). Michael KayReceived on Thursday, 21 November 2002 09:01:05 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:58 GMT