cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lange" <>
Subject Linkrewriter dynamic configuration overloading syntax pitfall (Javadoc out of sync, Cocoon 2.1M1)
Date Sun, 11 May 2003 04:10:27 GMT
Dear all

I had a hard time figuring out how to dynamically overload the configuration
of the input modules used for the LinkRewriter configuration. I believe
there is a syntax pitfall in the Javadoc of Cocoon 2.1M1, the Javadoc being
out of sync on this topic.

I discovered the Linkrewriter in Forrest 0.4, studied its configuration,
then followed the Javadoc and overlooked the sitemap configuration of the
bookdemo and sitedemo samples of Cocoon 2.1M1. Here is a summary.

The Javadoc notes that the "dynamic config syntax [is] different to the
static config syntax (attributes used instead of elements)"
(, lines 114-116). So one is suggested to write:

      <map:transformer name="linkrewriter"
        <input-module name="linkmap" src="{src}" ... />
        ...                          ^^^ attribute: does not work

I tried, but this didn't work. The linkwriter would not use the sitemap's
substitued value of the 'src' attribute to get the "Linkmap", it rather used
the value of the static configuration defined in the cocoon.xconf file:

  <component-instance name="linkmap" ...>
    <file src="cocoon://linkmap"/>

To dynamically overload the cocoon.xconf's static configuration, one has to

  <map:transformer name="linkrewriter" src="..."
    <input-module name="linkmap" ... >
      <file src="{src}"/>

There is actually no difference to the static configuration syntax. The
samples use this later syntax and work fine.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message