Project

Profile

Help

Bug #1890

closed

Problems with accumulators

Added by Michael Kay about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Streaming
Sprint/Milestone:
-
Start date:
2013-09-06
Due date:
% Done:

100%

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

Description

Investigation of the problem reported on the help forum here:

https://saxonica.plan.io/boards/3/topics/5778?r=5779

reveals a number of bugs in the implementation of streamable accumulators.

(1) The accumulator value is not updated when the accumulator rule fires on a text, comment, or processing instruction node.

(2) If both a pre-descent and post-descent function are defined, then two separate accumulators are maintained, both holding the same value. This doesn't lead to incorrect results, but it is grossly inefficient.

(3) There is no check that the "new-value" function defined for the accumulator is motionless

(4) When the accumulator value is saved as the string value of a node (after fixing (1) above), the string value may be held in mutable form, such that when the stream advances, the content of the underlying buffer changes.

Please register to edit this issue

Also available in: Atom PDF