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 03:13:35 UTC