Xavier,
 
Took me a while as well as the documentation on sitemap.xmap is kinda sparse, but here 
is a snipped to put into the <map:pipeline> tag of your sitemap.xmap:
 
   <map:match pattern="**.css">
     <map:read src="{1}.css" mime-type="text/css"/>
   </map:match>
 
What this means in English:
take any request to this context that ends with ".css" and respond with the content of 
the corresponding ".css" file.
 
Assume you have this directory structure:
tomcat -
    webapps -
       cocoon -
           xml -
               page.xml
           xsl -
               page.xsl
           css -
               style.css
 
you might want to set-up your sitemap like this:
<map:pipelines>
  <map:pipeline>
   ... blah ...
   <map:match pattern="page.html">
    <map:generate type="serverpages" src="xml/page.xml"/>
    <map:transform type="xslt" src="xsl/page.xsl"/>
    <map:serialize/>
   </map:match>
   <map:match pattern="style.css">
     <map:read src="css/style.css" mime-type="text/css"/>
   </map:match>
  </map:pipeline>
</map:pipelines>
 
or, alternatively, you can use the wildcards as described above (a double-star will 
re-curse through directories, a single-star will stay in the current directory only).
 
Hope this helps... 
Georg von Sperling
MedAptus, Inc.
http://www.medaptus.com
mailto:[EMAIL PROTECTED]
 

        -----Original Message----- 
        From: Je vous site [mailto:[EMAIL PROTECTED]] 
        Sent: Wed 2/20/2002 11:00 AM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: Css stylesheet problem
        
        

        Hello,
        
        I would like to apply a Css stylesheet to the HTML file i have generated
        on Cocoon.
        Is there a solution to this problem, without changing my configuration
        (Tomcat 4.0.1 / Cocoon 2 under W2k)
        
        <?xml version="1.0" encoding="ISO-8859-1"?>
        <xsl:stylesheet     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
        version="1.0" >
        
        <xsl:template match="/">
          <html>
          <head>
                <link rel="stylesheet" href="style.css" type="text/css" />
          </head>
        ...
        
        Thank you for all kind of help : Xavier
        
        
        ---------------------------------------------------------------------
        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]>
        
        

<<winmail.dat>>

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