On 11.05.2007 18:01, Derek Hohls wrote:
It seems
that, in your case, you will need to write an XSL file (or series of
files) to process the data from the data XML file.
I'd indeed go with this approach. The advantage is, you can do this step
before switching your datasource and test it. If it works just switch
the datasource and it should still work. This also proves Derek's
statement of better separation of concern.
I'd probably go with aggregation:
<map:match pattern="report/*.xml">
<map:aggregate>
<map:part src="report-data/{1}.xml"/>
<map:part src="report-layout/{1}.xml"/>
</map:aggregate>
<map:transform src="stylesheets/mergeDataAndLayout.xsl"/>
<map:transform type="i18n" />
<map:transform src="stylesheets/doc2pdf.xsl" />
<map:serialize type="fo2pdf" />
</map:match>
If you need more than just include static files, you can change the
<map:part>s to pipelines:
<map:part src="cocoon:/report-data/{1}.xml"/>
Then you add a pipeline handling this (in internal pipelines):
<map:match pattern="report-data/*.xml">
<map:generate src="report-data/{1}.xml"/>
<map:serialize type="xml"/>
</map:match>
This does now the same as above, but you can switch the generator to
anything you want to and maybe add transformer preparing the data for
merging with the layout.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]