|
top
|
Subject: Verion 1.0 XPATH for testing Author: (Deleted User) Date: 06 Nov 2006 08:22 AM
|
Hi Greg,
the problem here is that <, <=, > and >= are not defined as you would expect. As stated in the XPath 1.0 specs, "when neither object to be compared is a node-set and the operator is <=, <, >= or >, then the objects are compared by converting both objects to numbers and comparing the numbers according to IEEE 754".
In your case, neither 'A' or 'B' or '2.4.64' can be converted into a number, so the comparison is performed between NaN values (that by definition cannot be compared).
If you want to check if a version number falls in between two version numbers, you will have to write a named template that splits the version numbers into single numbers (e.g. 2, 4 and 64) and compares the single numbers.
Hope this helps,
Alberto
|
|
|