Bug #5391
closed![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
fn:snapshot applied to namespace and attribute nodes
100%
Description
The test snapshot-0102a produces incorrect results, when run with either compiler.
Updated by Michael Kay over 2 years ago
The test demonstrates that snapshot(.) /root(.)
produces the wrong result when the context item is a namespace node.
Updated by Michael Kay over 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.
Updated by Michael Kay over 2 years ago
- Subject changed from Test case snapshot-0102a fails to fn:snapshot applied to namespace and attribute nodes
- Description updated (diff)
Updated by Debbie Lockett about 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