cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: How to generate xml from request witrh jx generator ??
Date Wed, 11 Apr 2007 14:22:26 GMT

> 
> Hi all,
> 
> I try to xml from request witrh jx generator.
> 
> here is my sitemap, verysimple :
> 
> ...
>         <map:pipeline>
>             <map:match pattern="*">
>                 <map:generate type="jx" 
> src="make-gwprequest-from-param.jx">
>                     <map:parameter name="myparam" value="{1}"/>
>                 </map:generate>
>                 <map:serialize type="xml"/>
>             </map:match>
>         </map:pipeline>
> 
>  Here the make-gwprequest-from-param.jx file , very simple too :
> <?xml version="1.0" encoding="UTF-8"?>
> <GWPRequest xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
>      <cocoon>${cocoon.parameters}</cocoon>
>      <myparam>${cocoon.parameters["myparam"]}</myparam>
> </GWPRequest>

it is : ${cocoon.parameters.myparam}

Furthermore, if you want an xml presentation of the entire request, there is the request generator

Ard

> 
> Here are the results, very weird...
> Something i miss...????
> http://localhost:8080/cocoon/foo
> 
> <GWPRequest>
> <cocoon>Parameters[r/w]:{myparam=foo}</cocoon>
> <aaa/>
> </GWPRequest>
> 
> Regards,
> 
> -- 
> S├ębastien Geindre
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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