diff options
Diffstat (limited to 'Master/texmf-dist/tex4ht/xtpipes/docbook.4xt')
-rwxr-xr-x | Master/texmf-dist/tex4ht/xtpipes/docbook.4xt | 114 |
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> + |