You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sonny Sukumar <ah...@yahoo.com> on 2003/02/12 08:58:57 UTC
Jumping within sitemap?
Hi guys,
I'm wondering if it's possible to jump from one place
in the sitemap to another. I made up the following
code, but it's basically what I'm aiming to do:
<map:match pattern="checkout">
<map:act type="is-logged-in"/>
<!-- Customer is logged in, so proceed to first
checkout step -->
<map:jump jumpto="customer-info-entry"/>
</map:act>
<!-- Customer isn't logged in, so jump to login
page. -->
<map:jump jumpto="customer-login"/>
</map:match>
<map:match pattern="customer-info-entry">
<map:generate src="customerInfoEntry.xsp"/>
<map:transform src="someTransform.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="customer-login">
<map:read src="customerLogin.html"/>
</map:match>
It's like calling a function/method in a programming
language, and it thus supports reuse of factored out
code.
Does it make sense?
Please let me know how we can do it! :-)
Thanks,
Sonny
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Jumping within sitemap?
Posted by Guido Casper <gc...@s-und-n.de>.
> I'm wondering if it's possible to jump from one place
> in the sitemap to another. I made up the following
> code, but it's basically what I'm aiming to do:
Have a look at <map:redirect-to>
By default it redirects the browser, but used in conjunction with the cocoon
pseudo protocol like:
<map:match pattern="a">
<map:redirect-to uri="cocoon:/b"/>
</map:match>
it performs an internal "forward"
HTH
Guido
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Jumping within sitemap?
Posted by Idhaya Chandran <id...@coreobjects.com>.
I think u can achieve this using selectors.
You can have ur custom selectors.
--Idhaya
-----Original Message-----
From: Sonny Sukumar [mailto:ahimsadesi@yahoo.com]
Sent: Wednesday, February 12, 2003 1:29 PM
To: cocoon-users@xml.apache.org
Subject: Jumping within sitemap?
Hi guys,
I'm wondering if it's possible to jump from one place
in the sitemap to another. I made up the following
code, but it's basically what I'm aiming to do:
<map:match pattern="checkout">
<map:act type="is-logged-in"/>
<!-- Customer is logged in, so proceed to first
checkout step -->
<map:jump jumpto="customer-info-entry"/>
</map:act>
<!-- Customer isn't logged in, so jump to login
page. -->
<map:jump jumpto="customer-login"/>
</map:match>
<map:match pattern="customer-info-entry">
<map:generate src="customerInfoEntry.xsp"/>
<map:transform src="someTransform.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="customer-login">
<map:read src="customerLogin.html"/>
</map:match>
It's like calling a function/method in a programming
language, and it thus supports reuse of factored out
code.
Does it make sense?
Please let me know how we can do it! :-)
Thanks,
Sonny
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Jumping within sitemap?
Posted by Luca Morandini <lu...@tin.it>.
Sonny,
if a client-side redirect would do, try redirect-to, like in:
<map:act type="is-user-logged">
<!-- logged user stuff -->
</map:act>
<!-- un-logged user stuff -->
<map:redirect-to uri="doc-stale.html"/>
Regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Mensaje original-----
> De: Sonny Sukumar [mailto:ahimsadesi@yahoo.com]
> Enviado el: miercoles, 12 de febrero de 2003 8:59
> Para: cocoon-users@xml.apache.org
> Asunto: Jumping within sitemap?
>
>
>
> Hi guys,
>
> I'm wondering if it's possible to jump from one place
> in the sitemap to another. I made up the following
> code, but it's basically what I'm aiming to do:
>
> <map:match pattern="checkout">
> <map:act type="is-logged-in"/>
> <!-- Customer is logged in, so proceed to first
> checkout step -->
> <map:jump jumpto="customer-info-entry"/>
> </map:act>
>
> <!-- Customer isn't logged in, so jump to login
> page. -->
> <map:jump jumpto="customer-login"/>
> </map:match>
>
> <map:match pattern="customer-info-entry">
> <map:generate src="customerInfoEntry.xsp"/>
> <map:transform src="someTransform.xsl"/>
> <map:serialize type="html"/>
> </map:match>
>
> <map:match pattern="customer-login">
> <map:read src="customerLogin.html"/>
> </map:match>
>
> It's like calling a function/method in a programming
> language, and it thus supports reuse of factored out
> code.
>
> Does it make sense?
>
> Please let me know how we can do it! :-)
>
> Thanks,
>
> Sonny
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Jumping within sitemap?
Posted by Josema Alonso <jo...@simbiosystems.com>.
Sure. You just need to use the cocoon:/ protocol.
See info about Protocols at:
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
Best.
-----Mensaje original-----
De: Sonny Sukumar [mailto:ahimsadesi@yahoo.com]
Enviado el: miercoles, 12 de febrero de 2003 8:59
Para: cocoon-users@xml.apache.org
Asunto: Jumping within sitemap?
Hi guys,
I'm wondering if it's possible to jump from one place
in the sitemap to another. I made up the following
code, but it's basically what I'm aiming to do:
<map:match pattern="checkout">
<map:act type="is-logged-in"/>
<!-- Customer is logged in, so proceed to first
checkout step -->
<map:jump jumpto="customer-info-entry"/>
</map:act>
<!-- Customer isn't logged in, so jump to login
page. -->
<map:jump jumpto="customer-login"/>
</map:match>
<map:match pattern="customer-info-entry">
<map:generate src="customerInfoEntry.xsp"/>
<map:transform src="someTransform.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="customer-login">
<map:read src="customerLogin.html"/>
</map:match>
It's like calling a function/method in a programming
language, and it thus supports reuse of factored out
code.
Does it make sense?
Please let me know how we can do it! :-)
Thanks,
Sonny
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>