- From: Michael Rys <mrys@microsoft.com>
- Date: Tue, 23 Mar 2004 07:09:41 -0800
- To: "Kirmse, Daniel" <daniel.kirmse@sap.com>, <public-qt-comments@w3.org>
- Message-ID: <EB0A327048144442AFB15FCE18DC96C7026803F1@RED-MSG-31.redmond.corp.microsoft.com>
Such questions are best asked on the www-ql alias. XQuery is mainly a strongly typed language which means that your expression below leads to a type error. Exceptions are the treatment of untyped data, the notion of atomization, and the implicit promotion of numeric data (and xs:anyURI to be added). These rules are described in the corresponding sections in the language document or the formal semantics (look for atomization, numeric type promotion, xdt:untypedAtomic). HTH Michael ________________________________ From: public-qt-comments-request@w3.org [mailto:public-qt-comments-request@w3.org] On Behalf Of Kirmse, Daniel Sent: Tuesday, March 23, 2004 12:13 AM To: 'public-qt-comments@w3.org' Subject: Question regarding the typehirarchy Hi, don't know whether this is the right place for the question. If not, please take my apologies. I wonder about the XQuery type hierarchy. There are a lot of documents around but I did not really find some kind of implicit conversion rule for types. Suppose the expression: "20" > 1000 A string literal is compared with an integer literal. In "XQuery 1.0 and XPath 2.0 Formal Semantics" section [B.2 Mapping of Overloaded Internal Functions]. A list of internal functions is provided. According to it there are comparison functions that take either numerics or strings as parameters. But what is to take in the provided example. For the practical use the numeric variant seems to be the best. But the question is: Is there an explicit rule that describes when to convert which type to what other type and when not? Is there a document that contains the ruling? Which section? Cheers & Thanks Daniel Kirmse
Received on Tuesday, 23 March 2004 10:11:49 UTC