[ https://issues.apache.org/jira/browse/DDLUTILS-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499900 ]
Michael Lipp commented on DDLUTILS-174: --------------------------------------- I'm afraid this is exactly what I hinted at by "wrong API usage". Java specifications aren't always as clear as one might wish. Looking at XMLStreamWriter JavaDoc (from the JSR) you find: "The XMLStreamWriter does not perform well formedness checking on its input." Well, writing CDATA that contains "<![CDATA[...]]>" is writing data that is not wellformed, because CDATA sections may not contain "<![CDATA[...]]>". What woodstox does is (a) check wellformedness and (even worse) (b) modify input. By this it it does not behave according to the specification. The only case in which XMLStreamWriter is allowed to modify input is clearly mentioned in the API: "However the writeCharacters method is required to escape & , < and > For attribute values the writeAttribute method will escape the above characters plus " to ensure that all character content and attribute values are well formed." So what woodstox does to strings written with writeCData might be convenient, but it does not follow the specification. I have filed this as woodstox bug WSTX-120. > Not all "special characters" in content detected > ------------------------------------------------ > > Key: DDLUTILS-174 > URL: https://issues.apache.org/jira/browse/DDLUTILS-174 > Project: DdlUtils > Issue Type: Bug > Components: Core (No specific database) > Affects Versions: 1.0 RC1 > Reporter: Michael Lipp > Assignee: Thomas Dudziak > Attachments: liferay-db-schema.xml, patch.txt, populate-liferay-db.xml > > > Besides the characters already detected in > DataWriter.containsSpecialCharacters there is another "special character" > that requires using base64 encoding: "<![CDATA[". Because content is written > to XML within "<![CDATA[...]]>" it may not contain "<![CDATA[". -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.