Project

Profile

Help

Bug #5391

closed

fn:snapshot applied to namespace and attribute nodes

Added by Michael Kay about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-03-13
Due date:
% Done:

100%

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

Description

The test snapshot-0102a produces incorrect results, when run with either compiler.

Actions #1

Updated by Michael Kay about 2 years ago

The test demonstrates that snapshot(.) /root(.) produces the wrong result when the context item is a namespace node.

Actions #2

Updated by Michael Kay about 2 years ago

  • Status changed from New to Resolved
  • Applies to JS Branch 2, Trunk added
  • Fix Committed on JS Branch 2, Trunk added

CoreFn#2046 sets item to the parent of the namespace node, which in this case is the document element gml:Bridge.

line #2062 says that when we have processed all the ancestors of item, we then send a deep copy of item to the result. This effectively takes a snapshot of the parent of the namespace node, not of the namespace node itself.

Further exploration shows that the same problem applies to attributes.

Fixed.

Actions #3

Updated by Michael Kay about 2 years ago

  • Subject changed from Test case snapshot-0102a fails to fn:snapshot applied to namespace and attribute nodes
  • Description updated (diff)
Actions #4

Updated by Debbie Lockett almost 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to SaxonJS 2.4

Bug fix applied in the SaxonJS 2.4 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page