cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Schatten <>
Subject Re: relative paths
Date Sat, 24 May 2003 15:00:33 GMT
morten svan├Žs wrote:

> Hi,
> I'm trying to get a css file loaded from a relative path inside a xslt 
> file like this:
>     <link href="stylesheets/main.css" type="text/css" rel="stylesheet"/>
> the sitemap is in:
> /cocoon/foo/bar
> the sitemap loads the xslt file like this:
> <map:transform src="stylesheets/page2html.xsl">
> But this don't work, so my question is: what is the root of the html 
> document
> served after the xslt transformation ?
> In other examples I see that contextPath is used,  but I don't 
> understand where
> it's defined and what it's value is.

every document (type) Cocoon should serve must be declared in the 
sitemap, or to put it the other way round: for every document (off 
course also CSS, JAR, gif, jpg, ...) Cocoon should serve a matcher in 
the pipeline must be available that fits.

so you have to add something like this:

<map:match pattern="**.css">
   <map:read mime-type="text/css" src="style/{1}.css"/>

so that means, that everytime a CSS file is requested, this is searched 
in "<project>/style/...css"

e.g. in <link href="test/main.css" type="text/css" rel="stylesheet"/>
this is searched in "<project>/style/test/main.css"


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message