data lost in xml after transformation
Using Oracle Database version 19.16 (but problem also identified in 21).
I'm encountering a problem that whitespace-only text nodes are lost after a transformation with xquery/xslt. Even while de xml contains xml:space="preserve" and the transformation doesnt touch the concerning text nodes.
Steps to reproduce:
- Store xml (with whitespace-only text nodes) as xmltype (binary) in a table
E.g. <p xml:space="preserve">This <b>is</b> <i>a</i> test.</p>
(Note the space between "is" and "a".) - Retrieve the xml from the table
- Transform the retrieved xml
select xmlquery('
copy $tmp := .
modify ()
return $tmp
' passing v_xmldata returning content