Project

Profile

Help

Extensions #4503

Saxon 10 ForMemberExpr and XQuery type/positional variables

Added by Reece Dunn 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2020-03-28
Due date:
% Done:

0%

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

Description

The current Saxon implementation of ForMemberExpr uses SimpleForBinding for both XPath and XQuery. This means that in XQuery, the following:

(: ForBinding type declaration :)
for member $x as xs:short in [ 1, 2, 3 ] return $x * $x

and:

(: ForBinding positional variable :)
for member $x at $i in [ 3, 6, 9 ] return ``[a(`{$i}`) = `{$x}`]``

return a parser error.

Is there a reason for using the XPath SimpleForBinding in the XQuery parser?

History

#1 Updated by Michael Kay 4 months ago

In designing experimental new syntax for new requirements, I've been focusing on XSLT rather than XQuery simply because that's what 90% of our users are using. I've not forgotten XQuery, but FLWOR expressions and tuple streams are complex; it's just a question of biting things off one thing at a time.

#2 Updated by Reece Dunn 4 months ago

Michael Kay wrote:

In designing experimental new syntax for new requirements, I've been focusing on XSLT rather than XQuery simply because that's what 90% of our users are using. I've not forgotten XQuery, but FLWOR expressions and tuple streams are complex; it's just a question of biting things off one thing at a time.

Thanks. That makes sense.

Please register to edit this issue

Also available in: Atom PDF