cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Davignon <andre.davig...@free.fr>
Subject Re: Cocoon sitemap pattern match parameter passing
Date Sat, 09 May 2009 16:06:03 GMT
You _don't_ need to match anything else, match "article" and pick the 
parameter's value with request-param.

André

> Wouldn't request-param simply attempt to grab the value from the URL and
> still require me to make the URL call like
> http://myhost/cocoon/article?format=summary&docid=12345?
>
>
>
> André Davignon wrote:
>   
>> Hi,
>>
>> I guess you should use the "request-param" input module :
>>
>> <map:generate src="xquery/exist-article.xq" type="xquery">
>> 	<map:parameter name="format" value="{request-param:format}"/> 
>> </map:generate>
>>
>> Cheers,
>>
>> André
>>
>>
>>     
>>> I have a sitemap entry that reads
>>>
>>> <map:match pattern="article">
>>>          <map:generate src="xquery/exist-article.xq" type="xquery"/>
>>>          <map:transform type="xinclude"/>
>>>          <map:transform src="stylesheets/db2html.xsl"/>
>>>          <map:serialize type="html"/>
>>> </map:match>
>>>
>>> and I call it like
>>> http://myhost/cocoon/article?format=summary&docid=12345.
>>>
>>> I tried to do another sitemap entry like
>>>
>>> <map:match pattern="summary">
>>>          <map:generate src="xquery/exist-article.xq" type="xquery">
>>>                   <map:parameter name="format" value="summary"/> 
>>>          </map:generate>
>>>          <map:transform type="xinclude"/>
>>>          <map:transform src="stylesheets/db2html.xsl"/>
>>>          <map:serialize type="html"/>
>>> </map:match>
>>>
>>> and I call it like http://myhost/cocoon/article?docid=12345.  HOWEVER,
>>> the
>>> variable summary does not  get set.
>>>
>>> I have passed parameter like this to XSLTs without issue.  However, can I
>>> pass a parameter like this to the xquery?  
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>     
>
>   


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


Mime
View raw message