[Home] [By Thread] [By Date] [Recent Entries]
On 09/03/2012 08:26, Jakub MalC= wrote:
The description of the semantics starts in the XPath "language book", here:Hello, maybe dumb question - what happens when a processor encounters an expression using the eq operator (and the other related operators)? Since eq is sort of overloaded and calls different functions according to the type of the operands (op:numeric-equal, fn:compare etc). And especially when the operands are empty sequences - like in () eq ()? The result is an empty sequence*, but what steps lead to it? http://www.w3.org/TR/xpath20/#id-value-comparisons After various processes such as atomization, handling of empty operands, and conversion of untypedAtomic to string, this takes you to appendix B.2, the operator mapping table, which tells you for example that if both operands are of type xs:time, the function op:time-equal(A, B) is called. This "function" is then specified in the Functions and Operators book. No, it's not. The namespace URI associated with the "op" prefix is unspecified, so there's no way of writing a function in this namespace, and the "fn" namespace is reserved in both XQuery and XSLT, so there is a specific ban on writing functions in this namespace.Follow-up question - is it possible to override the built-in xpath functions in XSLT or XQuery? Section 3.5.2 of the XPath language book, rule 2. Michael Kay Saxonica
|

Cart



