<. Hi Armaz! .>

Wednesday, June 30, 2004, 12:40:36 PM, you wrote:


AM> I have big trouble deciding transform-src on runtime based on some value I
AM> get from an action and xsp.
AM> The point is, by the time I enter the "match" I don't know what the filename
AM> is. I need to extract it from 
AM> my database. 
AM> As you see I have tried to use session-attr-module. I set the
AM> HTML_stylesheet attribute in my report.xsp. 
AM> However it seems the pipeline reads the transform-src before running the
AM> xsp. This behavior is very
AM> unfortunate.


AM> <map:match pattern="report">
AM>     <map:generate type="serverpages" src="xsp/report.xsp"
label="content"/>>
AM>     <map:transform src="{session-attr:HTML_stylesheet}" label="debug" />
AM>       <map:serialize type="html"/>
AM> </map:match>


AM> Is there any other way tha using session-attr-module. How can I pass the
AM> filename from an xsp or action on to the transformer ???

AM> Any suggestion are mostly welcome.

Mixing content generation with logic is not good practise. I think good solution
in your case is split generation and logic. Logic can be included to your own
xsp-action [1]. IMHO this is suitable solution of your problem.
BTW, if value 'HTML_stylesheet' is needed in only one place, you can use
<action:set-result> instead of using session attr.

Hope this help.

[1] http://wiki.cocoondev.org/Wiki.jsp?page=XSPAction

-- 
Best regards
<. g[R]eK mailto:[EMAIL PROTECTED]                                    .>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to