CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 02:28:48 GMT
content-type: text/html
content-encoding: gzip
last-modified: Thu, 13 Jul 2023 17:50:22 GMT
cache-control: max-age=2592000, public
expires: Sun, 09 Nov 2025 22:49:15 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98c9ab7f7ef0f41a
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: HIT
set-cookie: __cf_bm=JsjCF5vfUZjgWH3CFjxqPITbJAK4439dK4KXl5zpR2E-1760149728-1.0.1.1-u_jjS1S4dgbVnVPGY0dI2Lk4_332QCBYkT0zPLCg62dwbaU2avMBv.VpF0qrCK_yrQvp1jpYemADjN_75bkQrvyDDQOdkdGFq4ujURD705E; path=/; expires=Sat, 11-Oct-25 02:58:48 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98caed16cb6bc1f7-BLR
alt-svc: h3=":443"; ma=86400
[XPath 2.0] 3.5.2 General Comparisons from Michael Kay on 2004-02-06 (public-qt-comments@w3.org from February 2004)
[XPath 2.0] 3.5.2 General Comparisons
- From: Michael Kay <mhk@mhk.me.uk>
- Date: Fri, 6 Feb 2004 17:47:34 -0000
- To: <public-qt-comments@w3.org>
- Message-ID: <000d01c3ecd9$4e0f74c0$6401a8c0@pcukmka>
The current rules for backwards compatibility in general comparisons reads: <old> If XPath 1.0 compatibility mode is true, and at least one of the atomic values has a numeric type, then both atomic values are cast to to the type xs:double. </old> [Note also the typo: "to to"] This means that if both the values are xs:decimal values, they must both be converted to xs:double values for comparison. This seems unreasonable, given that two xs:decimal values can be unequal when compared as decimals, but equal when converted to doubles. Since it's entirely OK to compare two numeric values of different atomic type, there doesn't seem to be a good reason for converting both operands to double, rather than only converting one; nor is there a good reason for converting to xs:double if the value is already numeric. I suggest changing the rule to: <new> If XPath 1.0 compatibility mode is true, and if one of the atomic values has a numeric type and the other does not, then the value that is not numeric is cast to the type xs:double. </new> Michael Kay
Received on Friday, 6 February 2004 12:47:08 UTC