Project

Profile

Help

Bug #3380

closed

xsl:analyze-string with a regex that matches a zero-length string

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2017-08-10
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
0.9, 1.0, Trunk
Fix Committed on JS Branch:
1.0, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

XSLT 3.0 allows the regex in xsl:analyze-string to be one that matches a zero length string, but Saxon-JS is not handling this correctly. It fails with Error SXJS0004 and the message "looping???". XSLT 3.0 test cases analyze-string-090b and -091b fail.

Fixed on the 2.0 branch in Expr.analyze by adding the code

        if (result[0].length === 0) {

            pattern.lastIndex++;

        }

I've left the test for looping in the code, just in case.

Actions #1

Updated by Debbie Lockett over 6 years ago

  • Fix Committed on JS Branch 1.0 added

Fix also made on 1.0 branch.

Actions #2

Updated by Debbie Lockett over 6 years ago

  • Status changed from New to Resolved

Marking as resolved now.

Actions #3

Updated by Debbie Lockett over 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.0.2

Bug fix applied in Saxon-JS 1.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page