Project

Profile

Help

Bug #1614

closed

Problem with typeswitch in XQuery?

Added by Adam Retter about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XQuery conformance
Sprint/Milestone:
-
Start date:
2012-08-27
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

I am seeing Saxon XQuery processor fail with this query. To the best of my knowledge I believe the query is correct, it does seem to pass on eXist-db and Zorba XQuery Processors, although that does not mean it is correct of course!

let $something := 1 cast as xs:integer return

typeswitch($something)

case document-node() return

    <result>found a document</result>


case $e as element() return

    <result>found an element: {local-name($e)}</result>


case $t as text() return

    <result>found the text: {$t}</result>


case $i as xs:integer return

    <result>found the integer: {$i}</result>


default return

    ()

Files

typeswitch.xql (447 Bytes) typeswitch.xql Adam Retter, 2012-08-27 19:32

Please register to edit this issue

Also available in: Atom PDF