cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Pietschmann" <dev.sen...@gmail.com>
Subject AW: Core Documentation
Date Mon, 21 Nov 2005 08:22:36 GMT
No actually you got it right, but the point is that every element can have
that attribute, so I'd have to write such an action around every element in
the pipeline. We have quite a long pipeline, so this seems a bit bulky to me
and I'd want a more elegant solution.

Stefan
 
| -----Urspr√ľngliche Nachricht-----
| Von: Christoph Hermann [mailto:christoph.hermann@guschtel.de]
| Gesendet: Montag, 21. November 2005 09:15
| An: dev@cocoon.apache.org
| Betreff: Re: Core Documentation
| 
| Stefan Pietschmann schrieb:
| 
| Hello,
| 
| > | What do you mean by "attributes". Transformers, etc. can have
| hardwired
| > | attributes associated with them when they are configured in the
| > | component section of the sitemap. In addition, they can have
| parameters
| > | declared in the pipelines which are passed as parameters to the setup
| > | method.
| >
| > The elements in the pipeline shall have attributes like
| >
| > <map:transform type="xyz" conf="someID"/>
| >
| > once this node is transfered, the code should use the manager and this
| > attribute to decide, whether to append the component to the pipeline or
| not.
| 
| So you want to have parts of the sitemap executed dependent on some sort
| of value?
| Why not use an action? The contents of the action are only executed if
| you return an Hashmap (i.e. you can check your ID and decide).
| (Maybe i didn't understand your problem well?)
| 
| <map:match ...>
| ...
| <map:act type="myAttributeCheckAction">
| 	<map:parameter name="conf" value="someID" />
| 	<map:transform src="..." />
| </map:act>
| <map:act type="myAttributeCheckAction">
| 	<map:parameter name="conf" value="someOtherID" />
| 	<map:transform src="..." />
| </map:act>
| ...
| </map:match>
| 
| HTH
| Christoph


Mime
View raw message