[Telepathy-commits] [telepathy-doc/master] Use a local db2html.xsl to allow overriding of the stylesheet
Davyd Madeley
davyd at madeley.id.au
Tue Mar 3 22:27:14 PST 2009
---
docs/book/Makefile.am | 26 ++++++--------------------
docs/book/xslt/.gitignore | 1 +
docs/book/xslt/db2html.xsl.in | 22 ++++++++++++++++++++++
3 files changed, 29 insertions(+), 20 deletions(-)
create mode 100644 docs/book/xslt/.gitignore
create mode 100644 docs/book/xslt/db2html.xsl.in
diff --git a/docs/book/Makefile.am b/docs/book/Makefile.am
index 4306a39..361fc9f 100644
--- a/docs/book/Makefile.am
+++ b/docs/book/Makefile.am
@@ -45,9 +45,13 @@ MAIN = C/$(DOC_MODULE)-with-examples.xml
HTML_STYLESHEET = book.css
XSLTPROC = xsltproc
-DOCBOOK_STYLESHEET ?= $(shell pkg-config --variable db2html gnome-doc-utils)
+PARENT_STYLESHEET ?= $(shell pkg-config --variable db2html gnome-doc-utils)
+DOCBOOK_STYLESHEET = xslt/db2html.xsl
ICONS_DIR ?= $(shell pkg-config --variable icondir gnome-doc-utils)/hicolor/48x48
+xslt/db2html.xsl: xslt/db2html.xsl.in
+ sed -e "s|\@PARENT_STYLESHEET\@|$(PARENT_STYLESHEET)|" $< >$@
+
# Create a html generation of the C locale's version of the DocBook,
# using our custom stylesheet and graphics:
# Set the use.id.as.filename param so that we don't use the chapter / section
@@ -56,7 +60,7 @@ ICONS_DIR ?= $(shell pkg-config --variable icondir gnome-doc-utils)/hicolor/48x4
#
# We set refentry.generate.name and refentry.generate.title to get the title
# instead of "Name" as the title.
-html/index.html: $(MAIN) Makefile.am
+html/index.html: $(MAIN) Makefile.am $(DOCBOOK_STYLESHEET)
rm -rf html
$(mkinstalldirs) html
cp -r ../examples/ html/
@@ -72,24 +76,6 @@ html/index.html: $(MAIN) Makefile.am
$(DOCBOOK_STYLESHEET) \
$<
-# $(XSLTPROC) \
-# --param toc.section.depth 1 \
-# --stringparam html.stylesheet "$(HTML_STYLESHEET)" \
-# --stringparam admon.graphics 1 \
-# --stringparam admon.graphics.path "icons/" \
-# --stringparam admon.graphics.extension ".png" \
-# --stringparam chunker.output.indent yes \
-# --stringparam chunker.output.encoding UTF-8 \
-# --stringparam navig.graphics yes \
-# --stringparam navig.graphics.extension ".png" \
-# --stringparam navig.graphics.path "icons/" \
-# --stringparam toc.list.type "ul" \
-# --stringparam use.id.as.filename "1" \
-# --stringparam refentry.generate.name "0" \
-# --stringparam refentry.generate.title "1" \
-# -o html/ --xinclude --catalogs $(DOCBOOK_STYLESHEET) \
-# $<
-
html: html/index.html
# We have to generate the pdf in a subdirectory (e.g. pdf/) because the tutorial
diff --git a/docs/book/xslt/.gitignore b/docs/book/xslt/.gitignore
new file mode 100644
index 0000000..2b01a47
--- /dev/null
+++ b/docs/book/xslt/.gitignore
@@ -0,0 +1 @@
+db2html.xsl
diff --git a/docs/book/xslt/db2html.xsl.in b/docs/book/xslt/db2html.xsl.in
new file mode 100644
index 0000000..3a2543d
--- /dev/null
+++ b/docs/book/xslt/db2html.xsl.in
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
+
+<!-- Local Overrides for the gnome-doc-utils XSL stylesheets.
+
+ Copyright (C) 2009, Collabora Ltd.
+
+ Authors: Davyd Madeley <davyd.madeley at collabora.co.uk>
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:set="http://exslt.org/sets"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="exsl"
+ xsl:exclude-result-prefixes="set str"
+ version="1.0">
+
+ <xsl:import href="@PARENT_STYLESHEET@"/>
+
+</xsl:stylesheet>
+
--
1.5.6.5
More information about the telepathy-commits
mailing list