cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Lundberg <my.name.is.h...@gmail.com>
Subject Re: How to return xml from a flowscript?
Date Thu, 05 Jan 2006 12:53:11 GMT
Yes, de-serializing with util:eval works in some cases. However, it
does not work for documents that contain < or > in the text contents,
because that will then be de-serialized as well. This will cause an
error.
For instance, the XHTML:
<p> &lt;!-- Add here other XML:DB compliant databases' drivers --&gt; </p>

will be converted to (when it is all converted to a string.):
&lt;p&gt; &lt;!-- Add here other XML:DB compliant databases' drivers
--&gt;&lt;/p&gt;

Then, if I de-serialize that, I will get:
<p> <-- Add here other XML:DB compliant databases' drivers --> </p>

And that is is not good at all. So the problem remains....

Regards
Hans


On 1/5/06, Huib Verweij <huib@streamtec.nl> wrote:
> Jonas Lundberg wrote:
> > The xquery stores the XML file in eXist.
> > Thus, if I try to insert the xml file using an Xinclude in discuss.xq,
> > and then use an xinclude transformer after generation,
> > then it will be put there *after* the query is executed. Which is not
> > useful in this case, since the XML is needed during execution.
> >
> Hi,
>
> I'm curious about this too. I've so far serialised the XML in
> javascript, stored it in the session (this can be improved I think, it's
> 'not great') and passed the serialised version as a parameter to the
> xquery. In the xquery you can use util:eval() to de-serialise the XML
> (possibly skipping the XML declaration though). It's not great, but it
> works. Serialising your XML isn't 'cool', but when you use XML-RPC (like
> I do) it'll be serialised anyway, doesn't it?
>
> Regards,
>
> Huib.
>
> > Regards
> > Hans
> >
> > On 1/5/06, Geert Josten <Geert.Josten@daidalos.nl> wrote:
> >
> >>> Thanks for the replies.
> >>> The problem is that I then have use the xml in a pipeline that starts
> >>> with an xquery generator (this is the pipeline I call from the
> >>> flowscript):
> >>>      <map:generate src="xq/discuss.xq" type="xquery">
> >>>      <map:parameter name="cleanedxml" value="{flow-attribute:cleanxml}"/>
> >>>
> >> How is the xquery using the xml in the parameter? Is it an idea to have another
pipe that
> >> *generates* the discuss.xq which has your cleanedxml fragment included somewhere?
> >>
> >> Cheers,
> >> Geert
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
>
>
>
> ---------------------------------------------------------------------
> 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