Project

Profile

Help

Bug #4196

closed

Navigation of wrapped DOM: merging of adjacent text nodes

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
DOM Interface
Sprint/Milestone:
-
Start date:
2019-04-12
Due date:
% Done:

100%

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

Description

Looking at the code for the DOMWrapper class, it's not clear that the code to merge adjacent text nodes is working on all paths. There's a lot of logic in ChildEnumeration to handle this, which will work for the child, following-sibling, and preceding-sibling axes; but the descendant axis relies on SteppingNavigator.DescendantAxisIterator, which in turn relies on DOMNodeWrapper implementing methods like nextSibling() and precedingSibling(), and as far as I can see these method do not consider the possibility of adjacent text nodes.

This examination of the code was prompted by a request on the saxon-help list for a mode of execution in which adjacent text nodes are treated as separate nodes. I'm not convinced the requirement for that is strong enough to justify the considerable effort that would be needed to test it thoroughly.

Please register to edit this issue

Also available in: Atom PDF