Adjacent text nodes after update

Bug #867166 reported by Federico Cavalieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Markos Zaharioudakis

Bug Description

Adjacent text nodes can be obtained after an XQU update.

In the following query the adjacent text nodes "a-b" and "b-c" should be merged but they are not.

variable $doc:=<root>root-a<a/>a-b<b/>b-c<c/>c-d<d/>d-root</root>;
variable $a:=();
variable $b:=();

$a:=count($doc/text());
replace node $doc/b with ();

$b:=count($doc/text());

trace($doc,"dump");

<result>rep-empty: before: {$a}, after: {$b}, expected {$a - 1}</result>

Result:

<?xml version="1.0" encoding="UTF-8"?>
dump [0]: <root-elem nid="50| 1.1"><text nid="5a| 1.1.3">root-a</text><a-elem nid="5c|80| 1.1.5"></a-elem>

<text nid="5d|80| 1.1.7">a-b</text><text nid="5e|30| 1.1.11">b-c</text>

<c-elem nid="5e|50| 1.1.13"></c-elem><text nid="5e|70| 1.1.15">c-d</text><d-elem nid="5e|90| 1.1.17"></d-elem><text nid="5e|b0| 1.1.19">d-root</text></root-elem>
<result>rep-empty: before: 5, after: 5, expected 4</result>

Tags: core-runtime
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.