Bug #4386
closedsetProperty and setParameter does not replace keys already in the map
100%
Description
Reported in the forum post: https://saxonica.plan.io/boards/4/topics/7680
Across all the processors when we use the setProperty and setParameter methods if a key already exists in the properties or parameters map the value of the key is not updated with the new value.
A workaround would be to call clearProperties() and clearParameters() before updating new values. There is also a removeParameter method which can be used before the new parameter is updated/added.
Related issues
Updated by O'Neil Delpratt about 5 years ago
In the C++ API we use the map::insert
method to add key, value pairs. However the the API documentation for the insert
method states:
Because element keys in a map are unique, the insertion operation checks whether each inserted
element has a key equivalent to the one of an element already in the container, and if so,
the element is not inserted, returning an iterator to this existing element (if the function returns a value).
Therefore using the insert
method will not work if the key exists already.
Updated by O'Neil Delpratt almost 5 years ago
- Status changed from New to Resolved
Bug fixed and added C++ test cases.
Updated by O'Neil Delpratt almost 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 11.1
Bug fix patched in SaxonC 11.1 release
Updated by O'Neil Delpratt over 2 years ago
- Related to Bug #5533: segfault when setting xslt parameter in a loop added
Please register to edit this issue