summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2004-05-24 16:00:48 +0000
committerShaun McCance <shaunm@src.gnome.org>2004-05-24 16:00:48 +0000
commit1c5750cec37824d2ae393e138c73ba0bbbb38180 (patch)
tree6b307e15182a88977ae026eb9aaed941a16803b8 /test
parentc89cef7d08e8bee73ffe5b565e59e67a2479b2cb (diff)
downloadgnome-doc-utils-1c5750cec37824d2ae393e138c73ba0bbbb38180.tar.gz
- Made a custom db2html to show the source
* test/testdocs/Makefile: * test/testdocs/db2html: - Made a custom db2html to show the source * xslt/docbook/html/Makefile.am: * xslt/docbook/html/db2html-table.xsl: * xslt/docbook/html/db2html.xsl: - Added db2html-table.xsl, mostly commented out * xslt/docbook/html/db2html-block.xsl: - Added para * xslt/docbook/html/db2html-inline.xsl: - Fixed trademark to process children * xslt/docbook/html/db2html-list.xsl: - Re-added variablelist support * xslt/docbook/html/db2html-media.xsl: - Commented out some problematic parts, needs to be fixed
Diffstat (limited to 'test')
-rw-r--r--test/testdocs/Makefile2
-rw-r--r--test/testdocs/db2html.xsl39
2 files changed, 40 insertions, 1 deletions
diff --git a/test/testdocs/Makefile b/test/testdocs/Makefile
index 78a9ff1..33819c9 100644
--- a/test/testdocs/Makefile
+++ b/test/testdocs/Makefile
@@ -1,4 +1,4 @@
-db2html = ../../xslt/docbook/html/db2html.xsl
+db2html = db2html.xsl
tests = $(filter-out template.xml,$(wildcard *.xml))
htmls = $(patsubst %.xml,html/%,$(tests))
diff --git a/test/testdocs/db2html.xsl b/test/testdocs/db2html.xsl
new file mode 100644
index 0000000..82d25e5
--- /dev/null
+++ b/test/testdocs/db2html.xsl
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<xsl:include href="../../xslt/docbook/html/db2html.xsl"/>
+
+<xsl:template match="articleinfo/title | bookinfo/title">
+ <xsl:param name="title_for" select=".."/>
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="db.chunk.depth-in-chunk"/>
+ </xsl:param>
+ <xsl:call-template name="db2html.title.header">
+ <xsl:with-param name="title_for" select="$title_for"/>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
+ </xsl:call-template>
+ <pre style="margin: 0.8em; padding: 0.8em; background-color: #9EB6D1;">
+ <xsl:apply-templates mode="source.mode" select="/"/>
+ </pre>
+</xsl:template>
+
+<xsl:template mode="source.mode" match="*">
+ <xsl:text>&lt;</xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:for-each select="attribute::*">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>="</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>"</xsl:text>
+ </xsl:for-each>
+ <xsl:text>&gt;</xsl:text>
+ <xsl:apply-templates mode="source.mode" select="node()"/>
+ <xsl:text>&lt;/</xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text>&gt;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>