This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: One CSS stylesheet only in the root directory
- From: Bob Stayton <bobs at caldera dot com>
- To: "Fischer, Oliver" <plexus at snafu dot de>
- Cc: docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Date: Sat, 11 Jan 2003 16:08:47 -0800
- Subject: Re: DOCBOOK-APPS: One CSS stylesheet only in the root directory
- References: <3E1F41B5.7040108@snafu.de>
On Fri, Jan 10, 2003 at 10:57:09PM +0100, Fischer, Oliver wrote:
> Hello list,
>
> while starting the spread all my files in several directories and
> generating them with the same structure I realized that I have to
> copy the CSS stylesheet to every output directory.
>
> Since I don't like it to copy static content I hacked for my
> website the head.xsl
>
> <meta name="generator" content="Website XSL Stylesheet
> V{$VERSION}"/>
> <xsl:if test="$html.stylesheet != ''">
> <link rel="stylesheet" type="text/css">
> <xsl:attribute name="href">
> <xsl:value-of select="$thisrelpath"/>
> <xsl:value-of select="$html.stylesheet"/>
> </xsl:attribute>
>
> <xsl:if test="$html.stylesheet.type != ''">
> <xsl:attribute name="type">
> <xsl:value-of select="$html.stylesheet.type"/>
> </xsl:attribute>
> </xsl:if>
> </link>
> </xsl:if>
>
> The result is, that I need only one instance and there is no need
> to copy it to ever dir.
>
> I would be really happy if this feature could be integrated in
> the distribution of website and docbook. I hope, I am not the
> only one, who would like it... ;-)
Actually, a feature like this is already a part of the website
stylesheet. If you specify your css stylesheet using
a <style> element in layout.xml instead of with an
'html.stylesheet' parameter, then you each generated HTML
file references the same stylesheet file using relative
paths. See the example layout.xml file included with
the distribution.
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com