cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier del Gesu <delgesu-coc...@thinknola.com>
Subject Re: What's "wrong" with use of the document() function in Cocoon?
Date Tue, 14 Oct 2003 22:13:59 GMT
* Tony Collen <colle006@umn.edu> [2003-10-14 20:53]:
> gerritjan wrote:
> 
> >Hello,

> >Using the document() function for aggregation in Cocoon may break 
> >Separation of Concerns (SoC). That is, the designers of Cocoon view 
> >inclusion and transformation as different functions, best handled by 
> >separate Cocoon components. Treating them separately allows you to 
> >achieve performance gains and increases the resusability of your pipelines.
> 
> <snip what="code"/>
> 
> >Question's
> >Am I mixing concerns here?
> 
> I think so, but I'm no expert :)
> 
> >How can I avoid document()?
> 
> Use the CInclude transformer.  Specifically, I bet you could cleverly 
> combine the DirectoryGenerator, and the CIncludeTransformer in a way to 
> duplicate this functionality.

> I would expect the pipeline snippit to look something like this:

> <map:match pattern="autoindex">
>   <map:generate type="directory" src="any/dir/"/>
>   <map:transform src="xslt/dir2cinclude.xsl"/>
>   <map:transform type="cinclude"/>
>   <map:transform src="xslt/listing2html.xsl"/>
>   <map:serialize type="xhtml"/>
> </map:match>

CInclude doesn't seem to have the control needed to do complicated
inclusions ala XInclude. How does one go about merging two XML
documents? Say you wanted to pull quotes out of a DocBook document
into a summary page? Indexing into documents, it seems that XSLT is
the best practice. (Trying to sort this out myself, third day with
Cocoon.)

-- 
Javier del Gesu - delgesu@thinknola.com

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


Mime
View raw message