You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stuart Roebuck <st...@mac.com> on 2002/01/23 01:00:50 UTC

[C2] request parameters automatically passed to cocoon:/process sub-pipeline

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".

For my current work, this is a very helpful feature, but I'm not confident 
that it is intentional, and I don't want to build reliance on a 
side-effect of the current implementation, particularly in light of all 
the good work currently going on to improve sitemap processing.

Could someone clarify whether this is expected behaviour.

Thanks,

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


Re: AW: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by "Marcelo F. Ochoa" <mo...@ieee.org>.
Carsten Ziegeler wrote:

>>Michael Hartle wrote:
>>Instead of encoding it via paramaters or even user name (eg. 
>>http://user@website.org), what about a sub-protocol like it is being 
>>used for jdbc driver URLs ? This would look like
>>
>>cocoon:raw:/info.xml"
>>
>>and would make a quite clean appearance.
>>
>
>Looks very good for me - ok, I will add a passage to the todo list,
>so we can come back to this after the 2.0.1 release. 
>
>Thanks
>
>Carsten
>
 On DB Prism generator for Cocoon2 I have implemented a sitemap 
parameter named Copy-Request-Argument, for example:
   <map:match pattern="content/search.xml">
    <map:generate type="db" src="/cms/search.html">
        <map:parameter name="Copy-Request-Arguments" value="yes"/>
        <map:parameter name="Cache-Control" value="no-cache"/>
    </map:generate>
    <map:serialize/>
   </map:match>

  DBPrism generator uses a wrapper class (like JSPGenerator) to 
encapsulate the Cocoon request, then I have implemented this 
functionality in this wrapper.
  The proposed solution could be more generic, but IMO it must merge the 
sitemap argument with the http request argument.
  Best regards, Marcelo.

-- 
Marcelo F. Ochoa - mochoa@ieee.org
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book "Oracle & Open Source" (O'Reilly 
http://www.oreilly.com/catalog/oracleopen/)
-----------------------------------------------
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-444430 Fax: +54-2293-444431




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


RE: AW: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
> Michael Hartle wrote:
> Instead of encoding it via paramaters or even user name (eg. 
> http://user@website.org), what about a sub-protocol like it is being 
> used for jdbc driver URLs ? This would look like
> 
> cocoon:raw:/info.xml"
> 
> and would make a quite clean appearance.
> 

Looks very good for me - ok, I will add a passage to the todo list,
so we can come back to this after the 2.0.1 release. 

Thanks

Carsten

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


Re: AW: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by Michael Hartle <mh...@hartle-klug.com>.
Matthew Langham wrote:

>Carsten,
>
>>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!
>>
>>Carsten
>>
>Couldn't this be a different protocol, e.g. "raw-cocoon:/info.xml" ?
><<
>Isn't this the same thing we implemented and then called "cocoonnp:/..."???
>
>:-)))
>
>Matthew
>
>--
>Open Source Group               sunShine - Lighting up e:Business
>=================================================================
>Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
>Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
>=================================================================
> 
>
>-----Ursprungliche Nachricht-----
>Von: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
>Gesendet: Mittwoch, 23. Januar 2002 09:45
>An: cocoon-dev@xml.apache.org
>Betreff: Re: [C2] request parameters automatically passed to
>cocoon:/process sub-pipeline
>
>
>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".
>>>
>>>For my current work, this is a very helpful feature, but I'm not 
>>>confident 
>>>that it is intentional, and I don't want to build reliance on a 
>>>side-effect of the current implementation, particularly in light of all 
>>>the good work currently going on to improve sitemap processing.
>>>
>>>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!
>>
>>Carsten
>>
>Couldn't this be a different protocol, e.g. "raw-cocoon:/info.xml" ?
>
>Sylvain
>
Instead of encoding it via paramaters or even user name (eg. 
http://user@website.org), what about a sub-protocol like it is being 
used for jdbc driver URLs ? This would look like

cocoon:raw:/info.xml"

and would make a quite clean appearance.

Best regards,

Michael Hartle




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


AW: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by Matthew Langham <ml...@s-und-n.de>.
Carsten,

>>
>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!
>
>Carsten
>
Couldn't this be a different protocol, e.g. "raw-cocoon:/info.xml" ?
<<
Isn't this the same thing we implemented and then called "cocoonnp:/..."???

:-)))

Matthew

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
=================================================================
 

-----Ursprungliche Nachricht-----
Von: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
Gesendet: Mittwoch, 23. Januar 2002 09:45
An: cocoon-dev@xml.apache.org
Betreff: Re: [C2] request parameters automatically passed to
cocoon:/process sub-pipeline


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".
>>
>>For my current work, this is a very helpful feature, but I'm not 
>>confident 
>>that it is intentional, and I don't want to build reliance on a 
>>side-effect of the current implementation, particularly in light of all 
>>the good work currently going on to improve sitemap processing.
>>
>>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!
>
>Carsten
>
Couldn't this be a different protocol, e.g. "raw-cocoon:/info.xml" ?

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com




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


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


Re: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
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".
>>
>>For my current work, this is a very helpful feature, but I'm not 
>>confident 
>>that it is intentional, and I don't want to build reliance on a 
>>side-effect of the current implementation, particularly in light of all 
>>the good work currently going on to improve sitemap processing.
>>
>>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!
>
>Carsten
>
Couldn't this be a different protocol, e.g. "raw-cocoon:/info.xml" ?

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com




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


Re: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by Stuart Roebuck <st...@adolos.co.uk>.
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


RE: [C2] request parameters automatically passed to cocoon:/process sub-pipeline

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
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".
> 
> For my current work, this is a very helpful feature, but I'm not 
> confident 
> that it is intentional, and I don't want to build reliance on a 
> side-effect of the current implementation, particularly in light of all 
> the good work currently going on to improve sitemap processing.
> 
> 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!

Carsten


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