> From: [EMAIL PROTECTED] > > 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?
Use an action called ResourceExistsAction (see org.apache.cocoon.acting.ResourceExistsAction.java Javadocs). Konstantin > > 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>