Project

Profile

Help

Bug #2465

closed

XQuery Update: moving an attribute

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
XQuery Update
Sprint/Milestone:
Start date:
2015-10-06
Due date:
% Done:

100%

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

Description

Leo Studer writes on :

I am using Oxygen 17.0 with Saxon EE 9.6.0.5 as the xQuery Update processor.

I want to move an attribute one level deeper.

In the example I want to move att="att” from to

<b/>

Here my code:

delete node doc("xml.xml")//@att,

insert node doc("xml.xml")//@att into doc("xml.xml")//b

Each of these two statements work correctly alone but when I try both together I get java.lang.NullPointerException.

Can anyone explain what happens here?

Thanks in advance

Leo

Actions #1

Updated by Michael Kay about 9 years ago

  • Status changed from New to In Progress

The problem is caused by the introduction of the class NodeName in Saxon 9.6 to pass the name of a node around, and in particular by the subclass NameOfNode which represents a NodeName by means of a reference to a Node having that name. (This design was introduced in order to reduce NamePool accesses by ensuring that once a fingerprint was allocated to a node name, it would become available to many other nodes having the same name). The design fails when the Node becomes mutable, leading to a NameOfNode object carrying a reference to a node that can be renamed or deleted. The solution is to ensure that entries in the pending update list never contain node names in this form.

Actions #2

Updated by Michael Kay about 9 years ago

  • Status changed from In Progress to Resolved

Patched in Subversion on the 9.6 and 9.7 branches.

Actions #3

Updated by O'Neil Delpratt almost 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.8

Bug fix applied in the Saxon 9.6.0.8 maintenance release

Actions #4

Updated by O'Neil Delpratt almost 9 years ago

  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.8 added
Actions #5

Updated by O'Neil Delpratt almost 9 years ago

  • Sprint/Milestone set to 9.6.0.8

Please register to edit this issue

Also available in: Atom PDF