RFR(JDK 14/java.xml) 8223291: Whitespace is added to CDATA tags when using OutputKeys.INDENT to format XML

Daniel Fuchs daniel.fuchs at oracle.com
Tue Jul 2 08:21:21 UTC 2019


Hi Joe,

I haven't spotted anything obviously wrong.

> The content of "abc<![CDATA[ & ]]>xyz" should be "abc & xyz", not "    abc\n & \n    xyz\n" as that before this fix. 

Maybe the test could have a test case for that specific example too?
Just to make sure whitespaces in CDATA aren't eaten away?

best regards,

-- daniel


On 01/07/2019 20:46, Joe Wang wrote:
> Please review a fix to xml pretty print. This is a regression introduced 
> during the JDK 9 development. CDATA is marked up to be interpreted 
> literally as textual data, in other words, it's still character data. 
> The processor therefore shall treat it as text data. The content of 
> "abc<![CDATA[ & ]]>xyz" should be "abc & xyz", not "    abc\n & \n 
> xyz\n" as that before this fix.
> 
> JBS: https://bugs.openjdk.java.net/browse/JDK-8223291
> webrev: http://cr.openjdk.java.net/~joehw/jdk14/8223291/webrev/
> 
> Thanks,
> Joe
> 



More information about the core-libs-dev mailing list