Unicode supplementary characters cause XSL transformation to fail and produce invalid XML

Description

Given the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<test>
Dies ist ein Test: [&#x1d453;] Ende des Tests.
</test>

Just displaying this XML will show the "mathematical character small italic f"
http://www.fileformat.info/info/unicode/char/1d453/index.htm

But after transformation via XSL, e.g. copynodes.xsl, that character is broken
and became
&#55349;&#56403;
which is illegal.

See
https://issues.apache.org/jira/browse/XALANJ-2560
and
https://issues.apache.org/jira/browse/XALANJ-2419

Environment

None

Assignee

Thomas Scheffler

Reporter

Frank L├╝tzenkirchen

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

High
Configure