In a previous post I'd created on Function Overloading in XQuery, there has been a brief discussion (so far) on whether you can overload functions based on type.
This was the given example:
Calling:
Throws this:
Which appears to be part of the spec:
http://www.w3.org/TR/xquery/#ERRXQST0034.
Is there a workaround? The only way around this issue that I know of right now is to use a typeswitch:
Calling:
Will give you the expected results - albeit at the cost of having to write (and manage) more code.
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2010
(43)
-
▼
June
(8)
- XQDT: Notes for installing the current Milestone o...
- MarkLogic: XQuery: performance with Maps
- Java: Using Jersey with JAXB to output XML or JSON.
- MarkLogic: XQuery: hacking the position() - a basi...
- MarkLogic: XQuery: and / and-not query examples
- MarkLogic: XQuery: UNIX Timestamp to xs:dateTime C...
- MarkLogic: XCC/J: Passing a node() into a Query as...
- MarkLogic: XQuery: Typeswitching based on input "t...
-
▼
June
(8)
No comments:
Post a Comment