Project

Profile

Help

Bug #5091

closed

Tests that optimize a filter expression to use a key fail after export/import

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT export
Sprint/Milestone:
-
Start date:
2021-09-14
Due date:
% Done:

100%

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

Description

XSLT3extra test cases opt-001 and opt-002 are failing when run with -export:on.

The filter expressions in the tests are being correctly optimised to calls on the key() function, but after export and re-import, the call on the key() function is failing to find matching elements in the source document.

Actions #1

Updated by Michael Kay over 2 years ago

Considering test case opt-001, when we attempt to locate the xs:double value within the index (on entry to KeyIndex.getNodes()):

(a) with -export:off, the index contains 8 entries whose keys are of type LatinString, and the list UntypedKeys contains the same 8 values

(b) with -export:on, the index is identical, but the list UntypedKeys is null.

The problem is that KeyDefinition.convertUntypedToOther is false.

I have introduced two new flags on the SEF key element to represent the internal properties convertUntypedToOther (flag "v") and strictComparison (flag "s"). The two tests now pass.

It would be a good idea to move these tests into XSLT3 (without the optimisation assertions) to provide a test that Saxon-JS can process these index definitions correctly.

Actions #2

Updated by Michael Kay over 2 years ago

  • Status changed from New to Resolved
  • Applies to branch 10, trunk added
  • Fix Committed on Branch 10, trunk added

Fixed as described.

Test cases opt-001 and opt-002 from xslt3extra moved to become expression-4401 and expression-4402 in the qt4cg xslt4 test suite.

Actions #3

Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.6 added

Bug fix applied in the Saxon 10.6 maintenance release

Please register to edit this issue

Also available in: Atom PDF