You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Alexandre Borgoltz (JIRA)" <ji...@apache.org> on 2005/10/12 16:45:21 UTC

[jira] Created: (DDLUTILS-31) Generated XML data dump is invalid

Generated XML data dump is invalid
----------------------------------

         Key: DDLUTILS-31
         URL: http://issues.apache.org/jira/browse/DDLUTILS-31
     Project: DdlUtils
        Type: Bug
 Environment: any
    Reporter: Alexandre Borgoltz
 Assigned to: Thomas Dudziak 


in DataWriter, data is not "xml-escaped" before it is written to the xml file.
This makes invalid files. 
Typically, a '&' character like in "Heaven&Hell" should be escaped to "heaven&amp;Hell".
idem for <, >, ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-31) Generated XML data dump is invalid

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-31?page=comments#action_12331891 ] 

Thomas Dudziak commented on DDLUTILS-31:
----------------------------------------

That's not quite correct, DdlUtils uses commons-betwixt and commons-digester. I will definitely not use XmlBeans to this purpose because it for one is much too big a dependency, and I would have no control over the model classes which is important because they are part of the external API.
But you're right in that instead of using a simple Writer.write() call, this should be done via DynaBeans instead, where then betwixt does the proper escaping and encoding handling.

> Generated XML data dump is invalid
> ----------------------------------
>
>          Key: DDLUTILS-31
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-31
>      Project: DdlUtils
>         Type: Bug
>  Environment: any
>     Reporter: Alexandre Borgoltz
>     Assignee: Thomas Dudziak

>
> in DataWriter, data is not "xml-escaped" before it is written to the xml file.
> This makes invalid files. 
> Typically, a '&' character like in "Heaven&Hell" should be escaped to "heaven&amp;Hell".
> idem for <, >, ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DDLUTILS-31) Generated XML data dump is invalid

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-31?page=all ]
     
Thomas Dudziak resolved DDLUTILS-31:
------------------------------------

    Resolution: Fixed

I've rewritten the data writer so that it now uses StAX, and so should generate valid XML (with the exception of table & column names, some mechanism is needed here to generate valid, unique XML tag/attribute names for them).
Btw, escaping of &,<,> is not necessary for attribute values, but only for PCDATA content of elements. For these, the new data writer uses CDATA sections so that no escaping is needed.

> Generated XML data dump is invalid
> ----------------------------------
>
>          Key: DDLUTILS-31
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-31
>      Project: DdlUtils
>         Type: Bug
>  Environment: any
>     Reporter: Alexandre Borgoltz
>     Assignee: Thomas Dudziak

>
> in DataWriter, data is not "xml-escaped" before it is written to the xml file.
> This makes invalid files. 
> Typically, a '&' character like in "Heaven&Hell" should be escaped to "heaven&amp;Hell".
> idem for <, >, ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-31) Generated XML data dump is invalid

Posted by "Alexandre Borgoltz (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-31?page=comments#action_12331890 ] 

Alexandre Borgoltz commented on DDLUTILS-31:
--------------------------------------------

IMVHO, this bug together with DDLUTILS-30 (encoding troubles) raises the need for a real XML handling instead of the current manual stuff.
Digester is used for XML reading.
Maybe this could be refactored using XmlBeans for reading AND writing... this would let the programmer delegate the xml stuff to the tool and don't bother with it, and letting others [the xmlbeans in this case] maintain that part...

> Generated XML data dump is invalid
> ----------------------------------
>
>          Key: DDLUTILS-31
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-31
>      Project: DdlUtils
>         Type: Bug
>  Environment: any
>     Reporter: Alexandre Borgoltz
>     Assignee: Thomas Dudziak

>
> in DataWriter, data is not "xml-escaped" before it is written to the xml file.
> This makes invalid files. 
> Typically, a '&' character like in "Heaven&Hell" should be escaped to "heaven&amp;Hell".
> idem for <, >, ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DDLUTILS-31) Generated XML data dump is invalid

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-31?page=all ]

Thomas Dudziak updated DDLUTILS-31:
-----------------------------------

    Component: Core (No specific database)

> Generated XML data dump is invalid
> ----------------------------------
>
>          Key: DDLUTILS-31
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-31
>      Project: DdlUtils
>         Type: Bug

>   Components: Core (No specific database)
>  Environment: any
>     Reporter: Alexandre Borgoltz
>     Assignee: Thomas Dudziak

>
> in DataWriter, data is not "xml-escaped" before it is written to the xml file.
> This makes invalid files. 
> Typically, a '&' character like in "Heaven&Hell" should be escaped to "heaven&amp;Hell".
> idem for <, >, ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira