Bug #4460


Serialization: interaction of cdata-section-elements with character maps

Added by Michael Kay over 2 years ago. Updated about 2 years ago.

Start date:
Due date:
% Done:


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


A number of new serialization tests probing the interaction of CDATA sections and character maps are failing under Saxon 9.9 (as well as on the development branch).

Test failures include


Test output-0115c is failing because character map expansion is not disabled for characters in an element designated as a cdata-section-element that is not output as CDATA because it is not available in the chosen encoding. The spec says "Character mapping is not applied to characters in text nodes whose parent elements are listed in the cdata-section-elements parameter" (that is, regardless of whether they are actually output within CDATA).

Actions #1

Updated by Michael Kay over 2 years ago

output-0115c is fixed by checking for the property DISABLE_CHARACTER_MAPS instead of DISABLE_OUTPUT_ESCAPING in CharacterMapExpander.characters().

output-0115d is failing because we are doing CDATA section processing on the next node prior to unicode normalization, whereas ยง4 rule 3(b) in the serialization spec says normalization should be done first. We can achieve this with a bit of messy logic in the CDATAFilter - messy because it "peeks ahead" in the serialization pipeline and thus creates some lock-in to the detailed structure of the pipeline.

output-0195a and output-0195b are failing because the HTML output method is reporting a C1 control character as a serialization error, which should not happen with HTML5 output.

output-0233 is failing under 9.9 but not under 10.0. This is covered under the (still open) bug #4401.

Actions #2

Updated by Michael Kay about 2 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.9, trunk added
  • Fix Committed on Branch 10, trunk added
  • Fixed in Maintenance Release, 10.0 added

Belatedly marking this as resolved on both the 9.9 and 10.0 branches.

Actions #3

Updated by O'Neil Delpratt about 2 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.1 added
  • Fixed in Maintenance Release deleted (, 10.0)

Bug fix committed in the Saxon 10.1 maintenance release.

Actions #4

Updated by O'Neil Delpratt about 2 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF