cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject Re: problem in map:read version 2.1.4
Date Fri, 02 Apr 2004 20:11:59 GMT
CLEMENTE,GRAZIA (HP-Italy,ex1) wrote:

> Thanks for your response!
> Can you suggest me, please, one of the alternative way supported by cocoon
> protocol to read cocoon:/ pipelines with a serialized output?

Well, first of all you have to explain me why you'd want to do that. :-)

Serialized output is, by definition, not guaranteed to be XML anymore: 
imagine that you're trying to read something that ends with a fo2pdf 
serializer, you would be injecting PDF inside context that expect SAX 
events. So, this is a no-no, there is no way (on purpose) to do that.

But what, from your sitemap, seems to me that you want to achieve is 
"aliasing" a resource: what gets generated via the match "wifi/internal" 
should be the same result you get when you ask for "wifi/prova". There 
are a number of ways of doing it: the cleanest one to me would be using 
the regexp matcher so that both resources are handled by the same pipeline:

<map:match type="regexp" pattern="wifi/(prova|internal)">

Second option is redirect:

<map:match pattern="wifi/prova">
     <map:redirect-to uri="wifi/internal/>

A third option is using resources (even though they weren't exactly 
designed to do that, so we're entering the hacky way):

<map:resource name="bla">


<map:match pattern="wifi/prova">
     <map:call resource="bla"/>

<map:match pattern="wifi/internal">
     <map:call resource="bla"/>

... not to mention the hackiest way ever:

<map:match pattern="wifi/prova">
     <map:read src="http://localhost:8888/wifi/internal"/>

(but don't quote me on this one :-))

If this is not enough, well, I guess I'll need some more background on 
what you're trying to achieve and why.


Gianugo Rabellino
Pro-netics s.r.l. -
Orixo, the XML business alliance -
     (Blogging at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message