cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yahoo <hansheinrichbr...@yahoo.de>
Subject Re: Jexl in embedded Pipeline
Date Thu, 13 Mar 2014 12:30:54 GMT
I used the EmailPlainPipe from the distribution:
   byte[] bytes = (byte[]) parameters.get("input");
         XMLGenerator generator = new XMLGenerator(bytes);
         this.addComponent(generator);
         byte[] xsl = (byte[]) parameters.get("xsl");
         Source xslSource = new StreamSource(new ByteArrayInputStream(xsl));
         XSLTTransformer transformer = new XSLTTransformer(
                 xslSource, new Date().getTime());
         // pass all parameter to the xslTransformer
         transformer.setParameters(parameters);
         this.addComponent(transformer);
         this.addComponent(TextSerializer.createPlainSerializer());
         super.setup(outputStream, parameters);
where input is:
<?xml version="1.0" encoding="UTF-8"?>
<angebot>
   <id>$name$$angebot.id$</id>
  <anganz>$angebot.anganz$</anganz>
<angkurzbeschreibung>$angebot.angkurzbeschreibung$</angkurzbeschreibung>
</angebot>
xsl is the identity
angebot is a Hibernate Bean.
how do feed the pipeline with this Bean that it is used  by Jexl to 
resolve the input String.


Am 13.03.2014 12:55, schrieb gelo1234:
> With servlet-sitemaps Jexl can be used within any pipeline as 
> {jexl:.....} value.
>
> Please show example of your embedded pipeline ?
>
> Greetings,
> Greg
>
>
> 2014-03-13 11:09 GMT+01:00 Yahoo <hansheinrichbraun@yahoo.de 
> <mailto:hansheinrichbraun@yahoo.de>>:
>
>     How can I use Jexl in an embadded Pipline ?
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <mailto:users-unsubscribe@cocoon.apache.org>
>     For additional commands, e-mail: users-help@cocoon.apache.org
>     <mailto:users-help@cocoon.apache.org>
>
>


Mime
View raw message