Hi Jarry,
the simplest possibility is to use the source writing transformer
(http://cocoon.apache.org/2.1/userdocs/transformers/sourcewriting-transforme
r.html). You just have to modify your XQuery statement, to get the xml which
would be expected by the transformer (or you can leave your query as
Hi Jarry,
the simplest possibility is to use the source writing transformer
(http://cocoon.apache.org/2.1/userdocs/transformers/sourcewriting-transforme
r.html). You just have to modify your XQuery statement, to get the xml which
would be expected by the transformer (or you can leave your query as
Sebastien Arbogast wrote:
> Hi,
>
> I'm looking for a simple way to inject the string content of a
> flowscript variable into a pipeline for serialization and sending. Of
> course I could do a sendPage() but that would force me to :
> 1 - create a dummy JXTemplate to inject the value of my flow va
> I would put the string in the request scope, then sendPage() to a
> pipeline where a custom generator picks it up and feeds it to the SAX
> pipeline.
>
> How does that sound?
It depends on what you mean by "put the string in the request scope".
I don't really understand how to translate that in
Sebastien Arbogast wrote:
>
> It depends on what you mean by "put the string in the request scope".
> I don't really understand how to translate that in code. Could you
> explain ?
1) Flow
// mystring contains your xml
cocoon.request.setAttribute("myxml", mystring);
// now forward to pipeline
c
Why not simply:
1. flow
cocoon.sendPage("mypipeline", {"myxml": mystring})
2. jxtemplate
${myxml}
3. sitemap
Or more general:
cocoon.request.setAttribute("myxml", mystring);
cocoon.sendPage("mypipeline");
template:
${cocoon.request.getAttribute(cocoon.parameters.myxml)}
sitemap:
Zbigniew Bomert OP wrote:
>
> ${myxml}
>
Are you sure this works when myxml contains xml tags ? Surely the
downstream parser chokes on it as you're effectively writing tags in a
text node ?
Jorg
-
To unsubscribe, e-mail: [
Well, I don't know java actually. I use such template with following
flowscript (the function I found somewhere on the list):
myxml = getPipeline("mypipeline");
function getPipeline(uri, viewData) {
var pipelineUtil =
cocoon.createObject(Packages.org.apache.cocoon.components.flow.util.Pipeli
Zbigniew Bomert OP wrote:
> function getPipeline(uri, viewData) {
> var pipelineUtil =
> cocoon.createObject(Packages.org.apache.cocoon.components.flow.util.PipelineUtil);
> var result = pipelineUtil.processToDOM(uri, viewData);
> cocoon.disposeObject(pipelineUtil);
> return r
Well. I found a solution.
At first I had tried the JXTemplate solution similar to what Zbigniew
proposed. But effectively it didn't work because all my "<" were
transformed into "<" etc.
Finally I understood the role of a function proposed by joose in the
context of Jan's approach for a web service
10 matches
Mail list logo