cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <christofer.d...@c-ware.de>
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 ;)

Chris





-----Urspr√ľngliche Nachricht-----
Von: Philippe LAPLANCHE [mailto:philippe.laplanche@horus-si.com] 
Gesendet: Donnerstag, 17. Juli 2008 08:20
An: users@cocoon.apache.org
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}">
	<item>${res.xmlstring}</item>
</jx:forEach>

I'd except to have 
	<item>
		<name>martin</name>
		<number>123213</number>
	</item>

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

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 ?

Thanks

Philippe


---------------------------------------------------------------------
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


Mime
View raw message