| 1 |
<?xml version='1.0'?> |
|---|
| 2 |
<!-- |
|---|
| 3 |
Copyright (c) 2004 Nuxeo SARL <http://nuxeo.com> |
|---|
| 4 |
|
|---|
| 5 |
Authors: |
|---|
| 6 |
M.-A. Darche (Nuxeo) |
|---|
| 7 |
|
|---|
| 8 |
This script is free software; you can redistribute it and/or |
|---|
| 9 |
modify it under the terms of the GNU Lesser General Public |
|---|
| 10 |
License as published by the Free Software Foundation; either |
|---|
| 11 |
version 2.1 of the License, or (at your option) any later version. |
|---|
| 12 |
|
|---|
| 13 |
This script is distributed in the hope that it will be useful, |
|---|
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 16 |
Lesser General Public License for more details. |
|---|
| 17 |
|
|---|
| 18 |
You should have received a copy of the GNU Lesser General Public |
|---|
| 19 |
License along with this library; if not, write to the Free Software |
|---|
| 20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 21 |
|
|---|
| 22 |
See ``COPYING`` for more information. |
|---|
| 23 |
|
|---|
| 24 |
$Id$ |
|---|
| 25 |
--> |
|---|
| 26 |
<xsl:stylesheet version="1.0" |
|---|
| 27 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 28 |
xmlns:fo="http://www.w3.org/1999/XSL/Format"> |
|---|
| 29 |
|
|---|
| 30 |
<xsl:import href="docbook/fo/docbook.xsl"/> |
|---|
| 31 |
|
|---|
| 32 |
<xsl:param name="paper.type" select="'A4'"/> |
|---|
| 33 |
<xsl:param name="draft.mode" select="'no'"/> |
|---|
| 34 |
<xsl:param name="shade.verbatim" select="1"/> |
|---|
| 35 |
|
|---|
| 36 |
<!-- |
|---|
| 37 |
Print section label (number) along with the section, in the |
|---|
| 38 |
document body as well as in the toc. |
|---|
| 39 |
--> |
|---|
| 40 |
<xsl:param name="section.autolabel" select="1"/> |
|---|
| 41 |
|
|---|
| 42 |
<!-- |
|---|
| 43 |
Up to heading8 in the toc |
|---|
| 44 |
--> |
|---|
| 45 |
<xsl:param name="toc.section.depth" select="8"/> |
|---|
| 46 |
<xsl:param name="toc.max.depth" select="8"/> |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
<xsl:param name="xep.extensions" select="1"/> |
|---|
| 50 |
|
|---|
| 51 |
<!-- ==================================================================== --> |
|---|
| 52 |
<!-- This is the support for symbol characters --> |
|---|
| 53 |
<xsl:template match="phrase[starts-with(@role, 'font-name')]"> |
|---|
| 54 |
<fo:inline> |
|---|
| 55 |
<xsl:attribute name="font-family"> |
|---|
| 56 |
<xsl:value-of select="normalize-space(substring-after(@role, ':'))"/> |
|---|
| 57 |
</xsl:attribute> |
|---|
| 58 |
<xsl:apply-templates/> |
|---|
| 59 |
</fo:inline> |
|---|
| 60 |
</xsl:template> |
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
<!-- ==================================================================== --> |
|---|
| 64 |
<!-- |
|---|
| 65 |
This is the support for table cell borders. |
|---|
| 66 |
Principle: Put no border on table and only borders on a per cell basis. |
|---|
| 67 |
--> |
|---|
| 68 |
<xsl:param name="table.frame.border.style" select="'none'"/> |
|---|
| 69 |
<xsl:template name="table.cell.properties"> |
|---|
| 70 |
<xsl:param name="bgcolor.pi" select="''"/> |
|---|
| 71 |
<xsl:param name="rowsep.inherit" select="1"/> |
|---|
| 72 |
<xsl:param name="colsep.inherit" select="1"/> |
|---|
| 73 |
<xsl:param name="col" select="1"/> |
|---|
| 74 |
<xsl:param name="valign.inherit" select="''"/> |
|---|
| 75 |
<xsl:param name="align.inherit" select="''"/> |
|---|
| 76 |
<xsl:param name="char.inherit" select="''"/> |
|---|
| 77 |
|
|---|
| 78 |
<xsl:if test="$bgcolor.pi != ''"> |
|---|
| 79 |
<xsl:attribute name="background-color"> |
|---|
| 80 |
<xsl:value-of select="$bgcolor.pi"/> |
|---|
| 81 |
</xsl:attribute> |
|---|
| 82 |
</xsl:if> |
|---|
| 83 |
|
|---|
| 84 |
<!-- |
|---|
| 85 |
This commented block is the default DocBook cell properties processing |
|---|
| 86 |
--> |
|---|
| 87 |
<!-- |
|---|
| 88 |
<xsl:if test="$rowsep.inherit > 0"> |
|---|
| 89 |
<xsl:call-template name="border"> |
|---|
| 90 |
<xsl:with-param name="side" select="'bottom'"/> |
|---|
| 91 |
</xsl:call-template> |
|---|
| 92 |
</xsl:if> |
|---|
| 93 |
|
|---|
| 94 |
<xsl:if test="$colsep.inherit > 0 and |
|---|
| 95 |
$col < ancestor::tgroup/@cols"> |
|---|
| 96 |
<xsl:call-template name="border"> |
|---|
| 97 |
<xsl:with-param name="side" select="'right'"/> |
|---|
| 98 |
</xsl:call-template> |
|---|
| 99 |
</xsl:if> |
|---|
| 100 |
--> |
|---|
| 101 |
|
|---|
| 102 |
<xsl:if test="ancestor-or-self::entry/processing-instruction('border-top')"> |
|---|
| 103 |
<xsl:call-template name="border"> |
|---|
| 104 |
<xsl:with-param name="side" select="'top'"/> |
|---|
| 105 |
</xsl:call-template> |
|---|
| 106 |
</xsl:if> |
|---|
| 107 |
|
|---|
| 108 |
<xsl:if test="ancestor-or-self::entry/processing-instruction('border-bottom')"> |
|---|
| 109 |
<xsl:call-template name="border"> |
|---|
| 110 |
<xsl:with-param name="side" select="'bottom'"/> |
|---|
| 111 |
</xsl:call-template> |
|---|
| 112 |
</xsl:if> |
|---|
| 113 |
|
|---|
| 114 |
<xsl:if test="ancestor-or-self::entry/processing-instruction('border-left')"> |
|---|
| 115 |
<xsl:call-template name="border"> |
|---|
| 116 |
<xsl:with-param name="side" select="'left'"/> |
|---|
| 117 |
</xsl:call-template> |
|---|
| 118 |
</xsl:if> |
|---|
| 119 |
|
|---|
| 120 |
<xsl:if test="ancestor-or-self::entry/processing-instruction('border-right')"> |
|---|
| 121 |
<xsl:call-template name="border"> |
|---|
| 122 |
<xsl:with-param name="side" select="'right'"/> |
|---|
| 123 |
</xsl:call-template> |
|---|
| 124 |
</xsl:if> |
|---|
| 125 |
|
|---|
| 126 |
<xsl:if test="$valign.inherit != ''"> |
|---|
| 127 |
<xsl:attribute name="display-align"> |
|---|
| 128 |
<xsl:choose> |
|---|
| 129 |
<xsl:when test="$valign.inherit='top'">before</xsl:when> |
|---|
| 130 |
<xsl:when test="$valign.inherit='middle'">center</xsl:when> |
|---|
| 131 |
<xsl:when test="$valign.inherit='bottom'">after</xsl:when> |
|---|
| 132 |
<xsl:otherwise> |
|---|
| 133 |
<xsl:message> |
|---|
| 134 |
<xsl:text>Unexpected valign value: </xsl:text> |
|---|
| 135 |
<xsl:value-of select="$valign.inherit"/> |
|---|
| 136 |
<xsl:text>, center used.</xsl:text> |
|---|
| 137 |
</xsl:message> |
|---|
| 138 |
<xsl:text>center</xsl:text> |
|---|
| 139 |
</xsl:otherwise> |
|---|
| 140 |
</xsl:choose> |
|---|
| 141 |
</xsl:attribute> |
|---|
| 142 |
</xsl:if> |
|---|
| 143 |
|
|---|
| 144 |
<xsl:if test="$align.inherit != ''"> |
|---|
| 145 |
<xsl:attribute name="text-align"> |
|---|
| 146 |
<xsl:value-of select="$align.inherit"/> |
|---|
| 147 |
</xsl:attribute> |
|---|
| 148 |
</xsl:if> |
|---|
| 149 |
|
|---|
| 150 |
<xsl:if test="$char.inherit != ''"> |
|---|
| 151 |
<xsl:attribute name="text-align"> |
|---|
| 152 |
<xsl:value-of select="$char.inherit"/> |
|---|
| 153 |
</xsl:attribute> |
|---|
| 154 |
</xsl:if> |
|---|
| 155 |
|
|---|
| 156 |
</xsl:template> |
|---|
| 157 |
|
|---|
| 158 |
|
|---|
| 159 |
</xsl:stylesheet> |
|---|