Project

Profile

Help

Bug #5369

closed

In complex XSLT patterns, the "child-or-top" logic for parentless elements is not implemented

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2022-03-03
Due date:
% Done:

100%

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

Description

Illustrated by new test case match-274.

In cases where a pattern has to be evaluated "the hard way" (using the logic described in the spec, rather than the right-to-left optimised evaluation) we aren't implementing the rule in the spec that an initial X step in the pattern matches child-or-top::X rather than child::X - that is, it should match an X element whether or not it has a parent.

Applies also to SaxonJS

Actions #1

Updated by Michael Kay almost 3 years ago

  • Status changed from New to In Progress

Changed GeneralNodePattern so this test case now passes.

The logic is that when the search of the ancestor axis hits the root without finding a match, then if (a) the top-most node found was a parentless element, comment, text, or PI node, and (b) the "equivalent expression" starts with a child step, then the pattern matches provided (c) the node-test of the first step in the pattern matches the top-most element of the tree, and (d) the "rump" of the equivalent expression (that is, the expression minus its first step) selects the node being tested against the pattern.

Actions #2

Updated by Michael Kay almost 3 years ago

  • Status changed from In Progress to Resolved
  • Applies to branch 10, 11, trunk added
  • Fix Committed on Branch 10, 11, trunk added
Actions #3

Updated by O'Neil Delpratt over 2 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.8 added

Bug fix applied in the Saxon 10.8 maintenance release. (Leaving open awaiting Saxon 11 maintenance release.)

Actions #4

Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 11.3 added
  • Fixed in Maintenance Release deleted (10.8)

Bug fix applied in the Saxon 11.3 maintenance release.

Actions #5

Updated by O'Neil Delpratt over 2 years ago

  • Fixed in Maintenance Release 10.8 added

Please register to edit this issue

Also available in: Atom PDF