Project

Profile

Help

Bug #4143

closed

Default for Feature.STRIP_WHITESPACE changed in 9.8 and doesn't match the documentation

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
-
Start date:
2019-02-21
Due date:
% Done:

100%

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

Description

The default for Feature.STRIP_WHITESPACE is documented as ignorable but since Saxon 9.8, the value returned by

Configuration config = new Configuration();
config.getConfigurationProperty(Feature.STRIP_WHITESPACE);

is "none"

It looks as if the change wasn't intended.

ParseOptions.getStripSpace() returns Whitespace.IGNORABLE if the spaceStrippingRule is null (its initial value), but Configuration.getConfigurationProperty() switched to calling ParseOptions.getSpaceStrippingRule() in 9.8; this returns null, which getConfigurationProperty() interprets as meaning "none".

Please register to edit this issue

Also available in: Atom PDF