cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sharpe <p...@miraclefish.com>
Subject Re: Cocoon, XSL and CSS
Date Mon, 03 Jul 2000 15:00:59 GMT
I just output the link in a really simple XSLT template:

  <xsl:template match="page">
    <html>
      <head>
        <link rel="stylesheet" type="text/css" href="/foo.css"/>
        <title>foo</title>
      </head>
      <body>
        <xsl:apply-templates/>
      </body>
    </html>
  </xsl:template>

paul

On Mon, 3 Jul 2000, Mac Schwarz wrote:

> Hi,
> 
> I just can't figure out how to include CSS stylesheets with XSLT. After
> playing around with my own files I tested the jakarta.apache.org example
> in xml-cocoon/samples/sites/jakarta.apache.org from the Cocoon CVS since
> I thought that would work well.
> 
> I'm using tomcat 3.1, Java(TM) 2 Runtime Environment, Standard Edition
> (build 1.3.0-beta) and a Cocoon2 CVS checkout from yesterday on Solaris
> 8 x86.
> 
> I've got an tomcat context /cocoon with the docbaes
> tomcat/webapps/cocoon and can access the welcome page or the Simple XSP
> page for example. From the Cocoon CVS tree I copied the files
> index-page.xml, page-html.xsl and style.css from 
> xml-cocoon/samples/sites/jakarta.apache.org into the cocoon context.
> After setting up the sitemap for the index-page.xml
> 
> 	<process uri="index-page.xml" source="index-page.xml">
>         <generator name="file"/>
>         <filter name="xslt">
>           <parameter name="stylesheet" value="page-html.xsl"/>
>         </filter>
>         <serializer name="html">
>           <parameter name="contentType" value="text/html"/>
>         </serializer>
>       </process>
> 
> I get the error 'Cocoon 2.0: Not Found' 'The requested URI
> "/cocoon/style.css" was not found.' if I try to access the page.
> Additional to the error messages above there's a
> 'PATH_INFO="/style.css"' comment in the source of the error page.
> 
> After removing the line
> <link rel="stylesheet" href="style.css"><!-- no not remove this comment
> --></link>
> in page-html.xsl the index-page.xml is displayed properly. 
> 
> Unfortunately I haven't found any working example yet. However if I use
> a stylesheet from my apache server e.g. 
> <link rel="stylesheet" href="http://www.myserver.xy/style.css"><!-- no
> not remove this comment --></link>
> 
> the CSS is prosessed. Any hints how to include the CSS correctly in a
> XSL with Cocoon?
> 
> Regards,
> 	mac
> -- 
> Mac Schwarz / AERIA Projekt / Inst. f. Klassische Archaeologie
> e-mail: mac@aeria.phil.uni-erlangen.de  / Tel.: 09131-85-24791
>  FAU Erlangen-Nuernberg   /   Kochstr.4   /   91054 Erlangen
>   <http://www.phil.uni-erlangen.de/~p1altar/aeriahome.html>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 

--
paul@miraclefish.com


Mime
View raw message