In general my css files don't come through Cocoon, apache serves
them directly. But in this case I'm just using the file name
rather than the ful http://... reference. This is working when
batik is invoked from the shell prompt but not from Cocoon.

Sim

Bert Van Kets wrote:
> Did you declare a css pipeline?  If Cooon gets request for a css file, 
> but can't map it to a specific file, it can't process it.
> Add this to your sitemap:
>       <map:match pattern="*.css">
>         <map:read src="css/{1}.css" mime-type="text/css"/>
>       </map:match>
> make sure you place the css file in the css directory.
> HTH,
> Bert
> 
> At 10:02 11/04/2002 +0100, you wrote:
> 
>> Hi,
>>    I'm have some trouble generating PNG's with the SVG serializer.
>> I want to include a CSS stylesheet reference in the XML so that,
>> for example, colours can be kept out of the SVG XML. Using the
>> following test.xml file:
>>
>> <?xml version="1.0" encoding="iso-8859-1"?>
>> <?xml-stylesheet type="text/css" 
>> href="/home/httpd/html/styles/svg-test.css"?>
>>
>> <svg xml:space="preserve" width="6px" height="6px">
>> <desc>Corner of menu item</desc>
>> <rect width="6" height="6"  class="red"/>
>> <path d="M0,0 v6 a6,6 0 0,1 6,-6 z" fill="green" transform="rotate(90 
>> 3 3)"/>
>> </svg>
>>
>> And this simple svg-test.css file:
>>
>> .red {
>>         fill: red;
>> }
>>
>> If I invoke the batik rasterizer directly using:
>>
>> java -jar batik-rasterizer.jar test.xml
>>
>> then everything is fine. A png is generated that uses the
>> red colour defined in the CSS stylesheet.
>>
>> However, if I access the xml file via Cocoon (2.02 )with the usual SVG
>> serializer defined in the sitemap and the following added:
>>
>>     <map:match pattern="svg/test.png">
>>         <map:generate src="site/svg/test.xml" label="source"/>
>>         <map:serialize type="svg2png"/>
>>     </map:match>
>>
>> then I get the png with a black background, the CSS file has
>> not been read.
>>
>> Can anyone help shed some light on this?
>>
>> Regards,
>> Simeon
>>
>> -- 
>> Simeon Walker,                      email: [EMAIL PROTECTED]
>> School of Biological Sciences,      phone: +44 (0)1248 383702
>> University of Wales, Bangor,        fax: +44 (0)1248 382569
>> Gwynedd, LL57 2UW, UK.              www: http://biology.bangor.ac.uk/
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question has not already been answered in the
>> FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 


-- 
Simeon Walker,                      email: [EMAIL PROTECTED]
School of Biological Sciences,      phone: +44 (0)1248 383702
University of Wales, Bangor,        fax: +44 (0)1248 382569
Gwynedd, LL57 2UW, UK.              www: http://biology.bangor.ac.uk/


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to