Project

Profile

Help

Bug #6026

closed

Unexpected function call triggers cardinality check and error

Added by Johan Gheys about 1 year ago. Updated 12 months ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
2023-05-09
Due date:
% Done:

0%

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

Description

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

Type error at char 66 in expression in xsl:attribute/@select on line 143 column 168 of complete-node.xslt:
  XPTY0004  An empty sequence is not allowed as the third argument of local:normalDrivingDirection()
at function local:lineSectionTrackRef on line 125 column 67 of complete-node.xslt:
     Focus: absent
     Local variables
        $macro-trackEdge = ()
        $nodeByLocation = <micro:nodeByLocation>
        $node = <micro:border>
     invoked by function call at jar:file:int-batch-DEV-SNAPSHOT.jar!/validities/complete-node.xslt#438
at function local:transform-to-export-border on line 427 column 74 of complete-node.xslt:
     Focus
        Context item: map{(:size 7:)}
        Context position: 1
     Local variables
        $params = map{(:size 7:)}
        $node = <micro:border>
        $validFromDate = "2023-04-17"
        $validToDate = "2078-12-31"
        $nodeByLocation = <micro:nodeByLocation>
        $gigRef = <micro:gigRef>
     invoked by function call at jar:file:int-batch-DEV-SNAPSHOT.jar!/validities/complete-node.xslt#46
  In template rule with match="element(Q{http://www.infrabel.be/int/micro}border)" on line 44 of complete-node.xslt
     invoked by xsl:next-match at jar:file:int-batch-DEV-SNAPSHOT.jar!/validities/complete-node.xslt#40
  In template rule with match="*[fn:exists(...)]" on line 38 of complete-node.xslt
     invoked by xsl:apply-templates at jar:file:int-batch-DEV-SNAPSHOT.jar!/validities/complete-node.xslt#521
  In template rule with match="*" on line 519 of complete-node.xslt
     invoked by xsl:apply-templates at jar:file:int-batch-DEV-SNAPSHOT.jar!/validities/complete-node.xslt#34
  In template rule with match="element(Q{http://www.infrabel.be/int/micro}nodes)" on line 31 of complete-node.xslt
     invoked by built-in template rule (text-only)
Error in xsl:sequence/@select on line 29 column 45 of batch.xslt:
  FOER0000  Error signalled by application call on error()
at template xsl:initial-template on line 11 column 56 of batch.xslt:
     Focus: absent
     Local variables
        $vv:v0 = false()
        $startTime = xs:dateTimeStamp("2023-05-09T16:50:24.967+02:00")
Error signalled by application call on error()

whereas with version 11.5 this went smoothly.

It is strange that local:normalDrivingDirection() is called because the sequence over which the for loop iterates is clearly empty:

     Local variables
        $macro-trackEdge = ()

The function call triggers a cardinality check and therefore the above error.


Files

complete-node.xslt (29.1 KB) complete-node.xslt Johan Gheys, 2023-05-09 19:42
complete-node-6026.zip (23.7 KB) complete-node-6026.zip Johan Gheys, 2023-05-13 11:01

Related issues

Is duplicate of Saxon - Bug #6022: Eager evaluation prematurely throws exception in analyze-string/non-matching-string.ClosedMichael Kay2023-05-08

Actions

Please register to edit this issue

Also available in: Atom PDF