XQuery constantly surprises me !
Today I was looking for a more concise way of testing if a string is empty or 
blank.
The best I came up with is

     empty($s) or $s eq ''
or
    string-length($s) eq 0

But along the way discovered this
   if(  () eq () ) then 1 else 2
   if(  () = () ) then 1 else 2

Returns 2 !!!

Of course in hindsight and fine-print its correct, but entirely non-obvious to 
my eye ...
Well back to work !



----------------------------------------
David A. Lee
[email protected]<mailto:[email protected]>
http://www.xmlsh.org

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to