If you use the SQLTransformer to query a column where the contents of the 
column is itself valid XML content, SQLTransformer seems to escape all of the 
< and > characters, so that the result you get back looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:sql="http://apache.org/cocoon/SQL/2.0";>             
        <rowset xmlns="http://apache.org/cocoon/SQL/2.0"; name="readPackage">
                <row>
                        <id>3</id>
                        <package>
                                &lt;?xml version="1.0" encoding="UTF-8"?&gt;&#13;
                                &lt;package version="1.0"&gt;&#13;                     
                                 
                                &lt;id&gt;000000314159&lt;/id&gt;&#13;&lt;/package&gt;
                        </package>
                </row>
</rowset>

You can see how the content of the "package" colum is returned as escaped 
XML.

My question is how to transform the escaped XML back into something useable 
within Cocoon, since I need to be able to stream the result out of a 
transformation and into other transformations in a pipeline.

Should I do a transform where I do substring replacements (eg. "&lt;" 
replaced with "<", etc?) or is there a more simple/elegant solution to this?

Thanks!
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com

Reply via email to