Bug #2465
closedXQuery Update: moving an attribute
100%
Description
Leo Studer writes on talk@x-query.com:
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
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.
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.
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
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
Please register to edit this issue