cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: something that bugs me
Date Tue, 13 Nov 2001 15:49:13 GMT
Quoting Sebastien Koechlin <skoechlin@ivision.fr>:

> I did not receive any answer about my last message about this.
> 
> >    <map:match pattern="**images/*.png">
> >     <map:read src="images/{2}.png" mime-type="image/png"/>
> >    </map:match>
> > 
> >    <map:match pattern="**images/*.jpg">
> >     <map:read src="images/{2}.jpg" mime-type="image/jpeg"/>
> >    </map:match>
> > 
> >    <map:match pattern="**images/*.gif">
> >     <map:read src="images/{2}.gif" mime-type="image/gif"/>
> >    </map:match>
> 
> What about
> 
> 	<map:match pattern="**images/*">
> 		<map:read src="images/{2}"/>
> 	</map:match>
> 
> with the help of a file to map content-type according to
> filename extention ?
> 
> Is it possible to use a mapping when the mime-type attribute
> does not exist ? 

There is a getMimeType method specified in the SitemapOutputComponent (which 
Readers extend). This method is the most accepted mime-type to be used by the 
engine. If this returns null (as the default implementation does) next in the 
chain is the mime-type attribute specified at the map:read element in the 
sitemap. If even there isn't a mime-type specified the one mentioned in the 
component definition (<map:reader name="..." mime-type="..." src="..."/> is 
take. This procedure is used for Serializers as well.

Giacomo

> 
> Such mapping is already written in xml form in
> 	$TOMCAT_HOME/conf/web.xml
> 
> -- 
> S├ębastien Koechlin - IVision - skoechlin@ivision.fr
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message