summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-06-15 20:12:16 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:45:54 -0500
commitb3ac9050e629000e4bd2daa7e751d55722d58cd5 (patch)
tree137ac46a72cec32c552ce2fae76b27b80123a2b1
parent41419c7f3f0779f5637787599520ae2491f033c3 (diff)
downloadsamba-b3ac9050e629000e4bd2daa7e751d55722d58cd5.tar.gz
samba-b3ac9050e629000e4bd2daa7e751d55722d58cd5.tar.bz2
samba-b3ac9050e629000e4bd2daa7e751d55722d58cd5.zip
Add initial version of Pearson stylesheet
(This used to be commit 626ea21b64d61935faf3ec211c122c90aba799e4)
-rw-r--r--docs/Makefile.in11
-rw-r--r--docs/configure.in1
-rw-r--r--docs/xslt/pearson.xsl108
3 files changed, 119 insertions, 1 deletions
diff --git a/docs/Makefile.in b/docs/Makefile.in
index dba995785f..3a2af647cf 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -52,6 +52,7 @@ DVIDIR = $(OUTPUTDIR)
FODIR = $(OUTPUTDIR)
HTMLHELPDIR = $(OUTPUTDIR)/htmlhelp
VALIDATEDIR = $(OUTPUTDIR)/validate
+PEARSONDIR = $(OUTPUTDIR)/pearson
TXTDIR = $(OUTPUTDIR)/textdocs
HTMLDIR=$(OUTPUTDIR)/htmldocs
PLUCKERDIR=$(OUTPUTDIR)/plucker
@@ -301,13 +302,21 @@ $(MANDIR):
$(MANDIR)/%: %.xml
$(XSLTPROC) --output $@ xslt/man.xsl $<
+$(PEARSONDIR):
+ mkdir $@
+
+$(PEARSONDIR)/%.xml: %.xml
+ $(XSLTPROC) --xinclude --output $@ xslt/pearson.xsl $<
+
+pearson: $(PEARSONDIR) $(PEARSONDIR)/Samba-HOWTO-Collection.xml
+
$(VALIDATEDIR):
mkdir $@
$(VALIDATEDIR)/%.report.html: %.xml
$(XMLLINT) --valid --noout --htmlout $< 2> $@
-verify: $(VALIDATEDIR) $(VALIDATEDIR)/Samba-HOWTO-Collection.report.html $(VALIDATEDIR)/Samba-Developers-Guide.report.html $(VALIDATEDIR)/Samba-Guide.report.html
+verify: $(VALIDATEDIR) $(VALIDATEDIR)/Samba-HOWTO-Collection.report.html $(VALIDATEDIR)/Samba-Developers-Guide.report.html $(VALIDATEDIR)/Samba-Guide.report.html $(PEARSONDIR)/Samba-HOWTO-Collection.xml
# Find undocumented parameters
diff --git a/docs/configure.in b/docs/configure.in
index 75ea1532fc..9d47030937 100644
--- a/docs/configure.in
+++ b/docs/configure.in
@@ -63,6 +63,7 @@ DOCS_DEFINE_TARGET(HTML, ALL, [HTML versions], [html])
DOCS_DEFINE_TARGET(HTMLHELP, ALL, [HTML Help versions], [htmlhelp])
DOCS_DEFINE_TARGET(HTMLMAN, ALL, [HTML versions of the manpages], [htmlman])
DOCS_DEFINE_TARGET(MANPAGES, ALL, [manpages], [manpages])
+DOCS_DEFINE_TARGET(PEARSON, ALL, [pearson-compatible XML], [pearson])
DOCS_DEFINE_TARGET(PLUCKER, HTML, [plucker versions], [plucker])
DOCS_DEFINE_TARGET(VERIFY, ALL, [verifying docbook output], [verify])
DOCS_DEFINE_TARGET(UNDOCUMENTED, MANPAGES, [list of undocumented options], [undocumented])
diff --git a/docs/xslt/pearson.xsl b/docs/xslt/pearson.xsl
new file mode 100644
index 0000000000..e5dd6749a5
--- /dev/null
+++ b/docs/xslt/pearson.xsl
@@ -0,0 +1,108 @@
+<?xml version='1.0'?>
+<!--
+ Convert DocBook to XML validating against the Pearson DTD
+ Published under the GNU GPL
+
+ (C) Jelmer Vernooij <jelmer@samba.org> 2004
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.1"
+ extension-element-prefixes="exsl">
+
+ <xsl:import href="../settings.xsl"/>
+
+ <xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-public="-//Pearson//DTD Books//DE" doctype-system="../../Xml_dtd_1.1/pearson.dtd"/>
+
+ <xsl:template match="book">
+ <xsl:element name="book">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="authorgroup">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="pubdate">
+ <xsl:element name="publdate">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="para">
+ <xsl:element name="p">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="ulink">
+ <xsl:element name="url">
+ <xsl:value-of select="@ulink"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="glossentry">
+ <xsl:element name="glossitem">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="glossterm">
+ <xsl:element name="term">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="itemizedlist">
+ <xsl:element name="ul">
+ <xsl:for-each select="listitem">
+ <xsl:element name="li">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="emphasis">
+ <xsl:element name="em">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="link">
+ <xsl:element name="xref">
+ <xsl:attribute name="linkend"><xsl:value-of select="@linkend"/></xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="acronym"/>
+
+ <xsl:template match="glossdef/para">
+ <xsl:element name="glosspara">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="author">
+ <xsl:element name="author">
+ <xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="surname"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="editor">
+ <xsl:element name="editor">
+ <xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="surname"/>
+ </xsl:element>
+ </xsl:template>
+
+
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>