Don't create CDATA section yourself, use "cdata-section-elements" instead:
https://www.w3.org/TR/xslt-10/#output
In case you want to embed one XML into another without namespace pollution, you need to use dp:serialize, see bottom of this slide:
https://www.ibm.com/support/pages/system/files/support/swg/swgdocs.nsf/0/505bf6259618fd91852577510065f208/$FILE/WSTE-07082010-WebSphereDataPowerSOAAppliancesXSLTPart2of2TipsTricks-Stamm-Wilbrandt.pdf#page=9
------------------------------
Hermann Stamm-Wilbrandt
Compiler Level 3 support, IBM DataPower Gateways
IBM
Boeblingen Germany
------------------------------
Original Message:
Sent: Mon January 29, 2024 08:55 AM
From: Joseph Morgan
Subject: How to convert String to BLOB in Datapower XSLT
Generally speaking, you want to use the CDATA element.
<![CDATA[blob data]]>
------------------------------
Joseph Morgan
Original Message:
Sent: Mon January 29, 2024 12:24 AM
From: Ashok Beshra
Subject: How to convert String to BLOB in Datapower XSLT
Hi Team...
I am doing a transformation in Datapower using XSLT and creating an XML message and I wanted to know how to convert String to BLOB in XSLT. This is required as one of the element in output XML should have BLOB data. Please let me know how to convert String to BLOB in Datapower XSLT. Thanks
------------------------------
Ashok Beshra
------------------------------