Re: Jexl in embedded Pipeline

Yahoo <[email protected]> Thu, 13 Mar 2014 13:30:54 +0100
Newsgroups gmane.text.xml.cocoon.user
Message-ID <[email protected]>
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 <[email protected] 
> <mailto:[email protected]>>:
>
>     How can I use Jexl in an embadded Pipline ?
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [email protected]
>     <mailto:[email protected]>
>     For additional commands, e-mail: [email protected]
>     <mailto:[email protected]>
>
>