You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joel McConaughy <jo...@displayware.com> on 2004/07/07 01:09:33 UTC

SQL Transformer: inserting XML into TEXT column?

I'm trying to insert some XML into a text column using the SQL 
Transformer however the element tags are getting removed and only the 
text elements are getting into the insert statement.  Is there a way to 
do this?  Thanks.

joel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: SQL Transformer: inserting XML into TEXT column?

Posted by Joel McConaughy <jo...@displayware.com>.
Here's the solution.  The SQLTransformer has a hard-coded property in 
the public constructor that sets the output method for the javax 
transformer to "text".  I changed this to "xml", recompiled, and it 
worked fine.  I think this should be an optional parameter to the 
transformer, something like:

<parameter name="output-method" value="text|xml|html"/>

There is already a parameter "xml-encoding" to set the character 
encoding so this isn't breaking new ground.  I have never submitted a 
patch before but this looks like something I could do.  Is there a 
process for getting consensus on changes like this or do I just 
following the wiki instructions?  Thanks.

joel

Joel McConaughy wrote:

> I'm trying to insert some XML into a text column using the SQL 
> Transformer however the element tags are getting removed and only the 
> text elements are getting into the insert statement.  Is there a way 
> to do this?  Thanks.
>
> joel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org