summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex4ht/xtpipes/docbook.4xt
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-12 22:29:41 +0000
committerKarl Berry <karl@freefriends.org>2008-05-12 22:29:41 +0000
commitf724c0d6176b55cf00a8b2cf7da4d9d1715755af (patch)
tree07724dc93277564a221c330ea94b255afd5dcb21 /Master/texmf-dist/tex4ht/xtpipes/docbook.4xt
parentce17979d710d61d93b25e13de7cff43ab9f5590c (diff)
tex4ht update from latest fix release
git-svn-id: svn://tug.org/texlive/trunk@8095 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex4ht/xtpipes/docbook.4xt')
-rwxr-xr-xMaster/texmf-dist/tex4ht/xtpipes/docbook.4xt114
1 files changed, 114 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex4ht/xtpipes/docbook.4xt b/Master/texmf-dist/tex4ht/xtpipes/docbook.4xt
new file mode 100755
index 00000000000..903aaf4838b
--- /dev/null
+++ b/Master/texmf-dist/tex4ht/xtpipes/docbook.4xt
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE xtpipes SYSTEM "xtpipes.dtd" >
+<xtpipes preamble="yes" signature="docbook.4xt (2008-02-22-01:05)">
+ <sax content-handler="xtpipes.util.ScriptsManager"
+ lexical-handler="xtpipes.util.ScriptsManagerLH" >
+ <script element="ulink" >
+ <set name="ulink" >
+ <![CDATA[
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+ <xsl:output omit-xml-declaration = "yes" />
+
+ <xsl:template match=" ulink[
+ @url and starts-with( @url, '#')
+]" >
+ <link>
+ <xsl:attribute name="linkend">
+ <xsl:value-of select=" substring( @url, 2 )" />
+ </xsl:attribute>
+ <xsl:apply-templates select="*|text()|comment()" />
+ </link>
+</xsl:template>
+
+ <xsl:template match="*|@*|text()|comment()" >
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|text()|comment()" />
+ </xsl:copy>
+ </xsl:template>
+ </xsl:stylesheet>
+]]>
+
+ </set>
+ <xslt name="." xml="." xsl="ulink" />
+</script>
+
+ <script element="tbody" >
+ <set name="tbody" >
+ <![CDATA[
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+ <xsl:output omit-xml-declaration = "yes" />
+
+ <xsl:template match=" row[ @role = 'hline' ]" />
+<xsl:template match=" row[ @role = 'hline' ]" />
+<xsl:template match=" row[
+ following-sibling::*[1][ self::row[@role = 'hline'] ]
+] ">
+ <xsl:copy>
+ <xsl:attribute name="rowsep">
+ <xsl:text>1</xsl:text>
+ </xsl:attribute>
+ <xsl:apply-templates select="*|@*|text()|comment()" />
+ </xsl:copy>
+</xsl:template>
+<xsl:template match=" row[
+ (@role = 'cline')
+ and
+ preceding-sibling::*[1]
+ [ self::row[ not(@role) ] ]
+ and
+ ( count(child::entry) = count(preceding-sibling::*[1]/child::entry))
+]" />
+<xsl:template match=" row[
+ not(@role)
+ and
+ following-sibling::*[1][ self::row[@role = 'cline'] ]
+ and
+ ( count(child::entry) = count(following-sibling::*[1]/child::entry))
+] ">
+ <xsl:copy>
+ <xsl:apply-templates select="@*" />
+ <xsl:apply-templates select="*|text()|comment()" mode="cline" />
+ </xsl:copy>
+</xsl:template>
+<xsl:template match=" text()|comment() " mode="cline">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|text()|comment()" />
+ </xsl:copy>
+</xsl:template>
+<xsl:template match="*" mode="cline">
+ <xsl:copy>
+ <xsl:if test="self::entry">
+ <xsl:attribute name="rowsep">
+ <xsl:variable name="pos">
+ <xsl:value-of select="position()" />
+ </xsl:variable>
+ <xsl:value-of select="parent::row
+ / following-sibling::*[1]
+ / child::entry[position()=$pos]
+ / @rowsep
+ " />
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="*|@*|text()|comment()" />
+ </xsl:copy>
+</xsl:template>
+
+ <xsl:template match="*|@*|text()|comment()" >
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|text()|comment()" />
+ </xsl:copy>
+ </xsl:template>
+ </xsl:stylesheet>
+]]>
+
+ </set>
+ <xslt name="." xml="." xsl="tbody" />
+</script>
+
+ </sax>
+</xtpipes>
+