Actions
Bug #5126
closed![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
SaxonCS: Cannot set character map in Saxon.Api.Serializer
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");
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.
Updated by Michael Kay almost 3 years ago
A unit test TestSerializer.testXsltCharacterMapsFromApi()
has been added to both the Java and C# unit tests.
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.
Updated by O'Neil Delpratt over 2 years ago
- Status changed from Resolved to Closed
Please register to edit this issue
Actions