Project

Profile

Help

Bug #2318

Function name "lt" not allowed if annotations are present

Added by Michael Kay over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
XQuery conformance
Sprint/Milestone:
-
Start date:
2015-02-19
Due date:
% Done:

100%

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

Description

From the saxon-help list:

I am trying to use transform.xq (https://github.com/jpcs/transform.xq )

with Saxon and Saxon objects to calling annotated functions lt

https://github.com/jpcs/transform.xq/issues/1

This can be reproduced by this simple XQuery:

++++++++++++++++++++++++++++++++++++++++++++++

xquery version "3.0";

declare default function namespace "http://example.com";

declare %private function lt() as item()*{

()

};

()

++++++++++++++++++++++++++++++++++++++++++++++

Error: System

ID: /home/vdv/projects/lab/presentations/xml-london-2015/transform.xq/lib/Untitled4.xquery

Main validation

file: /home/vdv/projects/lab/presentations/xml-london-2015/transform.xq/lib/Untitled4.xquery

Engine name: Saxon-EE XQuery 9.5.1.7

Severity: fatal

Description: XPST0003: expected "(", found "lt"

Start location: 5:0

URL: http://www.w3.org/TR/xpath20/#ERRXPST0003

Note that the error disappears if you remove the annotation.

History

#1 Updated by Debbie Lockett over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

After reading the annotation, the Tokenizer state was not reset correctly (to default state) while parsing the function declaration, causing the function name to be wrongly classified.

Fixed in 9.5, 9.6 and 9.7 branches.

Example added as QT3 test case -s:prod-Annotation -t:annotation-34.

#2 Updated by O'Neil Delpratt over 6 years ago

  • Found in version changed from 9.5 to 9.5 9.6
  • Fixed in version set to 9.6.0.5

Bug fix applied in the Saxon 9.6.0.5 maintenance release. Close when applied to 9.5 release.

#3 Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Resolved to Closed
  • Fixed in version changed from 9.6.0.5 to 9.5.1.10

Bug fix applied in the Saxon 9.5.1.10 maintenance release

#4 Updated by O'Neil Delpratt almost 6 years ago

  • Applies to branch 9.5, 9.6 added

#5 Updated by O'Neil Delpratt almost 6 years ago

  • Fix Committed on Branch 9.5, 9.6 added
  • Fixed in Maintenance Release 9.6.0.5, 9.5.1.10 added

Please register to edit this issue

Also available in: Atom PDF