Robin Rigby a écrit :
Something with an action [1] or XSP action [2]?
generator
transformer A
action
-- transformer B1
-- transformer C
-- serializer
transformer B2
transformer C
serializer
The action analyses the stream from transformer A and returns
<action:set-success/> or <action:set-failure/>. On success, the content of
the action is executed: tB1:tC:s and execution ends. On failure, the
content is skipped and execution continues.
Interresting, i thought action was performed before the pipe execution.
The sitemap provides the following elements:
* Redirector--to perform redirects within the Action based on your
logic.
* SourceResolver--to find resources.
* Object Model--to gain access to the request, context, and session
objects.
* Source--the string defined in the "src" attribute in the Sitemap.
* Parameters--the parameters defined in the Sitemap at runtime.
so in my custom action
public Map act( Redirector redirector, SourceResolver resolver, Map
objectModel, String source, Parameters params )
throws Exception
where can i find my xml data ?
i have to parse it to check what i want to check
And if it is ok, it will return a hashmap.
will the transformer B1 be able to process the same xml data ?
thanks for help.
Robin
[1] http://localhost/cocoondox/2.1/userdocs/concepts/actions.html
[2] http://wiki.apache.org/cocoon/XSPAction
-----Original Message-----
From: Sébastien Geindre [mailto:[EMAIL PROTECTED]
Sent: 20 November 2007 14:07
To: users@cocoon.apache.org
Subject: xpath condition on xml data in sitemap
hi all,
i need to make a conditional treatment in my sitemap :
generator --> transformer A -----(if condition on xml)-----> transformer
B1 ----------|---> transformerC --> serializer
(else) -----> transformer B2 ----------|
How can i make this condition on xml data in the stipe map ?
Which component should i use ?
the condition could be an xpath expression...
thanks for your help.
--
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]