diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2011-09-08 13:42:47 -0400 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2011-09-09 14:15:24 -0400 |
commit | fc347e2cd78c2a95b85a961eb110206b6f126b08 (patch) | |
tree | 8331c9e3af3ea4e2bdbd619c86627c01c66ef7f2 /xorg-chunk.xsl | |
parent | 9d312bd9b62b8dc1b13ba427aafee99440df6a4b (diff) |
Embed CSS styles inside the HTML HEAD element
Rather than referring to the external xorg.css stylesheet, embed the content
of the file in the html output produced. This is accomplished by adding
an xsl:template to the customization layer. The content of xorg.css must not
be encoded due to the '<' character.
This makes the whole html docs tree much more relocatable.
In addition, it eliminates xorg.css as a runtime file which makes
xorg-sgml-doctools a build time only package.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'xorg-chunk.xsl')
-rw-r--r-- | xorg-chunk.xsl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xorg-chunk.xsl b/xorg-chunk.xsl index 3d85c6f..93b18b5 100644 --- a/xorg-chunk.xsl +++ b/xorg-chunk.xsl @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> - +<!DOCTYPE xsl:stylesheet [ +<!ENTITY xorgcss SYSTEM "xorg.css"> +]> <!-- X.Org DocBook/XML customization @@ -10,6 +12,13 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/> +<!-- Embedding CSS styles http://www.sagehill.net/docbookxsl/HtmlHead.html#EmbedCSS --> +<xsl:template name="user.head.content"> +<style type="text/css"> +<xsl:text disable-output-escaping="yes">&xorgcss;</xsl:text> +</style> +</xsl:template> + <!-- Reference Pages HTML/FO Parameters --> <!-- The formatting of a function element will include generated parentheses --> |