cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter van Hardenberg <...@uvic.ca>
Subject Data-driven decorator design
Date Wed, 20 Jul 2005 15:27:28 GMT
Hi all,

I'd like to "decorate" my XML files as an early processing step with XML from 
another source. The source documents are Shakespearean texts, and I want to 
use Cocoon to overlay annotations from various sources onto the file.

I am considering using map:aggregate, but it seems needlessly ugly to have to 
say something like this in every match:

<map:aggregate>
   <my old source>
   <my annotation file>
</map:aggregate>
<map:transform purpose="move the annotation file into the source and unwrap 
the new root node"/>
...

Does anyone have any advice about a Better Way? I am considering using the 
same approach I currently use to create templates. Start with a simple XSLT, 
XInclude the data for that request into it, then use a the cocoon:/ protocol 
transform step to interleave the two. That would let me move the whole ugly 
mess into a single line in each match rule and any messiness could be 
contained in an internal pipeline.

All the best,

-pvh

-- 
Peter van Hardenberg (pvh@pvh.ca)
Victoria, BC, Canada

Mime
View raw message