cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: HeaderSelector...
Date Mon, 17 Jun 2002 15:10:43 GMT
> From: Morrison, John [mailto:John.Morrison@uk.experian.com]
> 
> Hi all :)
> 
> I'm trying to use the header selector, but I keep dropping through
> to the default (jpeg).  Does anybody have a clue what I'm missing/
> doing wrong?  The {1} and {2} files exist I just keep getting a jpeg
> even though I have both the svg plugin and png support!

Have your seen your logs? ;)
I bet that they have something like:

  getLogger().warn("No header name given -- failing.");


Other thing: are you sure that you have:

  Accepts=accepts('image/svg-xml')

In the HTTP header?


> I'm (as usual ;) using the head of cvs and the latest beta of TC 4.
> 
> <map:match pattern="*/*">
>  <map:generate src="data/{1}.xml"/>
>  <map:transform src="charts/{2}.xsl"/>
>  <map:select type="header">

<map:parameter name="header-name" value="accepts-or-whatever-you-need"/>

Vadim


>   <map:when test="accepts('image/svg-xml')">
>    <map:serialize type="svgxml"/>
>   </map:when>
>   <map:otherwise>
>    <map:select>
>     <map:when test="accepts('image/png')">
>      <map:serialize type="svg2png"/>
>     </map:when>
>     <map:otherwise>
>      <map:serialize type="svg2jpeg"/>
>     </map:otherwise>
>    </map:select>
>   </map:otherwise>
>  </map:select>
> </map:match>
> 
> Thanks,
> 
> J.
> 
> --LongSig
> 
> It's so stupid of modern civilization to have given up believing in
the
> Devil when he is the only explanation of it.


---------------------------------------------------------------------
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