Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser error for conditional in "Order By" #223

Open
charlessimpson opened this issue May 23, 2017 · 0 comments
Open

Parser error for conditional in "Order By" #223

charlessimpson opened this issue May 23, 2017 · 0 comments
Labels

Comments

@charlessimpson
Copy link
Contributor

charlessimpson commented May 23, 2017

XQuery allows an expression in an order by clause (https://www.w3.org/TR/xquery-30/#id-order-by-clause), for example:

xquery version "3.0";

let $data :=
    <data>
        <elem><x>1</x><y>b</y></elem>
        <elem><x>2</x><y>a</y></elem>
    </data>

let $ord-x := fn:true()

for $e in $data/elem
order by if ($ord-x) then $e/x else $e/y
return $e

But I get a parser error "Cannot resolve function 'if'".

@charlessimpson charlessimpson changed the title Parser error for conditional in order by Parser error for conditional in "Order By" May 23, 2017
@ligasgr ligasgr added the bug label Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants