cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geissel, Adrian" <adrian.geis...@ecb.int>
Subject RE: Using Path expression in Map Action type
Date Thu, 05 Jun 2003 14:29:46 GMT
I should have mentioned in my original mail that it is indeed a hack (and
admittedly evil at that ;)- just in case someone thought that this is the
way I normally work. 

At the time (mid-2001) there was no easy alternative way to 'choose' an
action based on a URL fragment - and there is the obvious constraint that
only valid action 'type's are referenced - other than explicit matchers for
each possible URL/action combination - which was equally un-maintainable. I
also recall that I explicitly commented my sitemap with the words "BIG AND
NASTY HACK".

Anyway, just justifying :)
/Adrian

> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
> Sent: Thursday 05 June 2003 16:23
> To: cocoon-dev@xml.apache.org
> Subject: Re: Using Path expression in Map Action type
> 
> 
> Geissel, Adrian wrote:
> 
> >Hi Shane,
> >
> >I've done something similar to what you're looking for with 
> version 2.0
> >(don't know if it still works!):
> >
> >Try:
> >
> ><map:act type='substitute(listOfMaps, "{../1}")'/>
> >
> >Note - single quotes are important (valid XML attribute 
> definition - allows
> >the use of plain double-quotes!)
> >
> 
> Wow, clever but *evil* hack : injection of Java code in the 
> sitemap. As 
> Christian said : this will break as soon as you use the 
> newest sitemap 
> engine (which is the only one available in 2.1).
> 
> The "type" attribute is static for every sitemap statement. This is a 
> design choice, as allowing dynamic types can quickly lead to 
> non-understadable and unmaintainable sitemaps.
> 
> Sylvain
> 
> -- 
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
> 
> 

Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither
be binding nor construed as constituting a commitment by the ECB except where provided for
in a written agreement.
This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised
disclosure, use or dissemination, either in whole or in part, is prohibited.
If you have received this e-mail in error, please notify the sender immediately via e-mail
and delete this e-mail from your system.


Mime
View raw message