cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Von Sperling" <>
Subject RE: Css stylesheet problem
Date Thu, 21 Feb 2002 07:36:08 GMT
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"/>
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 -
           xsl -
           css -
you might want to set-up your sitemap like this:
   ... blah ...
   <map:match pattern="page.html">
    <map:generate type="serverpages" src="xml/page.xml"/>
    <map:transform type="xslt" src="xsl/page.xsl"/>
   <map:match pattern="style.css">
     <map:read src="css/style.css" mime-type="text/css"/>
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.

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

	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=""
	version="1.0" >
	<xsl:template match="/">
	        <link rel="stylesheet" href="style.css" type="text/css" />
	Thank you for all kind of help : Xavier
	Please check that your question has not already been answered in the
	FAQ before posting. <>
	To unsubscribe, e-mail: <>
	For additional commands, e-mail: <>

View raw message