Project

Profile

Help

Bug #1838

closed

XQuery parsing bug: incorrect function declaration syntax is accepted

Added by Michael Kay about 11 years ago. Updated almost 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.

Actions #1

Updated by Michael Kay about 11 years ago

  • Status changed from New to Resolved

The bug probably affects many previous releases.

A patch for the 9.5 and 9.6 branches has been tested and committed (QueryParser.parseFunctionDeclaration).

Actions #2

Updated by O'Neil Delpratt almost 11 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.5.1.2

Bug fix applied in the Saxon maintenance release 9.5.1.2

Please register to edit this issue

Also available in: Atom PDF