db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Lipp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-174) Not all "special characters" in content detected
Date Thu, 24 May 2007 07:53:16 GMT

    [ https://issues.apache.org/jira/browse/DDLUTILS-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498536

Michael Lipp commented on DDLUTILS-174:

Here comes what happens in greater detail.

I have a database that has XML data in varchars. When DdlUtils writes the data to its XML-<data>
file, it puts "<![CDATA[...]]>" around the content of varchar columns' content that
is written as XML Text and contains XML (I don't know if columns with XML-content are ever
written as attributes, it doesn't happen with my database). In general this approach is fine.
If, however, the XML contained in the column already includes "<![CDATA[...]]>" sections,
this approach fails because you get nested CDATAs.

Your comment seems to assume that DdlUtils escapes all '<'s instead of using "<![CDATA[...]]>".
This assumption is definitely wrong! I can send you the output file, but I think you believe
me that I can tell the difference ;-).

Of course, protecting a column's XML content by escaping the '<'s instead of using "<![CDATA[...]]>"
is a valid alternative to my approach of considering "<![CDATA[" a "special character".
But either must be implemented. As DdlUtils behaves currently, we get an invalid <data>-file.

> 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
>         Assigned To: Thomas Dudziak
>         Attachments: patch.txt
> 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.

View raw message