> From: Tammo van Lessen [mailto:[EMAIL PROTECTED]]
> 
> 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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to