cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: gzip-ed xml
Date Mon, 27 Sep 2004 14:27:06 GMT wrote:

>I'm developing website which syndicate rss from
>but slashdot rss seems encoded,
>cocoon can not parse it via: generator src="http://"
>Is there any way to parse it?
Interesting. I don't know of any way to do this with Cocoon as it 
stands. (I may just not know about it).

However, it seems possible from Java. I'd suggest you consider writing a 
gzip source, so that you can say <map:generator src="gzip:blah"/>. I 
guess you could code it as a wrapper around another source so you'd have 
<map:generator src="gzip:http://blah"/>

public class GZipSource extends FileSource {
    String gzipUri;
    public GZipSource(String uri) {
        gzipUrl = uri;
    public getInputStream() throws IOException, SourceNotFoundException {
        return new GZipInputStream(super.getInputStream());

You'd probably need to do a bit of tidying, and you'd need to declare 
the new class within cocoon.xconf. It'd be a useful new class (assuming 
it isn't there already).

Hope that incomplete answer helps!

Regards, Upayavira

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

View raw message