cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geissel, Adrian" <>
Subject RE: Customization
Date Wed, 28 May 2003 08:49:31 GMT
Given something like [the reason if the generality is that it depends on
your site design]:

<!-- re-inserted for completeness -->
<map:match pattern="*/**.html">
    <map:act type="resource-exists" src="docs/{2}_{1}.html"> 		
        <map:generate src="docs/{../2}_{../1}.html"/>
        <map:serialize type="xml"/>
    <map:generate src="docs/{2}.html"/>
    <map:serialize type="html"/>



will first test whether the resource


if it exists, then it is returned, otherwise


is served.

The key point is that using a combination of URL fragment matching (to get
the desired look&feel) and resource exists testing to serve default content
if absent is a simple, yet powerful technique.

As the matchers work equally well for browser or cocoon initialated URLs,
the same technique can be used to provide customised / default selection of
XSLT stylesheets, for example

[assuming the same style pipeline fragment as above, but matching on xsl]
  <map:transform src="cocoon:/cocoon/apache/lnf.xsl"/>

could try to locate an XSLT file named  apache/lnf_cocoon.xsl, defaulting to


> -----Original Message-----
> From: Mato Mira, Fernando []
> Sent: Wednesday 28 May 2003 10:41
> To: ''
> Subject: RE: Customization
> > -----Original Message-----
> > From: Geissel, Adrian []
> > 
> > How about using something like the following pipeline matcher 
> > along with the
> > resource exists action
> > 
> [solution elided]
> > It also works well in for selecting stylesheets when 
> combined with the
> > cocoon protocol in map:transform/@src
> >    
> Could you please give an example?
> Thanks

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.

View raw message