Project

Profile

Help

Bug #6131

closed

Unexpected function call triggers cardinality check and error

Added by Johan Gheys 10 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2023-07-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

We are running tests to switch from Saxon-EE 11.5 to 12.3. In one of our transformations (see attachment), we now get the following error:

Type error at char 17 in expression in xsl:variable/@select on line 41 column 103 of day-of-week.xslt:
  XPTY0004  An empty sequence is not allowed as the first argument of dow:previous-day()
at function dow:previous-day on line 71 column 57 of day-of-week.xslt:
     Focus: absent
     Local variables
        $date = (*unreadable*)
An empty sequence is not allowed as the first argument of dow:previous-day()

whereas with version 11.5 this went smoothly.

The variable hole-valday on line 43 of day-of-week.xslt is the empty sequence because the predicate exists($next-valday) is false. Apparently version 11.5 does lazy evaluation of the function call dow:val-to-valday($hole-val, $feastday) whereas version 12.3 does eager evaluation. I did not reopen bug #6026 because the previously reported problem was correctly fixed.


Files

eager-evaluation.zip (3.05 KB) eager-evaluation.zip Johan Gheys, 2023-07-17 17:05
day-of-week.xslt (6.29 KB) day-of-week.xslt Johan Gheys, 2023-07-19 08:44
batch.xslt (4.34 KB) batch.xslt Johan Gheys, 2023-07-20 17:25

Please register to edit this issue

Also available in: Atom PDF