cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joern_H...@notes.uni-paderborn.de
Subject How to switch to another resource if one resource is not available?
Date Fri, 26 Jul 2002 15:23:39 GMT
Hi,

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"/>
       </map:match>

and this for svg as source:

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

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.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message