DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22102>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22102

XPATH not performing implicit conversion from int to boolean as expected

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From [EMAIL PROTECTED]  2003-08-05 16:13 -------
According to XPath1.0, section 2.4 Predicates: [A PredicateExpr is evaluated by 
evaluating the Expr and converting the result to a boolean. If the result is a 
number, the result will be converted to true if the number is equal to the 
context position and will be converted to false otherwise; if the result is not 
a number, then the result will be converted as if by a call to the boolean 
function]

When "Given that string-length() returns 0 for empty strings", it evaluates 
record[0] to false, cause the position starts from 1 (as your result). For 
element "<field>A sample string</field>", record[string-length(normalize-space
(field))] = record[15], it evaluates to false too. When Expr is a number, record
[string-length(normalize-space(field))] <> record[boolean(string-length
(normalize-space(field)))].

Reply via email to