Actions
Bug #4173
closedXdmNode.toString() on text nodes
Start date:
2019-03-20
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
Bug #4081 -- see comment 5 -- changed the effect of XdmNode.toString() to trim leading and trailing whitespace from the result. This is fine for document and element nodes, but it is wrong for text nodes.
Note that XdmNode.toString() on a text node will escape special characters such as "&" and "<"; this should perhaps be noted in the documentation.
Users should probably be calling XdmNode.getStringValue() instead, but this doesn't alter the fact that trimming the value here is incorrect.
Reported by Norm Walsh on Saxon help mailing list
Please register to edit this issue
Actions