cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Maloney <coc...@chrismaloney.com>
Subject Re: mount - ish question
Date Wed, 27 Apr 2005 15:35:53 GMT
Nathaniel Alfred wrote:

>But if the large amount of pipelines bothering you is mainly map:read with different mime-types,
you should rather look at your servlet containers configuration.  In Tomcat, for example,
you define standard mappings in web.xml:
>
>  <mime-mapping>
>    <extension>png</extension>
>    <mime-type>image/png</mime-type>
>  </mime-mapping>
>
>Then maybe a lot of trivial pipeline can be replaced by a catch-all at the end:
>
>  <map:match pattern='**.*'>
>    <map:select type='resource-exists'>
>      <map:when test='{1}.{2}'>
>        <map:read src="{1}.{2}"/>
>      </map:when>
>      <map:otherwise>
>        <map:read src="../Other/{1}.{2}"/>
>      </map:otherwise>
>    </map:select>
>  </map:match>
>
>HTH, Alfred.
>  
>
Thanks, this is very good info.  I didn't know that the mime-type 
attribute of map:read
was optional.  I just tested it, and it works great.  The documentation 
on the default
reader says "it is important to specify the mime-type attribute ...", 
giving the impression
that it is required.  Perhaps this should be in the documentation?  How 
could I try
to get this added?



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


Mime
View raw message