<map:matcher name="request-parameter" src="org.apache.cocoon.matching.RequestParameterMatcher"/>
<map:selector name="request-parameter" src="org.apache.cocoon.selection.RequestSelector"/>
As a matcher---
<map:match pattern="mydoc">
<map:match type="request-parameter" pattern="locale">
<map:generate src="xdocs/mydoc-{1}.xml"/>
</map:match>
<map:serialize type="xml"/>
</map:match>
As a selector---
<map:match pattern="mydoc">
<map:select type="request-parameter">
<map:parameter name="parameter-name" value="locale"/>
<map:when test="en">
..do something
</map:when>
<map:otherwise>
..do something else
</map:otherwise>
</map:select>
</map:match>
Hope that answers your question.
Darren
On Sunday, January 5, 2003, at 03:12 PM, Cocoon User wrote:
hi martin this is a way to send a parameter inside your xsl file (pretty
good) but i need something else
i want to use a request parameter as a variable inside my sitemap
example
if i have http://../...?locale=el
src="{locale}_data.xml"
point to el_data.xml
(i have do something similar using a action just like in i18n example from
2.1 version of cocoon but i'm wondering if there is another way to do this
without action)
thnx stavros
On 5 Jan 2003, Martin Lüthi wrote:
You can use the request parameter like this: <map:transform src="stylesheets/mystyle.xsl"> <map:parameter name="use-request-parameters" value="true"/> <map:parameter name="region" value="{request:locale}"/> </map:transform>Cheers Martin Cocoon User <[EMAIL PROTECTED]> writes:i know how to make a src file selection based to requested url using matches http://...../el/test http://...../en/test <map:match pattern="*/*"> <map:generate src="{1}_{2}.xml"/> </map:patch> but how can do something similar using parameter? http://..../test?locale=el http://..../test?locale=en using {1} or {2} i refer to first or second * in pattern but how can i refer to locale prameter value inside <map:match/> ?--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
Darren Petrie [EMAIL PROTECTED] --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>