cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <stuart.roeb...@adolos.co.uk>
Subject Re: [C2] request parameters automatically passed to cocoon:/process sub-pipeline
Date Wed, 23 Jan 2002 08:46:16 GMT
Carsten,

On Wednesday, January 23, 2002, at 07:25 am, Carsten Ziegeler wrote:
>
> Stuart Roebuck wrote:
>>
>> I notice that in the latest official release of Cocoon2, if you have two
>> sitemap matches like:
>>>     <map:match pattern="info.html">
>>>       <map:generate src="cocoon:/info.xml" />
>>>       <map:transform src="transform.xslt" />
>>>       <map:serialize />
>>>     </map:match>
>> and
>>>     <map:match pattern="info.xml">
>>>       <map:generate type="my-request-param-generator" />
>>>       <map:serialize type="xml" />
>>>     </map:match>
>> and you request the page "info.html?param1=aparam&param2=anotherparam",
>> the info.xml match receives the two request parameters as if it has been
>> called with "info.xml?param1=aparam&param2=anotherparam".
>>
>> Could someone clarify whether this is expected behaviour.
>>
>
> Yes, this is the wanted behaviour, so you can actually rely on it.
>
> But, you're right that this is not always wanted, we have some
> cases were we don't want to pass the parameters. I'm still thinking
> of a good way to indicate this to the procotol, for example by
>    "cocoon:/DONTPASSPARAMETERS@info.xml"
>
> If someone sees a good URI scheme for this, I will be very happy
> to implement that then!

Great, that makes life easy.

How about:

	"cocoon:/info.xml?-"
("-" at beginning means don't pass parameters received in request)

then you could have:

	"cocoon:/info.xml?&amp;another-param=to-add-to-the-passed-ones"
("&" at beginning means add these parameters to the ones already passed to 
the request)

and

	"cocoon:/info.xml?a-different-param=dont-pass-the-others"
(standard parameters means ignore parameters passed already, pass these 
instead)

Stuart.


            Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
      Key fingerprint = 89D9 E405 F8B1 9B22 0FA2  F2C1 9E57 5AB1 88DD 65AF
-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Lead Developer                               Java, XML, MacOS X, XP, etc.
ADOLOS                                           <http://www.adolos.com/>


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


Mime
View raw message