cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: "redirect-to resource" and substitution of the List of Maps
Date Tue, 15 May 2001 20:44:39 GMT


On Tue, 15 May 2001, Marcus Crafter wrote:

> Hi Jiri,
>
> 	See my email from last week at:
>
> 	http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=98961067308100&w=2
>
> 	There seems to be a problem with the action generation code when it
> 	tests for what namespace the sitemap is in. This causes the generated
> 	map:act code not to add the returned Map object to listOfMaps.
>
> 	I'm not 100% sure of whether its a bug, or a feature and I've
> 	misunderstood the namespace check. Have a look at sitemap.xsl, line
> 	684:
>
> <xsl:when test="./*[namespace-uri()='http://apache.org/cocoon/sitemap/1.0']">

IIRC the reason doing that was to check if there a <map:* ..> elements
insite the <map:act ...> element to know if we need to push the returned
map or not.

A snippet like this:

   <map:act type="..."/>

doesn't need to push the returned map into the listOfMaps because no one
will actually use it. But

   <map:act type="...">
     <map:...   >
   </map:act>

instead must make the returned map from the Action available for the
content of the <map:act ...> element.

Giacomo

>
> 	I'm not exactly sure why this test is there ? But it is what's causing
> 	the noted behaviour.
>
> 	You can get the behaviour you're expecting by adding:
>
> 	listOfMaps.add (map);
>
> 	after line 693 in sitemap.xsl, but that's strictly a workaround, and
> 	not a fix.
>
> 	Hopefully some of the more sitemap.xsl savvy developers might be able
> 	to shed some light here. :-)
>
> 	Cheers,
>
> 	Marcus
>
> On Tue, 15 May 2001, Jiri Luzny wrote:
>
> > I'm tried to the following redirection using a sitemap parameter from an action
and it doesn't
> > work:
> >
> > ------
> > <map:match pattern="foo">
> >   <map:act type="some-validator">
> >     <map:redirect-to resource="foo-{next}"/>
> >   </map:act>
> > </map:match>
> >
> > <map:resource name="foo-second">
> > ..
> > ..
> > </map:resource>
> > -------
> >
> > For "uri" redirection:
> > -----
> > <map:redirect-to uri="foo-{next}"/>
> > -----
> > it works without any problem.
> >
> > I took look at sitemap.xsl and it seems that the substitution of the List of Maps
is not
> > implemented for "resource" type of the redirection. Why? I think it is useful as
well...
> >
> > Jiri.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - buy the things you want at great prices
> > http://auctions.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
>
> --
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   Open Software Associates GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'     Email : Marcus.Crafter@osa.de
>           &&&&.        Business Hours : +49 69 9757 200
>     &&&&&&&:           After Hours    : +49 69 49086750
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message