You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Amit Pandey <am...@techblue.co.uk> on 2007/10/11 17:07:33 UTC
Calling pipeline within pipeline
Hello,
I am using a code to redirect a request to another page as follows:
<map:match pattern="**/*live/newapp.html*">
<map:redirect-to
uri="/propcoweb/{page-envelope:publication-id}/{page-envelope:area}/*proregister/newapp.html*"
></map:redirect-to>
</map:match>
but instead of redirecting the request to an uri,I want it to call
another pipeline which is :
<map:match pattern="**/*proregister/newapp.html*">
<map:aggregate element="cmsbody">
<map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/breadcrumb/index.xml"/>
<map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/tabs/index.xml"/>
<map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/menu/index.xml"/>
<map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/search/index.xml"/>
<map:part
src="content/live/proregister/newapp/index_en.xml"/>
<map:part src="cocoon:/propcoweb-xml-fillsearch"/>
<map:part src="cocoon:/propcoweb-xml-passwordreminder">
<map:parameter name="type" value="{type}"/>
<map:parameter name="email" value="{email}"/>
</map:part>
</map:aggregate>
<map:act type="captchaaction">
<map:transform src="xslt/proregister/newapp2xhtml.xsl">
<map:parameter name="root" value="{global:web-path}"/>
<map:parameter name="captchapath" value="{captchapath}"/>
<map:parameter name="captchatext" value="{captchatext}"/>
</map:transform>
</map:act>
<map:serialize type="xhtml"/>
</map:match>
Is it possible to redirect the incoming request to another
pipeline within the publication-sitemap.xmap
Thanks & regards
Amit Pandey
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Calling pipeline within pipeline
Posted by Jürgen Ragaller <ra...@apache.org>.
Am Oct 11, 2007 um 17:07 schrieb Amit Pandey:
> Hello,
>
> I am using a code to redirect a request to another page as follows:
>
> <map:match pattern="**/*live/newapp.html*">
> <map:redirect-to uri="/propcoweb/{page-
> envelope:publication-id}/{page-envelope:area}/*proregister/
> newapp.html*" ></map:redirect-to>
> </map:match>
>
> but instead of redirecting the request to an uri,I want it to call
> another pipeline which is :
>
> <map:match pattern="**/*proregister/newapp.html*">
> <map:aggregate element="cmsbody">
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/breadcrumb/index.xml"/>
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/tabs/index.xml"/>
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/menu/index.xml"/>
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/search/index.xml"/>
> <map:part src="content/live/proregister/newapp/
> index_en.xml"/>
> <map:part src="cocoon:/propcoweb-xml-fillsearch"/>
> <map:part src="cocoon:/propcoweb-xml-
> passwordreminder">
> <map:parameter name="type" value="{type}"/>
> <map:parameter name="email" value="{email}"/>
> </map:part>
> </map:aggregate>
> <map:act type="captchaaction">
> <map:transform src="xslt/proregister/newapp2xhtml.xsl">
> <map:parameter name="root" value="{global:web-path}"/>
> <map:parameter name="captchapath"
> value="{captchapath}"/>
> <map:parameter name="captchatext"
> value="{captchatext}"/>
> </map:transform>
> </map:act>
> <map:serialize type="xhtml"/>
> </map:match>
> Is it possible to redirect the
> incoming request to another pipeline within the publication-
> sitemap.xmap
>
>
Maybe the cocoon:/ Protocol is what you are looking for?
It can be used to get a pipeline from the current sitemap
(as decribed under protocols at http://cocoon.apache.org/2.1/userdocs/
concepts/sitemap.html)
Jürgen Ragaller
null-oder-eins GmbH
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Calling pipeline within pipeline
Posted by Jürgen Ragaller <ra...@apache.org>.
Am Oct 11, 2007 um 17:07 schrieb Amit Pandey:
> Hello,
>
> I am using a code to redirect a request to another page as follows:
>
> <map:match pattern="**/*live/newapp.html*">
> <map:redirect-to uri="/propcoweb/{page-
> envelope:publication-id}/{page-envelope:area}/*proregister/
> newapp.html*" ></map:redirect-to>
> </map:match>
>
> but instead of redirecting the request to an uri,I want it to call
> another pipeline which is :
>
> <map:match pattern="**/*proregister/newapp.html*">
> <map:aggregate element="cmsbody">
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/breadcrumb/index.xml"/>
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/tabs/index.xml"/>
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/menu/index.xml"/>
> <map:part
> src="cocoon://navigation/{page-
> envelope:publication-id}/{page-envelope:area}/search/index.xml"/>
> <map:part src="content/live/proregister/newapp/
> index_en.xml"/>
> <map:part src="cocoon:/propcoweb-xml-fillsearch"/>
> <map:part src="cocoon:/propcoweb-xml-
> passwordreminder">
> <map:parameter name="type" value="{type}"/>
> <map:parameter name="email" value="{email}"/>
> </map:part>
> </map:aggregate>
> <map:act type="captchaaction">
> <map:transform src="xslt/proregister/newapp2xhtml.xsl">
> <map:parameter name="root" value="{global:web-path}"/>
> <map:parameter name="captchapath"
> value="{captchapath}"/>
> <map:parameter name="captchatext"
> value="{captchatext}"/>
> </map:transform>
> </map:act>
> <map:serialize type="xhtml"/>
> </map:match>
> Is it possible to redirect the
> incoming request to another pipeline within the publication-
> sitemap.xmap
>
>
Maybe the cocoon:/ Protocol is what you are looking for?
It can be used to get a pipeline from the current sitemap
(as decribed at http://cocoon.apache.org/2.1/userdocs/concepts/
sitemap.html)
Jürgen Ragaller
null-oder-eins GmbH
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Calling pipeline within pipeline
Posted by Amit Pandey <am...@techblue.co.uk>.
solprovider@apache.org wrote:
> <map:redirect-to> tells the browser to load a different page. Do not
> use it unless the browser should change URLs.
>
> You want two patterns to run the same code.
> 1. You could use a pattern that matches both.
> <map:match pattern="**/*/newapp.html*">
>
> 2. The default WildcardMatcher does not have an "or" statement. You
> could use the Regexp Matcher.
> <map:match type="regexp" pattern="...">
>
> 3. Use a Resource to call the code from both pipelines:
> <map:resources>
> <map:resource name="newapp">
> <!-- ALL THE CODE -->
> </map:resource>
> </map:resources>
> ...
> <map:match pattern="**/*live/newapp.html*">
> <map:call resource="newapp"/>
> </map:match>
> <map:match pattern="**/*proregister/newapp.html*">
> <map:call resource="newapp"/>
> </map:match>
>
>
> 4. If you really prefer redirection over logic, call the other pipeline:
> <map:match pattern="**/live/newapp.html*">
> <map:generate src="cocoon:/{1}/proregister/newapp.html"/>
> <map:serialize type="html"/>
> </map:match>
>
> You might ask a programmer for assistance. This type of logic is
> basic programming. You work for a software development company so you
> should know at least one.
>
> solprovider
>
>
> On 10/11/07, Amit Pandey <am...@techblue.co.uk> wrote:
>
>> I am using a code to redirect a request to another page as follows:
>> <map:match pattern="**/*live/newapp.html*">
>> <map:redirect-to
>>
> uri="/propcoweb/{page-envelope:publication-id}/{page-envelope:area}/*proregister/newapp.html*"
>
>> ></map:redirect-to>
>> </map:match>
>> but instead of redirecting the request to an uri,I want it to call
>> another pipeline which is :
>>
>> <map:match pattern="**/*proregister/newapp.html*">
>> <map:aggregate element="cmsbody">
>> <map:part
>>
> src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/breadcrumb/index.xml"/>
>
>> <map:part
>>
> src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/tabs/index.xml"/>
>
>> <map:part
>>
> src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/menu/index.xml"/>
>
>> <map:part
>>
> src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/search/index.xml"/>
>
>> <map:part
>> src="content/live/proregister/newapp/index_en.xml"/>
>> <map:part src="cocoon:/propcoweb-xml-fillsearch"/>
>> <map:part src="cocoon:/propcoweb-xml-passwordreminder">
>> <map:parameter name="type" value="{type}"/>
>> <map:parameter name="email" value="{email}"/>
>> </map:part>
>> </map:aggregate>
>> <map:act type="captchaaction">
>> <map:transform src="xslt/proregister/newapp2xhtml.xsl">
>> <map:parameter name="root" value="{global:web-path}"/>
>> <map:parameter name="captchapath" value="{captchapath}"/>
>> <map:parameter name="captchatext" value="{captchatext}"/>
>> </map:transform>
>> </map:act>
>> <map:serialize type="xhtml"/>
>> </map:match>
>> Is it possible to redirect the incoming request to another
>> pipeline within the publication-sitemap.xmap
>> Thanks & regards
>> Amit Pandey
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
Hello,
The problem is resolved by placing the files outside proregister
directory as internal calling was restraining the web page to go back to
default pipeline.Thanks for your help
Thanks & regards
Amit Pandey
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Calling pipeline within pipeline
Posted by so...@apache.org.
<map:redirect-to> tells the browser to load a different page. Do not
use it unless the browser should change URLs.
You want two patterns to run the same code.
1. You could use a pattern that matches both.
<map:match pattern="**/*/newapp.html*">
2. The default WildcardMatcher does not have an "or" statement. You
could use the Regexp Matcher.
<map:match type="regexp" pattern="...">
3. Use a Resource to call the code from both pipelines:
<map:resources>
<map:resource name="newapp">
<!-- ALL THE CODE -->
</map:resource>
</map:resources>
...
<map:match pattern="**/*live/newapp.html*">
<map:call resource="newapp"/>
</map:match>
<map:match pattern="**/*proregister/newapp.html*">
<map:call resource="newapp"/>
</map:match>
4. If you really prefer redirection over logic, call the other pipeline:
<map:match pattern="**/live/newapp.html*">
<map:generate src="cocoon:/{1}/proregister/newapp.html"/>
<map:serialize type="html"/>
</map:match>
You might ask a programmer for assistance. This type of logic is
basic programming. You work for a software development company so you
should know at least one.
solprovider
On 10/11/07, Amit Pandey <am...@techblue.co.uk> wrote:
> I am using a code to redirect a request to another page as follows:
> <map:match pattern="**/*live/newapp.html*">
> <map:redirect-to
uri="/propcoweb/{page-envelope:publication-id}/{page-envelope:area}/*proregister/newapp.html*"
> ></map:redirect-to>
> </map:match>
> but instead of redirecting the request to an uri,I want it to call
> another pipeline which is :
>
> <map:match pattern="**/*proregister/newapp.html*">
> <map:aggregate element="cmsbody">
> <map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/breadcrumb/index.xml"/>
> <map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/tabs/index.xml"/>
> <map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/menu/index.xml"/>
> <map:part
src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/search/index.xml"/>
> <map:part
> src="content/live/proregister/newapp/index_en.xml"/>
> <map:part src="cocoon:/propcoweb-xml-fillsearch"/>
> <map:part src="cocoon:/propcoweb-xml-passwordreminder">
> <map:parameter name="type" value="{type}"/>
> <map:parameter name="email" value="{email}"/>
> </map:part>
> </map:aggregate>
> <map:act type="captchaaction">
> <map:transform src="xslt/proregister/newapp2xhtml.xsl">
> <map:parameter name="root" value="{global:web-path}"/>
> <map:parameter name="captchapath" value="{captchapath}"/>
> <map:parameter name="captchatext" value="{captchatext}"/>
> </map:transform>
> </map:act>
> <map:serialize type="xhtml"/>
> </map:match>
> Is it possible to redirect the incoming request to another
> pipeline within the publication-sitemap.xmap
> Thanks & regards
> Amit Pandey
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org