You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Hartmann <an...@apache.org> on 2003/06/05 19:20:00 UTC

Re: using pipeline matched parameters in XSP

Paweł Żukrowski wrote:
> Hi All,
>  
> is there a way to use parameter form pipeline match
> in XSP page?
>  
> for example if pipeline match looks like
>  
> ...
> <map:match pattern="**.info">
>     <map:generate type="serverpages" src="process.xsp"/>
>     <map:serialixe type="xml"/>
> </map:match>
>  
> normalyy in pipeline we can use {1}
> but how can  I use it in process.xsp?

I would recommend to parameterize the logicsheet
because that makes the parameter flow visible in the
sitemap:

<map:generate type="serverpages" src="process.xsp">
   <map:parameter name="path" value="{1}"/>
</map:generate>

And in your XSP:

try {
     String path = parameters.getParameter("path");
}
catch(ParameterException e) {
     throw new ProcessingException(e);
}

I don't know if the util logicsheet works for this
kind of parameters, you could try it:

<xsp-util:get-sitemap-parameter name="1" />

But I wouldn't recommend this solution, even if it works.

Andreas



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


Re: using pipeline matched parameters in XSP

Posted by Steven Noels <st...@outerthought.org>.
On 5/06/2003 22:26 Andreas Hartmann wrote:

> Sorry if you felt offended - it was not against your tag but
> against its misuse :)

No offense at all - just curious. It was such a stupid little thing that 
I started wondering why nobody had contributed it before. Thanks for 
your explanation!

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


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


Re: using pipeline matched parameters in XSP

Posted by Andreas Hartmann <an...@apache.org>.
Steven Noels wrote:

> On 5/06/2003 19:20 Andreas Hartmann wrote:
> 
>> I don't know if the util logicsheet works for this
>> kind of parameters, you could try it:
>>
>> <xsp-util:get-sitemap-parameter name="1" />
>>
>> But I wouldn't recommend this solution, even if it works.
> 
> Why that? Just curious - since I added that tag.

Of course the get-sitemap-parameter tag itself is very useful.
But when using the wildcard number as parameter key, the XSP
depends on the match pattern - I could imagine that is hard
to debug for someone who changes the pattern without being
familiar with the XSP.

OK, maybe it's just my personal perference that I usually want
to see from outside which parameters are used by a component.

Sorry if you felt offended - it was not against your tag but
against its misuse :)

Andreas



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


Re: using pipeline matched parameters in XSP

Posted by Steven Noels <st...@outerthought.org>.
On 5/06/2003 19:20 Andreas Hartmann wrote:

> I don't know if the util logicsheet works for this
> kind of parameters, you could try it:
> 
> <xsp-util:get-sitemap-parameter name="1" />
> 
> But I wouldn't recommend this solution, even if it works.

Why that? Just curious - since I added that tag.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


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