cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: parse generated xml and react in sitemap
Date Mon, 22 Jul 2002 15:26:02 GMT
> From: Tammo van Lessen [mailto:cusers-list@taval.de]
> 
> Hello,
> 
> I'm pretty new in cocoon and i have a problem and no idea how to solve
it by
> using actions/transformer.
> 
> I'm using xindice and i store there some document descriptors like
this:
> 
> <file>
> 	<title>testfile</file>
> 	<storepath>/var/storage/1234.store</storepath>
> 	<origname>testfile.pdf</origname>
> 	<mimetype>application/pdf</mimetype>
> </file>
> 
> I match all *.store requests and retrieve this xmlpart from xindice.
> 
> Now my problem: I want to serve the file "1234.store" as
"testfile.pdf" with
> the mimetype specified in the xmlpart.
> 
> How can i parse my xmlpart to get the mimetype and pass it to the
reader in
> the sitemap?

Using action. Write your action which reads this <file/> fragment into
DOM/SAX, extracts <storepath>, <origname>, <mimetype> and returns these
values in the Map to the sitemap.

Then, pass these values to the regular reader.


Vadim


> Or do I have to write my own reader? If yes, is it possible to pass
the
> generated xmlpart to the reader or do i have to retrieve this part
from
> xindice in the new reader to?
> 
> Thanx a lot,
>   Tammo


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message