cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <>
Subject question about how to reference a css file from within xslt (cocoon 2.2)
Date Tue, 24 Jun 2008 12:43:43 GMT
Hi all,


I can't seem to retrieve the css file (myDemo.css).  Anybody who could
give me a hint about what's wrong with my current configuration?


When I take a look at the generated html page, the source looks OK to


<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Strict//EN"
    <title>Cocoon Demo by Ciber</title>
    <link type="text/css" href="resource/external/css/myDemo.css"
rel="stylesheet" />
But I do not see any css styling applied and when I try to take a look
at the css file (via firefox webdeveloper plugin) that should ship with
this page, it looks as if cocoon serves the transformed page-home.xml as



My folder structure looks like:



            * myDemo

                        * page

                                    * page-home.xml           

                        * xslt    

                                    * xml2xhtml.xslt

            * resource


                                   * css

                                               * myDemo.css



Xml2html.xslt snippet:


  <xsl:template match="/">



        <title><xsl:value-of select="page/title/text()"/></title>

        <link rel="stylesheet" href="resource/external/css/myDemo.css"










Sitemap snippet:




  <map:pipeline id="genericPages">

    <map:match pattern="page-home.xml"/>

    <map:generate src="myDemo/page/page-home.xml"/>

            <map:transform src="myDemo/xslt/xml2xhtml.xslt"/>

            <map:serialize type="xhtml"/>



  <map:pipeline id="external-resource">

            <map:match pattern="resource/external/css/myDemo.css">

      <map:read src="resource/external/css/myDemo.css"/>


    <map:match pattern="resource/external/**">

      <map:read src="resource/external/{1}"/>









Robby Pelssers

View raw message