[xquery-talk] min max and mix

Michael Kay mike at saxonica.com
Mon Feb 10 11:04:44 PST 2014

> Even if it were not system dependent there is no defined way to take an atomic value and figure out which node it came from,
> so, IMHO, the statement of implementation dependency is only there because its also non-testable ... 
> even given this ...    
>    max( ( <a>1.0</a> , <b>1.00</b> ) ) =>  1  
> a or b ? good luck.

min() and max() return an atomized value so you can't tell which node it came from anyway. The implementation-dependency has more to do with mixed floats, doubles, and decimals:

min((1.0, 1.0e0)) = the answer will be equal to one, but it's implementation-dependent whether it's a decimal one or a double one. (IIRC, haven't checked the spec).

Michael Kay

More information about the talk mailing list