cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: Micro-Cocoon ... Corona
Date Fri, 14 Mar 2008 07:01:10 GMT
Bruce Atherton wrote:
> Carsten Ziegeler wrote:
>> Reinhard Poetz wrote:
>>>
>>> This rewrite that we gave the name "Corona" consists of
>>>
>>>  . a pipeline API (that isn't limited to XML pipelines but would also
>>>    support connecting of any types of pipes)
>> Do you have use cases for this? (Just curious)
> I can think of a lot of them. Any time you want to make replacements in 
> text where the source is not XML this could be useful. How about 
> replacing property keys with property values, just as an obvious 
> example. Or translating a text file to another language by looking up 
> phrases in a resource bundle. Sure, you could use a templating engine, 
> but that may be overkill for some applications and besides, suppose you 
> wanted to do several unrelated replacements that used different kinds of 
> templates?
> 
> Or suppose you wanted to make changes to HTML generated by some other 
> website that doesn't generate XHTML or even very sensible HTML? There 
> are many reasons you might want to do this: to extract a bit of content 
> from the page, to filter certain words, to alter URLs. I wrote a spider 
> once that archived the state of a web application as of a certain day. 
> It crawled web pages and replaced URLs with "file:" URLs that pointed to 
> where the web page was stored locally. This was complicated by the fact 
> that many web pages with the same URL would display different data 
> depending on request parameters, and so had to be stored in different 
> places but still be pointed to by the links if you followed a particular 
> path through the stored HTML files. This was only one of many cleanups I 
> needed to make to the archived HTML. Cocoon didn't help me because there 
> was no reasonable way to get the HTML into XHTML. A non-XML pipeline 
> would have helped a lot.

yes, these are interesting use cases. Also image transformations might be a 
possible use case.

But the main usecase I had in mind was XML pull pipelines because writing a pull 
transformer would much easier than writing a SAX transformer.

-- 
Reinhard Pötz                            Managing Director, {Indoqa} GmbH
                           http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair        reinhard@apache.org
_________________________________________________________________________

Mime
View raw message