cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24326] New: - SQLTransformer mishandles columns with XML data that have XML Declaration
Date Sat, 01 Nov 2003 21:13:32 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24326>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24326

SQLTransformer mishandles columns with XML data that have XML Declaration

           Summary: SQLTransformer mishandles columns with XML data that
                    have XML Declaration
           Product: Cocoon 2
           Version: 2.1.2
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: sitemap components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: andrzej@chaeron.com


The SQLTransformer has a problem if you store XML data in a database column and 
the XML starts with a standard XML declaration (eg. something like: <?xml 
version="1.0"?> ).

The serializeData() method in the embedded Query class checks for an initial "<" 
character to see if it should try to parse the column data as XML.  The problem 
is that if the data in the column is valid XML, but has the declaration, when 
the code in that method wraps the column data in a <root> tag, this results in 
the declaration being inside a tag, thus causing the parsing to fail, and the 
method to revert to just copying the column data across.

Fix is to change the Query.serializeData() method to the following to test for 
and strip any initial XML declaration it finds.

Fixed code for this method will be attached.

....Andrzej

Mime
View raw message