XERCESC-1854 introduced method
which has an error in validation.
The method validates XMLCh which represent UTF16.
The UTF16 surrogate range from xD800 - xDFFF is used to represent x10000-#x10FFFF and should not be handled as nvalid.
The reader threads this correctly and does not complain, which leads to an asmetric behavior
Reading DOM => OK
Save back DOM => Exception
I tried to attach an example to show the behavior.
The used methods
bool XMLChar1_1::isXMLChar(const XMLCh toCheck, const XMLCh toCheck2)
already have a second optional parameter to check surrogate values.