cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject How to switch to another resource if one resource is not available?
Date Fri, 26 Jul 2002 15:23:39 GMT

im a beginner with cocoon. Maybe it is an easy question, but i don´t know
where to start.

I am just playing a bit round with the sitemap, generaters, serializers and
so on.

Now i wonder, how i can set up a matcher for JPG, that delivers a JPG if it
is available and if it is not available delivers a SVG, which can be
serialized to JPG.
So to the outside it shouldn´t matter if the picture is generated from JPG
or SVG.

This is map:match for jpg as source:

       <map:match pattern="images/**.jpg">
          <map:read src="images/{1}.jpg" mime-type="image/jpg"/>

and this for svg as source:

       <map:match pattern="images/**.jpg">
          <map:generate src="images/{1}.svg"/>
          <map:serialize type="svg2jpeg"/>

So how do i combine this to both match "images/**.jpg"?
Is there any kind of error handling?

Thank you

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message