Project

Profile

Help

Bug #1838

closed

XQuery parsing bug: incorrect function declaration syntax is accepted

Added by Michael Kay over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XQuery conformance
Sprint/Milestone:
-
Start date:
2013-07-07
Due date:
% Done:

100%

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

Description

Reported on the help forum on this site today by Nikolay Ognyanov

The XQuery compiler accepts a comma after the last parameter in function declarations. Here is an example which compiles and runs under Saxon-PE 9.5.0.2 :

xquery version "1.0";

declare function local:foo($a,)

{

$a

};

local:foo(1)

The parameter list is defined as

ParamList ::= Param ("," Param)*

So this is clearly a bug albeit a minor one.

Please register to edit this issue

Also available in: Atom PDF