Think you should take a look at the streamgenerator, that should do the job
AS
>
>
> I am quite new to flowscript, so this is a basic quesiton...
> However, I have not been able to get any of the examples I found on
> Google to work.
>
> I have the following flowscript:
> function cleanWordHt
It reads a Cocoon pipeline, which converts a Word HTML file to XML.
Then it sends this as a string in a parameter, to a pipeline that
processes it further.
Why not read WordML? :)
What I *would like* to do, is to send XML in the parameter, instead of a string.
Is this possible? Does anyone hav
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):
Therefore, I have to send the xml as a parameter. I could not figure
out how to do that with the stream generator ei
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):
How is the xquery using the xml in the parameter? Is it an idea to have another pipe that
*generates* the discuss
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.
No, this is not what I meant. You can replace:
src="xq/discuss.xq"
by:
src="cocoon:/insert-whtm-in-query/discuss.xq/path-to-whtm"
And create an new pipeline that includes the cleaned whtm into your xquery
instruction.
:-)
Jonas Lundberg wrote:
The xquery stores the XML fil
That would work, if I could do it...
But xqueries are not written in XML, so how can I then include the XML
in a good place in my xquery?
:-(
Hans
On 1/5/06, Geert Josten <[EMAIL PROTECTED]> wrote:
> No, this is not what I meant. You can replace:
>
> src="xq/discuss.xq"
>
> by:
>
>
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
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:
Err, perhaps switch to the XML syntax of the XQuery language? That should be available and I would
be surprised if it is not supported.
I believe there are converters that can translate one to the other..
Regards,
Geert
Jonas Lundberg wrote:
That would work, if I could do it...
But xqueries
That might work, but it is not a good solution for me, although it
might work in other cases. My xqueries are very complex.
But this can't end here, can it? Is there really no way of returning
XML in a parameter from a flowscript in Cocoon?
Regards,
Hans
On 1/5/06, Geert Josten <[EMAIL PROTECTED
You can parse the output stream in Flowscript, just like you would in Java or Javascript and put a
DOM object in the parameter you are passing to the pipeline, but I really don't know how you should
access it from your xquery generator. You could try to use the eval function as well?
Regards,
G
Jonas Lundberg wrote:
The xquery stores the XML file in eXist. (...)
You can store xml in eXist from flowscript, without using xquery, as
described in:
http://wiki.apache.org/cocoon/CformsExistAndFlow
Zbigniew Bomert
-
To
So, what you are saying now is that you cannot pass an xml document as
a parameter in Cocoon, at all?
If one can pass xml documents as parameters, then...
How would I parse the output stream, and pass along the DOM object?
Regards
Hans
On 1/5/06, Geert Josten <[EMAIL PROTECTED]> wrote:
> You can
Does the xquery do any processing on the xml, or does it just use
eXist's update extensions to store it as-is? If you need to do the
latter you can use an XMLDBSource to write the file directly into eXist
from your flowscript.
Jonas Lundberg wrote:
The xquery stores the XML file in eXist.
Th
Thanks,
yes that would be a good way to store the document. (I currently do
that using XSP)
However, I should add that the xQuery is the core of a content
management system, so it also does version management, among other
things, (while storing the file). Therefore, storing a temporary file,
does
So, what you are saying now is that you cannot pass an xml document as
a parameter in Cocoon, at all?
What do you mean with xml document and what with parameter?
The parameters you pass from FlowScript can contain any object type, but I'm pretty sure that
does not allow that. That is probably
Right. It is not possible to pass the XML to an qxuery pipeline
(starting with an xquery generator), then (unless it is passed as an
escaped string). Thanks for the explanations.
That leaves two options, since the xquery generator does not support
the Cocoon protocol.
a) store from flowscript.
b)
I think you are missing the option of running the XQuery directly from
the flowscript using your xml as context document. This is what we are
doing with X-Hive's XQuery implementation.
Jonas Lundberg wrote:
Right. It is not possible to pass the XML to an qxuery pipeline
(starting with an xque
That sounds like a very attractive solution.
How is that done? Do you have an example to share?
Regards
Hans
On 1/6/06, Suzan Foster <[EMAIL PROTECTED]> wrote:
> I think you are missing the option of running the XQuery directly from
> the flowscript using your xml as context document. This is wha
* Jonas Lundberg:
> That might work, but it is not a good solution for me, although
> it might work in other cases. My xqueries are very complex. But
> this can't end here, can it? Is there really no way of returning
> XML in a parameter from a flowscript in Cocoon?
Sitemap parameters are Stri
The problem however with using variables is that eXist can only operate
on it's own persistent DOM implementation within the query. You need to
create a temporary document to pass to the XQuery. I hit this problem
when writing an extension function for processing the request as XML
(sent by an
That seems promising. However, the "Module.NAMESPACE_URI,
Module.PREFIX" part gives me 4 compilation errors, starting with:
[javac] E:\Program\eXist1203\src\com\nps\xquery\request\DocFunction.java:30:
cannot find symbol
[javac] symbol : variable Module
I have not written any extension mo
23 matches
Mail list logo