You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Andrew Sterling Hanenkamp <st...@hanenkamp.com> on 2002/08/02 17:42:03 UTC

OutputModule question/suggestion

I'm doing some experimentation/research with the
input/output/autoincrement modules and I've noted that the output
modules prefix all attributes set with either the setting in
"key-prefix" or the string
"org.apache.cocoon.components.modules.output.OutputModule" and a colon.
The JavaDoc states the reason as:

Configuration option &lt;key-prefix&gt; defaults to
 * "org.apache.cocoon.components.modules.output.OutputModule"+":"

but gives no reason as to why this was done. Because of this feature I'm
going to be writing my own OutputModules to duplicate the purpose of the
built-in ones, but without the key-prefix.

My question is, why is the key-prefix used? 

My suggestion is, can we have the option to turn it off altogether?
(Remove the whole prefix including the colon so that we have a more
natural 'key'='value' instead of 'prefix:key'='value'.)

Thanks,
Sterling
-- 
<>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><>
<>< ><>
  Andrew Sterling Hanenkamp
  http://Andrew.Sterling.Hanenkamp.com/
  sterling@hanenkamp.com / sterling@cis.ksu.edu

  Friends, there comes a time in every man's life where he has to look
the
  potato of injustice right in the eye.           -- Michael Richards,
UHF


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


Re: OutputModule question/suggestion

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 02.Aug.2002 -- 10:42 AM, Andrew Sterling Hanenkamp wrote:
> I'm doing some experimentation/research with the
> input/output/autoincrement modules and I've noted that the output
> modules prefix all attributes set with either the setting in
> "key-prefix" or the string
> "org.apache.cocoon.components.modules.output.OutputModule" and a colon.
> The JavaDoc states the reason as:
> 
> Configuration option &lt;key-prefix&gt; defaults to
>  * "org.apache.cocoon.components.modules.output.OutputModule"+":"

> My question is, why is the key-prefix used? 

The reason is to avoid clashes. Ideally, you should prefix all the
request attributes &c. with a fully qualified classname. That's what
the javadoc to request attributes say.

> My suggestion is, can we have the option to turn it off altogether?

Sure. Patch welcome.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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