| 1 |
<?xml version="1.0" encoding="UTF-8" ?> |
| 2 |
<!DOCTYPE xtpipes SYSTEM "xtpipes.dtd" > |
| 3 |
<xtpipes preamble="yes" signature="docbook.4xt (2008-11-14-02:41)"> |
| 4 |
<sax content-handler="xtpipes.util.ScriptsManager" |
| 5 |
lexical-handler="xtpipes.util.ScriptsManagerLH" > |
| 6 |
<script element="ulink" > |
| 7 |
<set name="ulink" > |
| 8 |
<![CDATA[ |
| 9 |
<xsl:stylesheet version="1.0" |
| 10 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 11 |
xmlns:db="http://docbook.org/ns/docbook" |
| 12 |
> |
| 13 |
<xsl:output omit-xml-declaration = "yes" /> |
| 14 |
|
| 15 |
<xsl:template match=" ulink[ |
| 16 |
@url and starts-with( @url, '#') |
| 17 |
]" > |
| 18 |
<link> |
| 19 |
<xsl:attribute name="linkend"> |
| 20 |
<xsl:value-of select=" substring( @url, 2 )" /> |
| 21 |
</xsl:attribute> |
| 22 |
<xsl:apply-templates select="*|text()|comment()" /> |
| 23 |
</link> |
| 24 |
</xsl:template> |
| 25 |
|
| 26 |
<xsl:template match="*|@*|text()|comment()" > |
| 27 |
<xsl:copy> |
| 28 |
<xsl:apply-templates select="*|@*|text()|comment()" /> |
| 29 |
</xsl:copy> |
| 30 |
</xsl:template> |
| 31 |
</xsl:stylesheet> |
| 32 |
]]> |
| 33 |
|
| 34 |
</set> |
| 35 |
<xslt name="." xml="." xsl="ulink" /> |
| 36 |
</script> |
| 37 |
|
| 38 |
<script element="tbody" > |
| 39 |
<set name="dirt" > |
| 40 |
<![CDATA[ |
| 41 |
<xsl:stylesheet version="1.0" |
| 42 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 43 |
xmlns:db="http://docbook.org/ns/docbook" |
| 44 |
> |
| 45 |
<xsl:output omit-xml-declaration = "yes" /> |
| 46 |
|
| 47 |
<xsl:template match=" row[ |
| 48 |
(count(child::entry) = 1) |
| 49 |
and |
| 50 |
( normalize-space(child::entry[1]/child::para[1]/child::comment()) |
| 51 |
= 'dirt' |
| 52 |
) |
| 53 |
]"> |
| 54 |
</xsl:template> |
| 55 |
|
| 56 |
<xsl:template match="*|@*|text()|comment()" > |
| 57 |
<xsl:copy> |
| 58 |
<xsl:apply-templates select="*|@*|text()|comment()" /> |
| 59 |
</xsl:copy> |
| 60 |
</xsl:template> |
| 61 |
</xsl:stylesheet> |
| 62 |
]]> |
| 63 |
|
| 64 |
</set> |
| 65 |
<set name="tbody" > |
| 66 |
<![CDATA[ |
| 67 |
<xsl:stylesheet version="1.0" |
| 68 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 69 |
xmlns:db="http://docbook.org/ns/docbook" |
| 70 |
> |
| 71 |
<xsl:output omit-xml-declaration = "yes" /> |
| 72 |
|
| 73 |
<xsl:template match=" row[ @role = 'hline' ]" /> |
| 74 |
<xsl:template match=" row[ @role = 'hline' ]" /> |
| 75 |
<xsl:template match=" row[ |
| 76 |
following-sibling::*[1][ self::row[@role = 'hline'] ] |
| 77 |
] "> |
| 78 |
<xsl:copy> |
| 79 |
<xsl:attribute name="rowsep"> |
| 80 |
<xsl:text>1</xsl:text> |
| 81 |
</xsl:attribute> |
| 82 |
<xsl:apply-templates select="*|@*|text()|comment()" /> |
| 83 |
</xsl:copy> |
| 84 |
</xsl:template> |
| 85 |
<xsl:template match=" row[ |
| 86 |
(@role = 'cline') |
| 87 |
and |
| 88 |
preceding-sibling::*[1] |
| 89 |
[ self::row[ not(@role) ] ] |
| 90 |
and |
| 91 |
( count(child::entry) |
| 92 |
= count(preceding-sibling::*[1]/child::entry)) |
| 93 |
]" /> |
| 94 |
<xsl:template match=" row[ |
| 95 |
not(@role) |
| 96 |
and |
| 97 |
following-sibling::*[1][ self::row[@role = 'cline'] ] |
| 98 |
and |
| 99 |
( count(child::entry) |
| 100 |
= count(following-sibling::*[1]/child::entry)) |
| 101 |
] "> |
| 102 |
<xsl:copy> |
| 103 |
<xsl:apply-templates select="@*" /> |
| 104 |
<xsl:apply-templates select="*|text()|comment()" mode="cline" /> |
| 105 |
</xsl:copy> |
| 106 |
</xsl:template> |
| 107 |
<xsl:template match=" text()|comment() " mode="cline"> |
| 108 |
<xsl:copy> |
| 109 |
<xsl:apply-templates select="*|@*|text()|comment()" /> |
| 110 |
</xsl:copy> |
| 111 |
</xsl:template> |
| 112 |
<xsl:template match="*" mode="cline"> |
| 113 |
<xsl:copy> |
| 114 |
<xsl:if test="self::entry"> |
| 115 |
<xsl:attribute name="rowsep"> |
| 116 |
<xsl:variable name="pos"> |
| 117 |
<xsl:value-of select="position()" /> |
| 118 |
</xsl:variable> |
| 119 |
<xsl:value-of select="parent::row |
| 120 |
/ following-sibling::*[1] |
| 121 |
/ child::entry[position()=$pos] |
| 122 |
/ @rowsep |
| 123 |
" /> |
| 124 |
</xsl:attribute> |
| 125 |
</xsl:if> |
| 126 |
<xsl:apply-templates select="*|@*|text()|comment()" /> |
| 127 |
</xsl:copy> |
| 128 |
</xsl:template> |
| 129 |
|
| 130 |
<xsl:template match="*|@*|text()|comment()" > |
| 131 |
<xsl:copy> |
| 132 |
<xsl:apply-templates select="*|@*|text()|comment()" /> |
| 133 |
</xsl:copy> |
| 134 |
</xsl:template> |
| 135 |
</xsl:stylesheet> |
| 136 |
]]> |
| 137 |
|
| 138 |
</set> |
| 139 |
<xslt name="." xml="." xsl="tbody" /> |
| 140 |
<xslt name="." xml="." xsl="dirt" /> |
| 141 |
<dom name="." xml="." method="cline" class="tex4ht.DbUtilities" /> |
| 142 |
</script> |
| 143 |
|
| 144 |
<script element="para" > |
| 145 |
<dom name="." xml="." method="para" class="tex4ht.DbUtilities" /> |
| 146 |
</script> |
| 147 |
|
| 148 |
</sax> |
| 149 |
</xtpipes> |
| 150 |
|