cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: XML Serializer ?
Date Mon, 30 Oct 2006 14:08:47 GMT
Hello,

It is in block/webdav

Ard


thanks Ard. 
I will look into it.

btw, is the WebDavTransformer a present in cocoon??
I hv 2.1.9 cocoon source, and it doesnt contain this transformer.

-S.


 
On 10/29/06, Ard Schrijvers <a.schrijvers@hippo.nl> wrote: 
Hello,

Hmmm, well, untill the very last sentence, I would say, yes, it is definitely a transformer
(look at the WebDavTransformer, it is typically doing what you want) 

But when you want to include PDF....well, in that case, an xml serializer seems to be useless
anyway, but also a transformer. When you want to get binary data, use a reader, and customize
it according your needs. Look at reader examples in cocoon, like ResourceReader, ImageReader
and stuff. 

Perhaps you are trying something similar to what we have at hippo:

We have a repository (slide), which contains binaries and xml docs.

We communicate over webdav

>From cocoon, we use a repository:// (custom) source factory for document gets. Depending
on the matcher in cocoon (/binaries/** or /content/**) we know if we use a reader (binary)
or a generator (xml file) for it. We also use a webdav transformer, with which we can query
the repository through dasls (xml search, similar to sql) 

What I do think, is that what you want, is to have a custom generator or transformer, like
we use at hippo. I do not really understand why you want to put in /append stuff in the serializer
phase of cocoon. Sounds to me like you are using cocoon upside down: first generate some templates,
and then parse the content, and post specific parts to external server and append the result.
It is way more easy and logical, to write a source-factory that handles this for you (you
should be able to find some examples on it, otherwise let me know). This source-factory either
return binary data, you then just use it in a reader. If xml, you can use xslt to process
the xml further, and output it as xhtml, html, xml, text,pdf, svg, whatever you want. This
is cocoon's real purpose and power.. 

Regards Ard



hey Ard,

thanks for your reply.

here is wht I wud say. Yes, I dont have a lot of cocoon experience but understand the difference
between a serializer and transformer. I know, a pipeline need not have a transformer. it can
directly have a generator followed by a serializer. 

when I used the startDocument/startElement method, what I wanted to do was look for a specific
XML tag and  when found, get a URL from one of the attributes in that tag. In that case, the
content of the XML that was passed to the serializer wasnt what was to be used in the serialized
output but rather something processed from the URL that i got in the XML. There cud hv been
any number of such URL's in the XML...and hence i was looking for it in the startElement method.
Let me know, if I did anything incorrect. 
So, I am not doing any transformations with the XML...in that case and hence I felt that the
serializer was the correct option.

what I am looking to do now is... get the whole XML content and POST it to a server and get
the response back from them. Shud this be done in a transformer??? 
will a transformer work, if the response from the server can actually be a PDF???

-Ed.


---------------------------------------------------------------------
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