cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <>
Subject AW: xml in string in jxtemplate
Date Thu, 17 Jul 2008 16:43:23 GMT
Hi Philippe

Try using the new org.apache.cocoon.template.JXTemplateTransformer in
combination with the <jx:out value="${res.xmlstring}" xmlize="true"/>

That should do the trick ;)


-----Urspr√ľngliche Nachricht-----
Von: Philippe LAPLANCHE [] 
Gesendet: Donnerstag, 17. Juli 2008 08:20
Betreff: xml in string in jxtemplate 

Hello everyone,

I have xml fragments of data in a column of a table in a database and I
want to format the data and put it on a web page.

I can't make it work. The current approach I use is maybe not the right
one. Can you advise please ?

Here's how I try to do it and why I'm failing : 

I'm using 2.1.11

I make my sql request from a java class and then from a flowscript I
send the result to the pipeline which handles presentation stuff :

cocoon.sendPageAndWait("result.jx",{"sqlresult" : sqlresult });

And finally, in the jxtemplate I loop through the sql results :

<jx:forEach var="res" items="${sqlresult.rows}">

I'd except to have 

And then the next step of the pipeline, an xstl stylesheet, would have
templates to handle the presentation of the <item> element and its

BUT the jxtemplate escapes the xml tags, he replaces < by &lt; and > by
&gt; so the xsl stylesheet can't present the data  

So how can I make things work ?



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message