Project

Profile

Help

Bug #5126

closed

SaxonCS: Cannot set character map in Saxon.Api.Serializer

Added by Michael Kay almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
.NET API
Sprint/Milestone:
-
Start date:
2021-10-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11
Fix Committed on Branch:
11
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

In SaxonCS, Attempting to set a character map via the Serializer API doesn't work.

It should work like this, but this has no effect

                Serializer serializer = proc.NewSerializer();
                IDictionary<int, string> charMap = new Dictionary<int, string>();
                charMap.Add('e', "f");
                serializer.SetCharacterMap(new QName("", "m"), charMap);
                serializer.SetOutputProperty(new QName("use-character-maps"), "{}m");
                serializer.SetOutputProperty(new QName("method"), "xml");
Actions #1

Updated by Michael Kay almost 3 years ago

The problem is that the Saxon.Api.Serializer class holds a CharacterMapIndex which is distinct from the one held by the underlying s9api.Serializer, and changes made to one do not affect the other.

The solution is to share the CharacterMapIndex between these two classes.

Actions #2

Updated by Michael Kay almost 3 years ago

A unit test TestSerializer.testXsltCharacterMapsFromApi() has been added to both the Java and C# unit tests.

Actions #3

Updated by Michael Kay almost 3 years ago

  • Status changed from New to Resolved
Actions #4

Updated by O'Neil Delpratt over 2 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 11.1 added
  • Platforms Java added

Bug fix applied in the Saxon 11.1 release.

Actions #5

Updated by O'Neil Delpratt over 2 years ago

  • Fix Committed on Branch 11 added
Actions #6

Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF