* Tony Collen <[EMAIL PROTECTED]> [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 - [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
