diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 19:43:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 19:44:49 (GMT) |
commit | 3afa4f741c26360245dc313bc368f508b26a6b96 (patch) | |
tree | 4fc9fedac990a099010fed8a4ee09ddc51c21cc5 /3rdParty/DocBook/XSL/fo | |
parent | 7548dabae7d10e48816142e508be651ada9f7bc3 (diff) | |
download | swift-contrib-3afa4f741c26360245dc313bc368f508b26a6b96.zip swift-contrib-3afa4f741c26360245dc313bc368f508b26a6b96.tar.bz2 |
Added DocBook infrastructure.
Imported most of "DocBook kit".
Added placeholder for Swiften developers guide.
Diffstat (limited to '3rdParty/DocBook/XSL/fo')
56 files changed, 48654 insertions, 0 deletions
diff --git a/3rdParty/DocBook/XSL/fo/admon.xsl b/3rdParty/DocBook/XSL/fo/admon.xsl new file mode 100644 index 0000000..4f69be4 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/admon.xsl @@ -0,0 +1,130 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: admon.xsl 7248 2007-08-18 06:50:21Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:template match="note|important|warning|caution|tip"> + <xsl:choose> + <xsl:when test="$admon.graphics != 0"> + <xsl:call-template name="graphical.admonition"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="nongraphical.admonition"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="admon.graphic.width"> + <xsl:param name="node" select="."/> + <xsl:text>36pt</xsl:text> +</xsl:template> + +<xsl:template name="admon.graphic"> + <xsl:param name="node" select="."/> + + <xsl:variable name="filename"> + <xsl:value-of select="$admon.graphics.path"/> + <xsl:choose> + <xsl:when test="local-name($node)='note'">note</xsl:when> + <xsl:when test="local-name($node)='warning'">warning</xsl:when> + <xsl:when test="local-name($node)='caution'">caution</xsl:when> + <xsl:when test="local-name($node)='tip'">tip</xsl:when> + <xsl:when test="local-name($node)='important'">important</xsl:when> + <xsl:otherwise>note</xsl:otherwise> + </xsl:choose> + <xsl:value-of select="$admon.graphics.extension"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0 + or $fop.extensions != 0 + or $arbortext.extensions != 0"> + <xsl:value-of select="$filename"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>url(</xsl:text> + <xsl:value-of select="$filename"/> + <xsl:text>)</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="graphical.admonition"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="graphic.width"> + <xsl:apply-templates select="." mode="admon.graphic.width"/> + </xsl:variable> + + <fo:block id="{$id}" + xsl:use-attribute-sets="graphical.admonition.properties"> + <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt" + provisional-label-separation="18pt"> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <fo:external-graphic width="auto" height="auto" + content-width="{$graphic.width}" > + <xsl:attribute name="src"> + <xsl:call-template name="admon.graphic"/> + </xsl:attribute> + </fo:external-graphic> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <xsl:if test="$admon.textlabel != 0 or title or info/title"> + <fo:block xsl:use-attribute-sets="admonition.title.properties"> + <xsl:apply-templates select="." mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> + <fo:block xsl:use-attribute-sets="admonition.properties"> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:block> +</xsl:template> + +<xsl:template name="nongraphical.admonition"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}" + xsl:use-attribute-sets="nongraphical.admonition.properties"> + <xsl:if test="$admon.textlabel != 0 or title or info/title"> + <fo:block keep-with-next.within-column='always' + xsl:use-attribute-sets="admonition.title.properties"> + <xsl:apply-templates select="." mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> + + <fo:block xsl:use-attribute-sets="admonition.properties"> + <xsl:apply-templates/> + </fo:block> + </fo:block> +</xsl:template> + +<xsl:template match="note/title"></xsl:template> +<xsl:template match="important/title"></xsl:template> +<xsl:template match="warning/title"></xsl:template> +<xsl:template match="caution/title"></xsl:template> +<xsl:template match="tip/title"></xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/annotations.xsl b/3rdParty/DocBook/XSL/fo/annotations.xsl new file mode 100644 index 0000000..ba6baa6 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/annotations.xsl @@ -0,0 +1,18 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: annotations.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:template match="annotation"/> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/autoidx-kimber.xsl b/3rdParty/DocBook/XSL/fo/autoidx-kimber.xsl new file mode 100644 index 0000000..4c6f396 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/autoidx-kimber.xsl @@ -0,0 +1,178 @@ +<?xml version="1.0"?> +<!DOCTYPE xsl:stylesheet [ + +<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> +<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> +<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> + +<!ENTITY sep '" "'> +<!-- Documents using the kimber index method must have a lang attribute --> +<!-- Only one of these should be present in the entity --> +<!ENTITY lang 'concat(/*/@lang, /*/@xml:lang)'> + +<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) + and ($role = @role or $type = @type or + (string-length($role) = 0 and string-length($type) = 0))'> +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService" + exclude-result-prefixes="k" + version="1.0"> + +<!-- ******************************************************************** + $Id: autoidx-kimber.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> +<!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen. --> +<!-- ==================================================================== --> +<!-- *** THIS MODULE ONLY WORKS WITH SAXON 6 OR SAXON 8 *** --> +<!-- ==================================================================== --> + +<xsl:include href="../common/autoidx-kimber.xsl"/> + +<!-- Java sort apparently works only on lang part, not country --> +<xsl:param name="sort.lang"> + <xsl:choose> + <xsl:when test="contains(⟨, '-')"> + <xsl:value-of select="substring-before(⟨, '-')"/> + </xsl:when> + <xsl:when test="contains(⟨, '_')"> + <xsl:value-of select="substring-before(⟨, '_')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="⟨"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:template name="generate-kimber-index"> + <xsl:param name="scope" select="NOTANODE"/> + + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:if test="not(contains($vendor, 'SAXON '))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text> + <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="not(function-available('k:getIndexGroupKey'))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text> + <xsl:text>Innodata Isogen 
Java extensions for </xsl:text> + <xsl:text>internationalized indexes. 
Install those </xsl:text> + <xsl:text>extensions, or use a different index method.
</xsl:text> + <xsl:text>For more information, see:
</xsl:text> + <xsl:text>http://www.innodata-isogen.com/knowledge_center/tools_downloads/i18nsupport</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="role"> + <xsl:if test="$index.on.role != 0"> + <xsl:value-of select="@role"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="type"> + <xsl:if test="$index.on.type != 0"> + <xsl:value-of select="@type"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="terms" + select="//indexterm[count(.|key('k-group', + k:getIndexGroupKey(⟨, &primary;)) + [&scope;][1]) = 1 + and not(@class = 'endofrange')]"/> + + <xsl:variable name="alphabetical" + select="$terms[not(starts-with( + k:getIndexGroupKey(⟨, &primary;), + '#NUMERIC' + ))]"/> + + <xsl:variable name="others" + select="$terms[starts-with( + k:getIndexGroupKey(⟨, &primary;), + '#NUMERIC' + )]"/> + + <fo:block> + <xsl:if test="$others"> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + + <fo:block> + <xsl:apply-templates select="$others" + mode="index-symbol-div"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort lang="{$sort.lang}" + select="k:getIndexGroupSortKey(⟨, + k:getIndexGroupKey(⟨, &primary;))"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> + + <xsl:apply-templates select="$alphabetical" + mode="index-div-kimber"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort lang="{$sort.lang}" + select="k:getIndexGroupSortKey(⟨, + k:getIndexGroupKey(⟨, &primary;))"/> + </xsl:apply-templates> + </fo:block> + +</xsl:template> + +<xsl:template match="indexterm" mode="index-div-kimber"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="key" + select="k:getIndexGroupKey(⟨, &primary;)"/> + + <xsl:variable name="label" + select="k:getIndexGroupLabel(⟨, $key)"/> + + <xsl:if test="key('k-group', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> + <fo:block> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:value-of select="$label"/> + </xsl:with-param> + </xsl:call-template> + <fo:block> + <xsl:apply-templates select="key('k-group', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;] + [1])=1]" + mode="index-primary"> + <xsl:sort select="&primary;" lang="{$sort.lang}"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> + </fo:block> + </fo:block> + </xsl:if> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/autoidx-kosek.xsl b/3rdParty/DocBook/XSL/fo/autoidx-kosek.xsl new file mode 100644 index 0000000..c44d07a --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/autoidx-kosek.xsl @@ -0,0 +1,149 @@ +<?xml version="1.0"?> +<!DOCTYPE xsl:stylesheet [ + +<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> +<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> +<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> + +<!ENTITY sep '" "'> +<!-- Documents using the kimber index method must have a lang attribute --> +<!-- Only one of these should be present in the entity --> + +<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) + and ($role = @role or $type = @type or + (string-length($role) = 0 and string-length($type) = 0))'> +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:rx="http://www.renderx.com/XSL/Extensions" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + xmlns:i="urn:cz-kosek:functions:index" + xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" + xmlns:func="http://exslt.org/functions" + xmlns:exslt="http://exslt.org/common" + extension-element-prefixes="func exslt" + exclude-result-prefixes="func exslt i l" + version="1.0"> + +<!-- ******************************************************************** + $Id: autoidx-kosek.xsl 8399 2009-04-08 07:37:42Z bobstayton $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> +<!-- The "kosek" method contributed by Jirka Kosek. --> + +<xsl:include href="../common/autoidx-kosek.xsl"/> + +<xsl:template name="generate-kosek-index"> + <xsl:param name="scope" select="NOTANODE"/> + + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:if test="contains($vendor, 'libxslt')"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method does not </xsl:text> + <xsl:text>work with the xsltproc XSLT processor.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="contains($vendor, 'Saxonica')"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method does not </xsl:text> + <xsl:text>work with the Saxon 8 XSLT processor.</xsl:text> + </xsl:message> + </xsl:if> + + + <xsl:if test="$exsl.node.set.available = 0"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text> + <xsl:text>exslt:node-set() function. Use a processor that </xsl:text> + <xsl:text>has it, or use a different index method.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="not(function-available('i:group-index'))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method requires the
</xsl:text> + <xsl:text>index extension functions be imported:
</xsl:text> + <xsl:text> xsl:import href="common/autoidx-kosek.xsl"</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="role"> + <xsl:if test="$index.on.role != 0"> + <xsl:value-of select="@role"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="type"> + <xsl:if test="$index.on.type != 0"> + <xsl:value-of select="@type"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="terms" + select="//indexterm[count(.|key('group-code', + i:group-index(&primary;)) + [&scope;][1]) = 1 + and not(@class = 'endofrange')]"/> + <fo:block> + <xsl:apply-templates select="$terms" mode="index-div-kosek"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="i:group-index(&primary;)" data-type="number"/> + </xsl:apply-templates> + </fo:block> +</xsl:template> + +<xsl:template match="indexterm" mode="index-div-kosek"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="key" + select="i:group-index(&primary;)"/> + + <xsl:variable name="lang"> + <xsl:call-template name="l10n.language"/> + </xsl:variable> + + <xsl:if test="key('group-code', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> + <fo:block> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:choose> + <xsl:when test="$key = 0"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="i:group-letter($key)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + <fo:block> + <xsl:apply-templates select="key('group-code', $key)[&scope;] + [count(.|key('primary', &primary;) + [&scope;][1])=1]" + mode="index-primary"> + <xsl:sort select="&primary;" lang="{$lang}"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> + </fo:block> + </fo:block> + </xsl:if> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/autoidx-ng.xsl b/3rdParty/DocBook/XSL/fo/autoidx-ng.xsl new file mode 100644 index 0000000..9407b5c --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/autoidx-ng.xsl @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<!-- ******************************************************************** + $Id: autoidx-ng.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- You should have this directly in your customization file. --> +<!-- This file is there only to retain backward compatibility. --> +<xsl:import href="autoidx-kosek.xsl"/> +<xsl:param name="index.method">kosek</xsl:param> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/autoidx.xsl b/3rdParty/DocBook/XSL/fo/autoidx.xsl new file mode 100644 index 0000000..920760f --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/autoidx.xsl @@ -0,0 +1,1330 @@ +<?xml version="1.0"?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:rx="http://www.renderx.com/XSL/Extensions" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + xmlns:exslt="http://exslt.org/common" + extension-element-prefixes="exslt" + exclude-result-prefixes="exslt" + version="1.0"> + +<!-- ******************************************************************** + $Id: autoidx.xsl 8399 2009-04-08 07:37:42Z bobstayton $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> +<!-- The "basic" method derived from Jeni Tennison's work. --> +<!-- The "kosek" method contributed by Jirka Kosek. --> +<!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen. --> + +<!-- Importing module for kimber or kosek method overrides one of these --> +<xsl:param name="kimber.imported" select="0"/> +<xsl:param name="kosek.imported" select="0"/> + +<!-- These keys used primary in all methods --> +<xsl:key name="letter" + match="indexterm" + use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + +<xsl:key name="primary" + match="indexterm" + use="&primary;"/> + +<xsl:key name="secondary" + match="indexterm" + use="concat(&primary;, &sep;, &secondary;)"/> + +<xsl:key name="tertiary" + match="indexterm" + use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> + +<xsl:key name="endofrange" + match="indexterm[@class='endofrange']" + use="@startref"/> + +<xsl:key name="see-also" + match="indexterm[seealso]" + use="concat(&primary;, &sep;, + &secondary;, &sep;, + &tertiary;, &sep;, seealso)"/> + +<xsl:key name="see" + match="indexterm[see]" + use="concat(&primary;, &sep;, + &secondary;, &sep;, + &tertiary;, &sep;, see)"/> + + +<xsl:template name="generate-index"> + <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> + + <xsl:choose> + <xsl:when test="$index.method = 'kosek'"> + <xsl:call-template name="generate-kosek-index"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$index.method = 'kimber'"> + <xsl:call-template name="generate-kimber-index"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:call-template name="generate-basic-index"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="generate-basic-index"> + <xsl:param name="scope" select="NOTANODE"/> + + <xsl:variable name="role"> + <xsl:if test="$index.on.role != 0"> + <xsl:value-of select="@role"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="type"> + <xsl:if test="$index.on.type != 0"> + <xsl:value-of select="@type"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="terms" + select="//indexterm + [count(.|key('letter', + translate(substring(&primary;, 1, 1), + &lowercase;, + &uppercase;)) + [&scope;][1]) = 1 + and not(@class = 'endofrange')]"/> + + <xsl:variable name="alphabetical" + select="$terms[contains(concat(&lowercase;, &uppercase;), + substring(&primary;, 1, 1))]"/> + + <xsl:variable name="others" select="$terms[not(contains( + concat(&lowercase;, + &uppercase;), + substring(&primary;, 1, 1)))]"/> + <fo:block> + <xsl:if test="$others"> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + + <fo:block> + <xsl:apply-templates select="$others[count(.|key('primary', + &primary;)[&scope;][1]) = 1]" + mode="index-symbol-div"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, + &uppercase;)"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> + + <xsl:apply-templates select="$alphabetical[count(.|key('letter', + translate(substring(&primary;, 1, 1), + &lowercase;,&uppercase;)) + [&scope;][1]) = 1]" + mode="index-div-basic"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </fo:block> +</xsl:template> + +<!-- This template not used if fo/autoidx-kosek.xsl is imported --> +<xsl:template name="generate-kosek-index"> + <xsl:param name="scope" select="NOTANODE"/> + + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:if test="contains($vendor, 'libxslt')"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method does not </xsl:text> + <xsl:text>work with the xsltproc XSLT processor.</xsl:text> + </xsl:message> + </xsl:if> + + + <xsl:if test="$exsl.node.set.available = 0"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text> + <xsl:text>exslt:node-set() function. Use a processor that </xsl:text> + <xsl:text>has it, or use a different index method.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="$kosek.imported = 0"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kosek' index method requires the
</xsl:text> + <xsl:text>kosek index extensions be imported:
</xsl:text> + <xsl:text> xsl:import href="fo/autoidx-kosek.xsl"</xsl:text> + </xsl:message> + </xsl:if> + +</xsl:template> + + +<!-- This template not used if fo/autoidx-kimber.xsl is imported --> +<xsl:template name="generate-kimber-index"> + <xsl:param name="scope" select="NOTANODE"/> + + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:if test="not(contains($vendor, 'SAXON '))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text> + <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="$kimber.imported = 0"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: the 'kimber' index method requires the
</xsl:text> + <xsl:text>kimber index extensions be imported:
</xsl:text> + <xsl:text> xsl:import href="fo/autoidx-kimber.xsl"</xsl:text> + </xsl:message> + </xsl:if> + +</xsl:template> + +<xsl:template match="indexterm" mode="index-div-basic"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="key" + select="translate(substring(&primary;, 1, 1), + &lowercase;,&uppercase;)"/> + + <xsl:if test="key('letter', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> + <fo:block> + <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:block xsl:use-attribute-sets="index.entry.properties"> + <xsl:apply-templates select="key('letter', $key)[&scope;] + [count(.|key('primary', &primary;) + [&scope;][1])=1]" + mode="index-primary"> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> + </fo:block> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-symbol-div"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="key" + select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <fo:block xsl:use-attribute-sets="index.entry.properties"> + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </fo:block> +</xsl:template> + +<xsl:template match="indexterm" mode="index-primary"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="key" select="&primary;"/> + <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> + + <xsl:variable name="term.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.term.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="range.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.range.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="number.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.number.separator'"/> + </xsl:call-template> + </xsl:variable> + + <fo:block> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute> + </xsl:if> + + <xsl:for-each select="$refs/primary"> + <xsl:if test="@id or @xml:id"> + <fo:inline id="{(@id|@xml:id)[1]}"/> + </xsl:if> + </xsl:for-each> + + <xsl:value-of select="primary"/> + + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <xsl:if test="$refs[not(see) and not(secondary)]"> + <xsl:copy-of select="$term.separator"/> + <xsl:variable name="primary" select="&primary;"/> + <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/> + <rx:page-index list-separator="{$number.separator}" + range-separator="{$range.separator}"> + <xsl:if test="$refs[@significance='preferred'][not(see) and not(secondary)]"> + <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties" + ref-key="{$primary.significant}"/> + </xsl:if> + <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(secondary)]"> + <rx:index-item xsl:use-attribute-sets="xep.index.item.properties" + ref-key="{$primary}"/> + </xsl:if> + </rx:page-index> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="page-number-citations"> + <xsl:for-each select="$refs[not(see) + and not(secondary)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:with-param name="position" select="position()"/> + </xsl:apply-templates> + </xsl:for-each> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != '0'"> + <fotex:sort xmlns:fotex="http://www.tug.org/fotex"> + <xsl:copy-of select="$page-number-citations"/> + </fotex:sort> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$page-number-citations"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="$refs[not(secondary)]/*[self::see]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> + + </fo:block> + + <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]"> + <fo:block start-indent="1pc"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" + mode="index-secondary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-secondary"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> + <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> + + <xsl:variable name="term.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.term.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="range.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.range.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="number.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.number.separator'"/> + </xsl:call-template> + </xsl:variable> + + <fo:block> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute> + </xsl:if> + + <xsl:for-each select="$refs/secondary"> + <xsl:if test="@id or @xml:id"> + <fo:inline id="{(@id|@xml:id)[1]}"/> + </xsl:if> + </xsl:for-each> + + <xsl:value-of select="secondary"/> + + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <xsl:if test="$refs[not(see) and not(tertiary)]"> + <xsl:copy-of select="$term.separator"/> + <xsl:variable name="primary" select="&primary;"/> + <xsl:variable name="secondary" select="&secondary;"/> + <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/> + <rx:page-index list-separator="{$number.separator}" + range-separator="{$range.separator}"> + <xsl:if test="$refs[@significance='preferred'][not(see) and not(tertiary)]"> + <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties"> + <xsl:attribute name="ref-key"> + <xsl:value-of select="$primary.significant"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$secondary"/> + </xsl:attribute> + </rx:index-item> + </xsl:if> + <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(tertiary)]"> + <rx:index-item xsl:use-attribute-sets="xep.index.item.properties"> + <xsl:attribute name="ref-key"> + <xsl:value-of select="$primary"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$secondary"/> + </xsl:attribute> + </rx:index-item> + </xsl:if> + </rx:page-index> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="page-number-citations"> + <xsl:for-each select="$refs[not(see) + and not(tertiary)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:with-param name="position" select="position()"/> + </xsl:apply-templates> + </xsl:for-each> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != '0'"> + <fotex:sort xmlns:fotex="http://www.tug.org/fotex"> + <xsl:copy-of select="$page-number-citations"/> + </fotex:sort> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$page-number-citations"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="$refs[not(tertiary)]/*[self::see]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> + + </fo:block> + + <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]"> + <fo:block start-indent="2pc"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" + mode="index-tertiary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-tertiary"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> + <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> + + <xsl:variable name="term.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.term.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="range.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.range.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="number.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.number.separator'"/> + </xsl:call-template> + </xsl:variable> + + <fo:block> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute> + </xsl:if> + + <xsl:for-each select="$refs/tertiary"> + <xsl:if test="@id or @xml:id"> + <fo:inline id="{(@id|@xml:id)[1]}"/> + </xsl:if> + </xsl:for-each> + + <xsl:value-of select="tertiary"/> + + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <xsl:if test="$refs[not(see)]"> + <xsl:copy-of select="$term.separator"/> + <xsl:variable name="primary" select="&primary;"/> + <xsl:variable name="secondary" select="&secondary;"/> + <xsl:variable name="tertiary" select="&tertiary;"/> + <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/> + <rx:page-index list-separator="{$number.separator}" + range-separator="{$range.separator}"> + <xsl:if test="$refs[@significance='preferred'][not(see)]"> + <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties"> + <xsl:attribute name="ref-key"> + <xsl:value-of select="$primary.significant"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$secondary"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$tertiary"/> + </xsl:attribute> + </rx:index-item> + </xsl:if> + <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see)]"> + <rx:index-item xsl:use-attribute-sets="xep.index.item.properties"> + <xsl:attribute name="ref-key"> + <xsl:value-of select="$primary"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$secondary"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$tertiary"/> + </xsl:attribute> + </rx:index-item> + </xsl:if> + </rx:page-index> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="page-number-citations"> + <xsl:for-each select="$refs[not(see)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:with-param name="position" select="position()"/> + </xsl:apply-templates> + </xsl:for-each> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != '0'"> + <fotex:sort xmlns:fotex="http://www.tug.org/fotex"> + <xsl:copy-of select="$page-number-citations"/> + </fotex:sort> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$page-number-citations"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="$refs/see"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> + + </fo:block> + + <xsl:if test="$refs/seealso"> + <fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="reference"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:param name="position" select="0"/> + <xsl:param name="separator" select="''"/> + + <xsl:variable name="term.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.term.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="range.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.range.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="number.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.number.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$separator != ''"> + <xsl:value-of select="$separator"/> + </xsl:when> + <xsl:when test="$position = 1"> + <xsl:value-of select="$term.separator"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$number.separator"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="@zone and string(@zone)"> + <xsl:call-template name="reference"> + <xsl:with-param name="zones" select="normalize-space(@zone)"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="ancestor::*[contains(local-name(),'info') and not(starts-with(local-name(),'info'))]"> + <xsl:call-template name="info.reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + + <xsl:if test="key('endofrange', $id)[&scope;]"> + <xsl:apply-templates select="key('endofrange', $id)[&scope;][last()]" + mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:with-param name="separator" select="$range.separator"/> + </xsl:apply-templates> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="reference"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:param name="zones"/> + + <xsl:variable name="number.separator"> + <xsl:call-template name="index.separator"> + <xsl:with-param name="key" select="'index.number.separator'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="contains($zones, ' ')"> + <xsl:variable name="zone" select="substring-before($zones, ' ')"/> + <xsl:variable name="target" select="key('id', $zone)"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + + <xsl:if test="$passivetex.extensions = '0'"> + <xsl:copy-of select="$number.separator"/> + </xsl:if> + <xsl:call-template name="reference"> + <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="zone" select="$zones"/> + <xsl:variable name="target" select="key('id', $zone)"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="info.reference"> + <!-- This is not perfect. It doesn't treat indexterm inside info element as a range covering whole parent of info. + It also not work when there is no ID generated for parent element. But it works in the most common cases. --> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:variable name="target" select="(ancestor::appendix|ancestor::article|ancestor::bibliography|ancestor::book| + ancestor::chapter|ancestor::glossary|ancestor::part|ancestor::preface| + ancestor::refentry|ancestor::reference|ancestor::refsect1|ancestor::refsect2| + ancestor::refsect3|ancestor::refsection|ancestor::refsynopsisdiv| + ancestor::sect1|ancestor::sect2|ancestor::sect3|ancestor::sect4|ancestor::sect5| + ancestor::section|ancestor::setindex|ancestor::set|ancestor::sidebar|ancestor::mediaobject)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[position() = last()]"/> + </xsl:call-template> + </xsl:variable> + + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> +</xsl:template> + +<xsl:template match="indexterm" mode="index-see"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <fo:inline> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="see"/> + <xsl:text>)</xsl:text> + </fo:inline> +</xsl:template> + +<xsl:template match="indexterm" mode="index-seealso"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:for-each select="seealso"> + <xsl:sort select="translate(., &lowercase;, &uppercase;)"/> + <fo:block> + <xsl:text>(</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'seealso'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="."/> + <xsl:text>)</xsl:text> + </fo:block> + </xsl:for-each> + +</xsl:template> + +<!-- ====================================================================== --> + +<xsl:template name="generate-index-markup"> + <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> + <xsl:param name="role" select="@role"/> + <xsl:param name="type" select="@type"/> + + <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter', + translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/> + <xsl:variable name="alphabetical" + select="$terms[contains(concat(&lowercase;, &uppercase;), + substring(&primary;, 1, 1))]"/> + <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, + &uppercase;), + substring(&primary;, 1, 1)))]"/> + + <xsl:text><index> </xsl:text> + <xsl:if test="$others"> + <xsl:text> <indexdiv> </xsl:text> + <xsl:text><title></xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + <xsl:text></title> </xsl:text> + <xsl:apply-templates select="$others[count(.|key('primary', + &primary;)[&scope;][1]) = 1]" + mode="index-symbol-div-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></indexdiv> </xsl:text> + </xsl:if> + + <xsl:apply-templates select="$alphabetical[count(.|key('letter', + translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]" + mode="index-div-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></index> </xsl:text> +</xsl:template> + +<xsl:template match="*" mode="index-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:text><</xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text>> </xsl:text> + <xsl:apply-templates mode="index-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="indexterm" mode="index-div-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + <xsl:text> <indexdiv> </xsl:text> + <xsl:text><title></xsl:text> + <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> + <xsl:text></title> </xsl:text> + + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></indexdiv> </xsl:text> +</xsl:template> + +<xsl:template match="indexterm" mode="index-symbol-div-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="indexterm" mode="index-primary-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:variable name="key" select="&primary;"/> + <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text> <indexentry> </xsl:text> + <xsl:text><primaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(primary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></primaryie> </xsl:text> + + <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" + mode="index-secondary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> + <xsl:text></indexentry> </xsl:text> +</xsl:template> + +<xsl:template match="indexterm" mode="index-secondary-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> + <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text><secondaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(secondary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></secondaryie> </xsl:text> + + <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" + mode="index-tertiary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-tertiary-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> + <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text><tertiaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(tertiary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></tertiaryie> </xsl:text> + + <xsl:variable name="see" select="$refs/see | $refs/seealso"/> + <xsl:if test="$see"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="reference-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + + <xsl:choose> + <xsl:when test="@zone and string(@zone)"> + <xsl:call-template name="reference-markup"> + <xsl:with-param name="zones" select="normalize-space(@zone)"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + + <xsl:choose> + <xsl:when test="@startref and @class='endofrange'"> + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="@startref"/> + <xsl:text>"></xsl:text> + <fo:basic-link internal-destination="{@startref}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{@startref}"/> + <xsl:text>-</xsl:text> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:text></link></xsl:text> + <xsl:text></phrase> </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:if test="$id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="reference-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <xsl:param name="zones"/> + <xsl:choose> + <xsl:when test="contains($zones, ' ')"> + <xsl:variable name="zone" select="substring-before($zones, ' ')"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <xsl:text><phrase fole="pageno"></xsl:text> + <xsl:if test="$target[1]/@id or $target[1]/@xml:id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$target[1]/@id or $target[1]/@xml:id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + + <xsl:call-template name="reference"> + <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="role" select="$role"/> + <xsl:with-param name="type" select="$type"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="zone" select="$zones"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:if test="$target[1]/@id or target[1]/@xml:id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="index.page.number.properties"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$target[1]/@id or target[1]/@xml:id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="indexterm" mode="index-see-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <fo:block> + <xsl:text><seeie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(see)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:text></seeie> </xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="indexterm" mode="index-seealso-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="role" select="''"/> + <xsl:param name="type" select="''"/> + <fo:block> + <xsl:text><seealsoie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(seealso)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:text></seealsoie> </xsl:text> + </fo:block> +</xsl:template> + +<xsl:template name="escape-text"> + <xsl:param name="text" select="''"/> + + <xsl:variable name="ltpos" select="substring-before($text, '<')"/> + <xsl:variable name="amppos" select="substring-before($text, '&')"/> + + <xsl:choose> + <xsl:when test="contains($text,'<') and contains($text, '&') + and string-length($ltpos) < string-length($amppos)"> + <xsl:value-of select="$ltpos"/> + <xsl:text>&lt;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '<')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text,'<') and contains($text, '&') + and string-length($amppos) < string-length($ltpos)"> + <xsl:value-of select="$amppos"/> + <xsl:text>&amp;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '&')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text, '<')"> + <xsl:value-of select="$ltpos"/> + <xsl:text>&lt;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '<')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text, '&')"> + <xsl:value-of select="$amppos"/> + <xsl:text>&amp;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '&')"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:value-of select="$text"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="index.separator"> + <xsl:param name="key" select="''"/> + <xsl:param name="lang"> + <xsl:call-template name="l10n.language"/> + </xsl:param> + + <xsl:choose> + <xsl:when test="$key = 'index.term.separator'"> + <xsl:choose> + <!-- Use the override if not blank --> + <xsl:when test="$index.term.separator != ''"> + <xsl:copy-of select="$index.term.separator"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="context">index</xsl:with-param> + <xsl:with-param name="name">term-separator</xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="$key = 'index.number.separator'"> + <xsl:choose> + <!-- Use the override if not blank --> + <xsl:when test="$index.number.separator != ''"> + <xsl:copy-of select="$index.number.separator"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="context">index</xsl:with-param> + <xsl:with-param name="name">number-separator</xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="$key = 'index.range.separator'"> + <xsl:choose> + <!-- Use the override if not blank --> + <xsl:when test="$index.range.separator != ''"> + <xsl:copy-of select="$index.range.separator"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="context">index</xsl:with-param> + <xsl:with-param name="name">range-separator</xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/autotoc.xsl b/3rdParty/DocBook/XSL/fo/autotoc.xsl new file mode 100644 index 0000000..c1079b8 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/autotoc.xsl @@ -0,0 +1,915 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: autotoc.xsl 8286 2009-03-06 22:53:04Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template name="set.toc"> + + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" select="book|set|setindex"/> + + <xsl:if test="$nodes"> + <fo:block id="toc...{$id}" + xsl:use-attribute-sets="toc.margin.properties"> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level">1</xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </xsl:attribute> + </xsl:if> + <xsl:call-template name="table.of.contents.titlepage"/> + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="division.toc"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" + select="$toc-context/part + |$toc-context/reference + |$toc-context/preface + |$toc-context/chapter + |$toc-context/appendix + |$toc-context/article + |$toc-context/bibliography + |$toc-context/glossary + |$toc-context/index"/> + + <xsl:if test="$nodes"> + <fo:block id="toc...{$cid}" + xsl:use-attribute-sets="toc.margin.properties"> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level">1</xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </xsl:attribute> + </xsl:if> + <xsl:if test="$toc.title.p"> + <xsl:call-template name="table.of.contents.titlepage"/> + </xsl:if> + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="component.toc"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" select="section|sect1|refentry + |article|bibliography|glossary + |qandaset[$qanda.in.toc != 0] + |appendix|index"/> + <xsl:if test="$nodes"> + <fo:block id="toc...{$id}" + xsl:use-attribute-sets="toc.margin.properties"> + <xsl:if test="$toc.title.p"> + <xsl:call-template name="table.of.contents.titlepage"/> + </xsl:if> + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="component.toc.separator"> + <!-- Customize to output something between + component.toc and first output --> +</xsl:template> + +<xsl:template name="section.toc"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" + select="section|sect1|sect2|sect3|sect4|sect5|refentry + |qandaset[$qanda.in.toc != 0] + |bridgehead[$bridgehead.in.toc != 0]"/> + + <xsl:variable name="level"> + <xsl:call-template name="section.level"/> + </xsl:variable> + + <xsl:if test="$nodes"> + <fo:block id="toc...{$id}" + xsl:use-attribute-sets="toc.margin.properties"> + + <xsl:if test="$toc.title.p"> + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level + 1"/> + <xsl:with-param name="title"> + <fo:block space-after="0.5em"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </fo:block> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="section.toc.separator"> + <!-- Customize to output something between + section.toc and first output --> +</xsl:template> +<!-- ==================================================================== --> + +<xsl:template name="toc.line"> + <xsl:param name="toc-context" select="NOTANODE"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label"> + <xsl:apply-templates select="." mode="label.markup"/> + </xsl:variable> + + <fo:block xsl:use-attribute-sets="toc.line.properties"> + <fo:inline keep-with-next.within-line="always"> + <fo:basic-link internal-destination="{$id}"> + <xsl:if test="$label != ''"> + <xsl:copy-of select="$label"/> + <xsl:value-of select="$autotoc.label.separator"/> + </xsl:if> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </fo:basic-link> + </fo:inline> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="dots" + leader-pattern-width="3pt" + leader-alignment="reference-area" + keep-with-next.within-line="always"/> + <xsl:text> </xsl:text> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + </fo:inline> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> +<xsl:template name="qandaset.toc"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" select="qandadiv|qandaentry"/> + + <xsl:if test="$nodes"> + <fo:block id="toc...{$id}" + xsl:use-attribute-sets="toc.margin.properties"> + <xsl:if test="$toc.title.p"> + <xsl:call-template name="table.of.contents.titlepage"/> + </xsl:if> + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="qandaset.toc.separator"> + <!-- Customize to output something between + qandaset.toc and first output --> +</xsl:template> + +<xsl:template match="qandadiv" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="nodes" select="qandadiv|qandaentry"/> + + <xsl:if test="$nodes"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="qandaentry" mode="toc"> + <xsl:apply-templates select="question" mode="toc"/> +</xsl:template> + +<xsl:template match="question" mode="toc"> + <xsl:variable name="firstchunk"> + <!-- Use a titleabbrev or title if available --> + <xsl:choose> + <xsl:when test="../blockinfo/titleabbrev"> + <xsl:apply-templates select="../blockinfo/titleabbrev[1]/node()"/> + </xsl:when> + <xsl:when test="../blockinfo/title"> + <xsl:apply-templates select="../blockinfo/title[1]/node()"/> + </xsl:when> + <xsl:when test="../info/titleabbrev"> + <xsl:apply-templates select="../info/titleabbrev[1]/node()"/> + </xsl:when> + <xsl:when test="../titleabbrev"> + <xsl:apply-templates select="../titleabbrev[1]/node()"/> + </xsl:when> + <xsl:when test="../info/title"> + <xsl:apply-templates select="../info/title[1]/node()"/> + </xsl:when> + <xsl:when test="../title"> + <xsl:apply-templates select="../title[1]/node()"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="(*[local-name(.)!='label'])[1]/node()"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="deflabel"> + <xsl:choose> + <xsl:when test="ancestor-or-self::*[@defaultlabel]"> + <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()] + /@defaultlabel"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$qanda.defaultlabel"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label"> + <xsl:apply-templates select="." mode="label.markup"/> + </xsl:variable> + + <fo:block xsl:use-attribute-sets="toc.line.properties" + end-indent="{$toc.indent.width}pt" + last-line-end-indent="-{$toc.indent.width}pt"> + <xsl:attribute name="margin-{$direction.align.start}">3em</xsl:attribute> + <xsl:attribute name="text-indent">-3em</xsl:attribute> + <fo:inline keep-with-next.within-line="always"> + <fo:basic-link internal-destination="{$id}"> + <xsl:if test="$label != ''"> + <xsl:copy-of select="$label"/> + <xsl:if test="$deflabel = 'number' and not(label)"> + <xsl:value-of select="$autotoc.label.separator"/> + </xsl:if> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:copy-of select="$firstchunk"/> + </fo:basic-link> + </fo:inline> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="dots" + leader-pattern-width="3pt" + leader-alignment="reference-area" + keep-with-next.within-line="always"/> + <xsl:text> </xsl:text> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + </fo:inline> + </fo:block> + +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="book|setindex" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="nodes" select="glossary|bibliography|preface|chapter + |reference|part|article|appendix|index"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 0 + and $toc.max.depth > $depth.from.context + and $nodes"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="set" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="nodes" select="set|book|setindex"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 0 + and $toc.max.depth > $depth.from.context + and $nodes"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="part" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="nodes" select="chapter|appendix|preface|reference| + refentry|article|index|glossary| + bibliography"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 0 + and $toc.max.depth > $depth.from.context + and $nodes"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="reference" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:if test="$toc.section.depth > 0 + and $toc.max.depth > $depth.from.context + and refentry"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="refentry" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="refentry" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="preface|chapter|appendix|article" + mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="nodes" select="section|sect1 + |qandaset[$qanda.in.toc != 0] + |simplesect[$simplesect.in.toc != 0] + |refentry|appendix"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 0 + and $toc.max.depth > $depth.from.context + and $nodes"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="sect1" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 1 + and $toc.max.depth > $depth.from.context + and sect2"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"/> + </xsl:attribute> + + <xsl:apply-templates select="sect2|qandaset[$qanda.in.toc != 0]" + mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="sect2" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 2 + and $toc.max.depth > $depth.from.context + and sect3"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"> + <xsl:with-param name="reldepth" select="$reldepth"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="sect3|qandaset[$qanda.in.toc != 0]" + mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="sect3" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 3 + and $toc.max.depth > $depth.from.context + and sect4"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"> + <xsl:with-param name="reldepth" select="$reldepth"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="sect4|qandaset[$qanda.in.toc != 0]" + mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="sect4" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth > 4 + and $toc.max.depth > $depth.from.context + and sect5"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"> + <xsl:with-param name="reldepth" select="$reldepth"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="sect5|qandaset[$qanda.in.toc != 0]" + mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="sect5|simplesect" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> +</xsl:template> + +<xsl:template name="set.toc.indent"> + <xsl:param name="reldepth"/> + + <xsl:variable name="depth"> + <xsl:choose> + <xsl:when test="$reldepth != ''"> + <xsl:value-of select="$reldepth"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="count(ancestor::*)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$fop.extensions != 0 or $passivetex.extensions != 0"> + <xsl:value-of select="concat($depth*$toc.indent.width, 'pt')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat($toc.indent.width, 'pt')"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<xsl:template match="section" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="depth" select="count(ancestor::section) + 1"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth >= $depth"> + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:if test="$toc.section.depth > $depth + and $toc.max.depth > $depth.from.context + and section"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"> + <xsl:with-param name="reldepth" select="$reldepth"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="section|qandaset[$qanda.in.toc != 0]" + mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> + </xsl:if> +</xsl:template> + +<xsl:template match="bibliography|glossary" + mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="index" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:if test="* or $generate.index != 0"> + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template match="title" mode="toc"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="list.of.titles"> + <xsl:param name="titles" select="'table'"/> + <xsl:param name="nodes" select=".//table"/> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:if test="$nodes"> + <fo:block id="lot...{$titles}...{$id}"> + <xsl:choose> + <xsl:when test="$titles='table'"> + <xsl:call-template name="list.of.tables.titlepage"/> + </xsl:when> + <xsl:when test="$titles='figure'"> + <xsl:call-template name="list.of.figures.titlepage"/> + </xsl:when> + <xsl:when test="$titles='equation'"> + <xsl:call-template name="list.of.equations.titlepage"/> + </xsl:when> + <xsl:when test="$titles='example'"> + <xsl:call-template name="list.of.examples.titlepage"/> + </xsl:when> + <xsl:when test="$titles='procedure'"> + <xsl:call-template name="list.of.procedures.titlepage"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="list.of.unknowns.titlepage"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="figure|table|example|equation|procedure" mode="toc"> + <xsl:param name="toc-context" select="."/> + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- qandaset handled like a section when qanda.in.toc is set --> +<xsl:template match="qandaset" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="depth" select="count(ancestor::section) + 1"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + + <xsl:if test="$toc.section.depth >= $depth"> + <xsl:call-template name="toc.line"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:call-template> + + <xsl:if test="$toc.section.depth > $depth + and $toc.max.depth > $depth.from.context + and (child::qandadiv or child::qandaentry)"> + <fo:block id="toc.{$cid}.{$id}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:call-template name="set.toc.indent"> + <xsl:with-param name="reldepth" select="$reldepth"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="qandadiv|qandaentry" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> + </xsl:if> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/axf.xsl b/3rdParty/DocBook/XSL/fo/axf.xsl new file mode 100644 index 0000000..e63c3a6 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/axf.xsl @@ -0,0 +1,110 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: axf.xsl 6483 2007-01-08 18:00:22Z bobstayton $ + ******************************************************************** --> + +<xsl:template name="axf-document-information"> + + <xsl:variable name="authors" select="(//author|//editor| + //corpauthor|//authorgroup)[1]"/> + <xsl:if test="$authors"> + <xsl:variable name="author"> + <xsl:choose> + <xsl:when test="$authors[self::authorgroup]"> + <xsl:call-template name="person.name.list"> + <xsl:with-param name="person.list" + select="$authors/*[self::author|self::corpauthor| + self::othercredit|self::editor]"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$authors[self::corpauthor]"> + <xsl:value-of select="$authors"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"> + <xsl:with-param name="node" select="$authors"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:element name="axf:document-info"> + <xsl:attribute name="name">author</xsl:attribute> + <xsl:attribute name="value"> + <xsl:value-of select="normalize-space($author)"/> + </xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:variable name="title"> + <xsl:apply-templates select="/*[1]" mode="label.markup"/> + <xsl:apply-templates select="/*[1]" mode="title.markup"/> + </xsl:variable> + + <!-- * see bug report #1465301 - mzjn --> + <axf:document-info name="title"> + <xsl:attribute name="value"> + <xsl:value-of select="normalize-space($title)"/> + </xsl:attribute> + </axf:document-info> + + <xsl:if test="//keyword"> + <xsl:element name="axf:document-info"> + <xsl:attribute name="name">keywords</xsl:attribute> + <xsl:attribute name="value"> + <xsl:for-each select="//keyword"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:if test="//subjectterm"> + <xsl:element name="axf:document-info"> + <xsl:attribute name="name">subject</xsl:attribute> + <xsl:attribute name="value"> + <xsl:for-each select="//subjectterm"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </xsl:element> + </xsl:if> + +</xsl:template> + +<!-- These properties are added to fo:simple-page-master --> +<xsl:template name="axf-page-master-properties"> + <xsl:param name="page.master" select="''"/> + + <xsl:if test="$crop.marks != 0"> + <xsl:attribute name="axf:printer-marks">crop</xsl:attribute> + <xsl:attribute name="axf:bleed"><xsl:value-of + select="$crop.mark.bleed"/></xsl:attribute> + <xsl:attribute name="axf:printer-marks-line-width"><xsl:value-of + select="$crop.mark.width"/></xsl:attribute> + <xsl:attribute name="axf:crop-offset"><xsl:value-of + select="$crop.mark.offset"/></xsl:attribute> + </xsl:if> + + <xsl:call-template name="user-axf-page-master-properties"> + <xsl:with-param name="page.master" select="$page.master"/> + </xsl:call-template> + +</xsl:template> + +<xsl:template name="user-axf-page-master-properties"> + <xsl:param name="page.master" select="''"/> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/biblio-iso690.xsl b/3rdParty/DocBook/XSL/fo/biblio-iso690.xsl new file mode 100644 index 0000000..1bc3858 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/biblio-iso690.xsl @@ -0,0 +1,1300 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: biblio.xsl 6402 2006-11-12 08:23:21Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + The original code for processing bibliography in ISO690 style + was provided by Jana Dvorakova <jana4u@seznam.cz> + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<!-- if biblioentry.alt.primary.seps is set to nonzero value then use alternative separators for primary responsibility - $alt.person.two.sep, $alt.person.last.sep, $alt.person.more.sep --> +<xsl:param name="biblioentry.alt.primary.seps" select="0"/> + +<!-- how many authors will be printed if there is more than three authors - set to number 1 (default value), 2 or 3 --> +<xsl:param name="biblioentry.primary.count" select="1"/> + +<!-- ==================================================================== --> + +<xsl:template name="iso690.makecitation"> +<!-- Types of resources --> + <xsl:choose> + + <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ENTIRE MESSAGE SYSTEM --> + <!-- same as Monographs --> + <xsl:when test="./@role='messagesystem'"> + <xsl:call-template name="iso690.monogr"/> + </xsl:when> + + <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ELECTRONIC MESSAGES --> + <!-- same as Contributions to Monographs --> + <xsl:when test="./@role='message'"> + <xsl:call-template name="iso690.paper.mon"/> + </xsl:when> + + <!-- SERIALS --> + <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn"> + <xsl:call-template name="iso690.serial"/> + </xsl:when> + + <!-- PARTS OF MONOGRAPHS --> + <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])"> + <xsl:call-template name="iso690.monogr.part"/> + </xsl:when> + + <!-- CONTRIBUTIONS TO MONOGRAPHS --> + <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')"> + <xsl:call-template name="iso690.paper.mon"/> + </xsl:when> + + <!-- ARTICLES, ETC., IN SERIALS --> + <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')"> + <xsl:call-template name="iso690.article"/> + </xsl:when> + + <!-- PATENT DOCUMENTS --> + <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])"> + <xsl:call-template name="iso690.patent"/> + </xsl:when> + + <!-- MONOGRAPHS --> + <xsl:otherwise> + <xsl:call-template name="iso690.monogr"/> + </xsl:otherwise> + + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- MONOGRAPHS --> +<xsl:template name="iso690.monogr"> + <!-- Primary responsibility --> + <xsl:call-template name="iso690.primary"/> + <!-- Title and Type of medium --> + <xsl:call-template name="iso690.title"/> + <!-- Subordinate responsibility --> + <xsl:call-template name="iso690.secondary"/> + <!-- Edition --> + <xsl:call-template name="iso690.edition"/> + <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation --> + <xsl:call-template name="iso690.pub"/> + <!-- Extent --> + <xsl:call-template name="iso690.extent"/> + <!-- Series --> + <xsl:call-template name="iso690.serie"/> + <!-- Notes --> + <xsl:call-template name="iso690.notice"/> + <!-- Avaibility and access --> + <xsl:call-template name="iso690.access"/> + <!-- Standard number --> + <xsl:call-template name="iso690.isbn"/> +</xsl:template> + +<!-- SERIALS --> +<xsl:template name="iso690.serial"> + <!-- Title and Type of medium --> + <xsl:call-template name="iso690.title"/> + <!-- Responsibility [nonEL] --> + <xsl:if test="not(./bibliomisc[@role='medium'])"> + <xsl:call-template name="iso690.secondary"/> + </xsl:if> + <!-- Edition --> + <xsl:call-template name="iso690.edition"> + <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/> + </xsl:call-template> + <!-- Issue designation (date and/or n°) [nonEL] --> + <xsl:if test="not(./bibliomisc[@role='medium'])"> + <xsl:call-template name="iso690.issuing"/> + </xsl:if> + <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation --> + <xsl:call-template name="iso690.pub"/> + <!-- Series --> + <xsl:call-template name="iso690.serie"/> + <!-- Notes --> + <xsl:call-template name="iso690.notice"/> + <!-- Avaibility and access --> + <xsl:call-template name="iso690.access"/> + <!-- Standard number --> + <xsl:call-template name="iso690.issn"/> +</xsl:template> + +<!-- PARTS OF MONOGRAPHS --> +<xsl:template name="iso690.monogr.part"> + <!-- Primary responsibility of host document --> + <xsl:call-template name="iso690.primary"/> + <!-- Title and Type of medium of host document --> + <xsl:call-template name="iso690.title"/> + <!-- Subordinate responsibility of host document [EL] --> + <xsl:if test="./bibliomisc[@role='medium']"> + <xsl:call-template name="iso690.secondary"/> + </xsl:if> + <!-- Edition --> + <xsl:call-template name="iso690.edition"> + <xsl:with-param name="after" select="./volumenum"/> + </xsl:call-template> + <!-- Numeration of the part [nonEL]--> + <xsl:if test="not(./bibliomisc[@role='medium'])"> + <xsl:call-template name="iso690.partnr"/> + <!-- Subordinate responsibility [nonEL] --> + <xsl:call-template name="iso690.secondary"/> + </xsl:if> + <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation --> + <xsl:call-template name="iso690.pub"/> + <!-- Location within host --> + <xsl:call-template name="iso690.part.location"/> + <xsl:if test="./bibliomisc[@role='medium']"> + <!-- Numeration within host document [EL] --> + <!-- Notes [EL] --> + <xsl:call-template name="iso690.notice"/> + <!-- Avaibility and access [EL] --> + <xsl:call-template name="iso690.access"/> + <!-- Standard number [EL] --> + <xsl:call-template name="iso690.isbn"/> + </xsl:if> +</xsl:template> + +<!-- CONTRIBUTIONS TO MONOGRAPHS --> +<xsl:template name="iso690.paper.mon"> +<!-- Contribution --> + <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/> +<!-- In --> + <xsl:text>In </xsl:text> +<!-- Host --> + <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/> +</xsl:template> + +<xsl:template match="biblioset" mode="iso690.paper.part"> +<!-- Contribution --> + <!-- Primary responsibility --> + <xsl:call-template name="iso690.primary"/> + <!-- Title --> + <xsl:call-template name="iso690.title"> + <xsl:with-param name="italic" select="0"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="biblioset" mode="iso690.paper.book"> +<!-- Host --> + <!-- Primary responsibility --> + <xsl:call-template name="iso690.primary"/> + <!-- Title and Type of medium --> + <xsl:call-template name="iso690.title"/> + <!-- Subordinate responsibility [EL] --> + <xsl:if test="./bibliomisc[@role='medium']"> + <xsl:call-template name="iso690.secondary"/> + </xsl:if> + <!-- Edition --> + <xsl:call-template name="iso690.edition"/> + <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation --> + <xsl:call-template name="iso690.paper.pub"/> + <!-- Numeration within host document [EL] --> + <!-- Location within host --> + <xsl:call-template name="iso690.location"/> + <xsl:if test="./bibliomisc[@role='medium']"> + <!-- Notes [EL] --> + <xsl:call-template name="iso690.notice"/> + <!-- Avaibility and access [EL] --> + <xsl:call-template name="iso690.access"/> + <!-- Standard number [EL] --> + <xsl:call-template name="iso690.isbn"/> + </xsl:if> +</xsl:template> + +<!-- ARTICLES, ETC., IN SERIALS --> +<xsl:template name="iso690.article"> +<!-- Article --> + <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/> +<!-- Serial --> + <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/> +</xsl:template> + +<xsl:template match="biblioset" mode="iso690.article.art"> +<!-- Article --> + <!-- Primary responsibility --> + <xsl:call-template name="iso690.primary"/> + <!-- Title --> + <xsl:call-template name="iso690.title"> + <xsl:with-param name="italic" select="0"/> + </xsl:call-template> + <!-- Subordinate responsibility [nonEL] --> + <xsl:if test="not(../*/bibliomisc[@role='medium'])"> + <xsl:call-template name="iso690.secondary"/> + </xsl:if> +</xsl:template> + +<xsl:template match="biblioset" mode="iso690.article.jour"> +<!-- Serial --> + <!-- Title and Type of medium --> + <xsl:call-template name="iso690.title"/> + <!-- Edition --> + <xsl:call-template name="iso690.edition"> + <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/> + </xsl:call-template> + <!-- Number designation [EL] --> + <!-- Location within host --> + <xsl:call-template name="iso690.article.location"/> + <xsl:if test="./bibliomisc[@role='medium']"> + <!-- Notes [EL] --> + <xsl:call-template name="iso690.notice"/> + <!-- Avaibility and access [EL] --> + <xsl:call-template name="iso690.access"/> + <!-- Standard number [EL] --> + <xsl:call-template name="iso690.issn"/> + </xsl:if> +</xsl:template> + +<!-- PATENT DOCUMENTS --> +<xsl:template name="iso690.patent"> + <!-- Primary responsibility (applicant) --> + <xsl:call-template name="iso690.primary"/> + <!-- Title of the invention --> + <xsl:call-template name="iso690.title"/> + <!-- Subordinate responsibility --> + <xsl:call-template name="iso690.secondary"/> + <!-- Notes --> + <xsl:call-template name="iso690.notice"/> + <!-- Identification --> + <xsl:call-template name="iso690.pat.ident"/> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Elements --> + +<!-- Primary responsibility --> +<xsl:template name="iso690.primary"> + <xsl:param name="primary.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="./authorgroup/author|./author"> + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="./authorgroup/editor|./editor"> + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="./authorgroup/corpauthor|./corpauthor"> + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:if test="(./firstname)and(./surname)"> + <xsl:call-template name="iso690.author"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(./firstname[1])"/> + <xsl:with-param name="sep" select="$primary.sep"/> + </xsl:call-template> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.author.list"> + <xsl:param name="person.list" + select="author|corpauthor|editor"/> + <xsl:param name="person.count" select="count($person.list)"/> + <xsl:param name="count" select="1"/> + <xsl:param name="group" select="./authorgroup[@role='many']"/> + <xsl:param name="many" select="0"/> + + <xsl:param name="primary.many"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.many'"/></xsl:call-template> + </xsl:param> + <xsl:param name="primary.editor"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.editor'"/></xsl:call-template> + </xsl:param> + <xsl:param name="primary.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template> + </xsl:param> + + <xsl:choose> + <xsl:when test="$count > $person.count"></xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$person.count < 4 and not($group)"> + <xsl:call-template name="iso690.author"> + <xsl:with-param name="node" select="$person.list[position()=$count]"/> + </xsl:call-template> + <xsl:choose> + <xsl:when test="$person.count = 2 and $count = 1 and $biblioentry.alt.primary.seps != 0"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.two.sep'"/></xsl:call-template> + </xsl:when> + <xsl:when test="$person.count = 2 and $count = 1"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'authorgroup'"/> + <xsl:with-param name="name" select="'sep2'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$person.count > 2 and $count+1 = $person.count and $biblioentry.alt.primary.seps != 0"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.last.sep'"/></xsl:call-template> + </xsl:when> + <xsl:when test="$person.count > 2 and $count+1 = $person.count"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'authorgroup'"/> + <xsl:with-param name="name" select="'seplast'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$count < $person.count and $biblioentry.alt.primary.seps != 0"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.more.sep'"/></xsl:call-template> + </xsl:when> + <xsl:when test="$count < $person.count"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'authorgroup'"/> + <xsl:with-param name="name" select="'sep'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="($count = $person.count)"> + <xsl:choose> + <xsl:when test="$many!=0"> + <xsl:if test="name($person.list[position()=$count])='editor'"> + <xsl:value-of select="$primary.editor"/> + </xsl:if> + <xsl:value-of select="$primary.many"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="$primary.many"/> + <xsl:with-param name="sep" select="$primary.sep"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="name($person.list[position()=$count])='editor'"> + <xsl:value-of select="$primary.editor"/> + <xsl:value-of select="$primary.sep"/> + </xsl:when> + <xsl:when test="name($person.list[position()=$count])='corpauthor'"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string($person.list[position()=$count])"/> + <xsl:with-param name="sep" select="$primary.sep"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/> + <xsl:with-param name="sep" select="$primary.sep"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + </xsl:choose> + + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select="$person.list"/> + <xsl:with-param name="person.count" select="$person.count"/> + <xsl:with-param name="count" select="$count+1"/> + <xsl:with-param name="many" select="$many"/> + <xsl:with-param name="group"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:choose> + <xsl:when test="($biblioentry.primary.count>=3) and ($person.count>=3)"> + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]|$person.list[3]"/> + <xsl:with-param name="person.count" select="3"/> + <xsl:with-param name="count" select="1"/> + <xsl:with-param name="many" select="1"/> + <xsl:with-param name="group"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="($biblioentry.primary.count>1) and ($person.count>1)"> + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]"/> + <xsl:with-param name="person.count" select="2"/> + <xsl:with-param name="count" select="1"/> + <xsl:with-param name="many" select="1"/> + <xsl:with-param name="group"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.author.list"> + <xsl:with-param name="person.list" select="$person.list[1]"/> + <xsl:with-param name="person.count" select="1"/> + <xsl:with-param name="count" select="1"/> + <xsl:with-param name="many" select="1"/> + <xsl:with-param name="group"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.author"> + <xsl:param name="node" select="."/> + <xsl:param name="lastfirst.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'lastfirst.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="name($node)!='corpauthor'"> + <fo:inline text-transform="uppercase"> + <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/> + </fo:inline> + <xsl:if test="$node//surname and $node//firstname"> + <xsl:value-of select="$lastfirst.sep"/> + </xsl:if> + <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/> + </xsl:when> + <xsl:otherwise> + <fo:inline text-transform="uppercase"> + <xsl:apply-templates mode="iso690.mode" select="$node"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="corpauthor|firstname|surname" mode="iso690.mode"> + <xsl:apply-templates mode="iso690.mode"/> +</xsl:template> + +<!-- Title and Type of medium --> +<xsl:template name="iso690.title"> + <xsl:param name="medium" select="./bibliomisc[@role='medium']"/> + <xsl:param name="italic" select="1"/> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template> + </xsl:param> + + <xsl:apply-templates mode="iso690.mode" select="./title"> + <xsl:with-param name="medium" select="$medium"/> + <xsl:with-param name="italic" select="$italic"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="title" mode="iso690.mode"> + <xsl:param name="medium"/> + <xsl:param name="italic" select="1"/> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template> + </xsl:param> + <xsl:param name="medium1"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium1'"/></xsl:call-template> + </xsl:param> + <xsl:param name="medium2"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium2'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="$italic=1"> + <xsl:call-template name="iso690.italic.title"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.make.title"/> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="$medium"> + <xsl:value-of select="$medium1"/> + <xsl:apply-templates mode="iso690.mode" select="$medium"/> + <xsl:value-of select="$medium2"/> + </xsl:if> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> +</xsl:template> + +<xsl:template name="iso690.italic.title"> + <fo:inline font-style="italic"> + <xsl:call-template name="iso690.make.title"/> + </fo:inline> +</xsl:template> + +<xsl:template name="iso690.make.title"> + <xsl:param name="submaintitle.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:if test="../subtitle"> + <xsl:value-of select="$submaintitle.sep"/> + <xsl:apply-templates mode="iso690.mode" select="../subtitle"/> + </xsl:if> +</xsl:template> + +<xsl:template match="subtitle" mode="iso690.mode"> + <xsl:apply-templates mode="iso690.mode"/> +</xsl:template> + +<xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode"> + <xsl:apply-templates mode="iso690.mode"/> +</xsl:template> + +<!-- Subordinate responsibility --> +<xsl:template name="iso690.secondary"> + <xsl:param name="secondary.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.sep'"/></xsl:call-template> + </xsl:param> + <xsl:param name="secondary.person.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template> + </xsl:param> + <xsl:for-each select="./bibliomisc[@role='secondary']"> + <xsl:apply-templates mode="iso690.mode" select="."/> + <xsl:choose> + <xsl:when test="position()=count(../bibliomisc[@role='secondary'])"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$secondary.sep"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$secondary.person.sep"/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> +</xsl:template> + +<xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode"> + <xsl:apply-templates mode="iso690.mode"/> +</xsl:template> + +<!-- Edition --> +<xsl:template name="iso690.edition"> + <xsl:param name="after"/> + <xsl:param name="edition.serial.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.serial.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="string($after)!=''"> + <xsl:apply-templates mode="iso690.mode" select="./edition"> + <xsl:with-param name="sep" select="$edition.serial.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./edition"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="edition" mode="iso690.mode"> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> +</xsl:template> + +<!-- Issue designation (date and/or n°) --> +<xsl:template name="iso690.issuing"> + <xsl:param name="issuing.div"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template> + </xsl:param> + <xsl:param name="issuing.range"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template> + </xsl:param> + <xsl:param name="issuing.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]"> + <xsl:call-template name="iso690.issuedate"/> + <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]"> + <xsl:with-param name="sep" select="$issuing.div"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]"> + <xsl:with-param name="sep" select="$issuing.range"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]"> + <xsl:with-param name="sep" select="$issuing.div"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]"> + <xsl:with-param name="sep" select="$issuing.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]"> + <xsl:call-template name="iso690.issuedate"/> + <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]"> + <xsl:with-param name="sep" select="$issuing.range"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]"> + <xsl:with-param name="sep" select="$issuing.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum"> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']"> + <xsl:with-param name="sep" select="$issuing.div"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"> + <xsl:with-param name="sep" select="$issuing.div"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./issuenum"> + <xsl:with-param name="sep" select="$issuing.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./pubdate[@role='issuing']"> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']"> + <xsl:with-param name="sep" select="$issuing.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./volumenum"> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"> + <xsl:with-param name="sep" select="$issuing.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./issuenum"> + <xsl:apply-templates mode="iso690.mode" select="./issuenum"> + <xsl:with-param name="sep" select="$issuing.sep"/> + </xsl:apply-templates> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.issuedate"> + <xsl:param name="issuing.div"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template> + </xsl:param> + <xsl:param name="issuing.range"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template> + </xsl:param> + <xsl:param name="issuing.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="./pubdate[@role='issuing'][2]"> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]"> + <xsl:with-param name="sep" select="$issuing.range"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]"> + <xsl:with-param name="sep" select="$issuing.div"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']"> + <xsl:with-param name="sep" select="$issuing.div"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="pubdate[@role='issuing']" mode="iso690.mode"> + <xsl:param name="sep"/> + <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.space"> + <xsl:with-param name="text" select="$substr"/> + </xsl:call-template> + <xsl:choose> + <xsl:when test="$substr='-'"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="' '"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Numeration of the part --> +<xsl:template name="iso690.partnr"> + <xsl:param name="partnr.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"> + <xsl:with-param name="sep" select="$partnr.sep"/> + </xsl:apply-templates> +</xsl:template> + +<!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation --> +<xsl:template name="iso690.pub"> + <xsl:param name="onlydate" select="0"/> + <xsl:param name="placesep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'placepubl.sep'"/></xsl:call-template> + </xsl:param> + <xsl:param name="pubsep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'publyear.sep'"/></xsl:call-template> + </xsl:param> + <xsl:param name="endsep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])"> + <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city"> + <xsl:with-param name="sep" select="$placesep"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername"> + <xsl:with-param name="sep" select="$pubsep"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year"> + <xsl:with-param name="sep" select="$endsep"/> + </xsl:apply-templates> + <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)"> + <xsl:call-template name="iso690.data"> + <xsl:with-param name="sep" select="$endsep"/> + </xsl:call-template> + </xsl:if> + </xsl:when> + <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)"> + <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city"> + <xsl:with-param name="sep" select="$placesep"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername"> + <xsl:with-param name="sep" select="$endsep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)"> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year"> + <xsl:with-param name="sep" select="$endsep"/> + </xsl:apply-templates> + <xsl:if test="$onlydate=1"> + <xsl:call-template name="iso690.location"> + <xsl:with-param name="onlypages" select="1"/> + </xsl:call-template> + </xsl:if> + </xsl:when> + <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)"> + <xsl:call-template name="iso690.data"> + <xsl:with-param name="sep" select="$endsep"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.paper.pub"> + <xsl:param name="spec.pubinfo.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="./volumnum|./issuenum|./pagenums"> + <xsl:call-template name="iso690.pub"> + <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.pub"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.data"> + <xsl:param name="sep"/> + <xsl:param name="datecit2"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']"> + <xsl:with-param name="sep"/> + </xsl:apply-templates> + <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/> + <xsl:choose> + <xsl:when test="./date[@role='cit']"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="$datecit2"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="./date[@role='upd']"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(./date[@role='upd'])"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="publisher/address/city|publishername" mode="iso690.mode"> + <xsl:param name="sep"/> + <xsl:param name="upd" select="0"/> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="pubdate|copyright/year" mode="iso690.mode"> + <xsl:param name="sep"/> + <xsl:param name="upd" select="1"/> + <xsl:param name="datecit2"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template> + </xsl:param> + <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/> + <xsl:if test="name(.)!='pubdate'"> + <xsl:value-of select="'©'"/><!-- copyright --> + </xsl:if> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.space"> + <xsl:with-param name="text" select="$substr"/> + </xsl:call-template> + <xsl:if test="$upd!=0"> + <xsl:choose> + <xsl:when test="name(.)='pubdate'"> + <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/> + <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/> + <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + <xsl:choose> + <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="$datecit2"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(../date[@role='upd'])"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$substr='-'"> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="' '"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.space"> + <xsl:param name="text" select="substring(string(.),string-length(string(.)))"/> + <xsl:if test="$text='-'"> + <xsl:value-of select="' '"/> + </xsl:if> +</xsl:template> + +<!-- Date of update/revision --> +<xsl:template match="date[@role='upd']" mode="iso690.mode"> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template> + </xsl:param> + <xsl:value-of select="$sep"/> + <xsl:apply-templates mode="iso690.mode"/> +</xsl:template> + +<!-- Date of citation --> +<xsl:template match="date[@role='cit']" mode="iso690.mode"> + <xsl:param name="datecit1"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template> + </xsl:param> + <xsl:param name="datecit2"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template> + </xsl:param> + <xsl:value-of select="$datecit1"/> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:value-of select="$datecit2"/> +</xsl:template> + +<!-- Extent --> +<xsl:template name="iso690.extent"> + <xsl:param name="extent.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode" select="./pagenums"> + <xsl:with-param name="sep" select="$extent.sep"/> + </xsl:apply-templates> +</xsl:template> + +<!-- Location within host --> +<xsl:template name="iso690.part.location"> + <xsl:param name="location.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="./pagenums"> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/> + <xsl:apply-templates mode="iso690.mode" select="./pagenums"/> + </xsl:when> + <xsl:when test="./bibliomisc[@role='sectitle']"> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.article.location"> + <xsl:param name="location.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template> + </xsl:param> + <xsl:param name="locs.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])"> + <xsl:choose> + <xsl:when test="./volumenum|./issuenum|./pagenums"> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]"> + <xsl:with-param name="upd" select="0"/> + <xsl:with-param name="sep" select="$locs.sep"/> + </xsl:apply-templates> + <xsl:call-template name="iso690.location"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]"> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="./volumenum|./issuenum|./pagenums"> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]"> + <xsl:with-param name="upd" select="0"/> + <xsl:with-param name="sep" select="$locs.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]"> + <xsl:with-param name="upd" select="0"/> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="./issuenum"> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"/> + <xsl:apply-templates mode="iso690.mode" select="./issuenum"> + <xsl:with-param name="sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"> + <xsl:with-param name="sep"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="./pagenums"> + <xsl:call-template name="iso690.data"> + <xsl:with-param name="sep" select="$locs.sep"/> + </xsl:call-template> + <xsl:apply-templates mode="iso690.mode" select="./pagenums"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="iso690.data"> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="iso690.location"> + <xsl:param name="location.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)"> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./issuenum and not(./pagenums)"> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"/> + <xsl:apply-templates mode="iso690.mode" select="./issuenum"> + <xsl:with-param name="sep" select="$location.sep"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="./pagenums"> + <xsl:apply-templates mode="iso690.mode" select="./volumenum"/> + <xsl:apply-templates mode="iso690.mode" select="./issuenum"/> + <xsl:apply-templates mode="iso690.mode" select="./pagenums"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode"> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="volumenum|issuenum" mode="iso690.mode"> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="pagenums" mode="iso690.mode"> + <xsl:param name="sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$sep"/> + </xsl:call-template> +</xsl:template> + +<!-- Series --> +<xsl:template name="iso690.serie"> + <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/> +</xsl:template> + +<!-- Notes --> +<xsl:template name="iso690.notice"> + <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/> +</xsl:template> + +<xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode"> + <xsl:param name="notice.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="string(.)"/> + <xsl:with-param name="sep" select="$notice.sep"/> + </xsl:call-template> +</xsl:template> + +<!-- Avaibility and access --> +<xsl:template name="iso690.access"> + <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']"> + <xsl:choose> + <xsl:when test="position()=1"> + <xsl:apply-templates mode="iso690.mode" select="."/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="."> + <xsl:with-param name="firstacc" select="0"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> +</xsl:template> + +<xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode"> + <xsl:param name="link1"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template> + </xsl:param> + <xsl:param name="link2"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link2'"/></xsl:call-template> + </xsl:param> + <xsl:value-of select="$link1"/> + <xsl:call-template name="ulink"/> + <xsl:value-of select="$link2"/> +</xsl:template> + +<xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode"> + <xsl:param name="firstacc" select="1"/> + <xsl:param name="access"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template> + </xsl:param> + <xsl:param name="acctoo"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'acctoo'"/></xsl:call-template> + </xsl:param> + <xsl:param name="onwww"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'onwww'"/></xsl:call-template> + </xsl:param> + <xsl:param name="oninet"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'oninet'"/></xsl:call-template> + </xsl:param> + <xsl:param name="access.end"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.end'"/></xsl:call-template> + </xsl:param> + <xsl:param name="access.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.sep'"/></xsl:call-template> + </xsl:param> + <xsl:choose> + <xsl:when test="$firstacc=1"> + <xsl:value-of select="$access"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$acctoo"/> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="(./ulink)and(string(./ulink)=string(.))"> + <xsl:choose> + <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))"> + <xsl:value-of select="$onwww"/> + <xsl:value-of select="$access.end"/> + <xsl:apply-templates mode="iso690.mode" select="./ulink"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$oninet"/> + <xsl:value-of select="$access.end"/> + <xsl:apply-templates mode="iso690.mode" select="./ulink"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="(./ulink)and(string(./ulink)!=string(.))"> + <xsl:value-of select="text()[1]"/> + <xsl:call-template name="iso690.endsep"> + <xsl:with-param name="text" select="text()[1]"/> + <xsl:with-param name="sep" select="$access.end"/> + </xsl:call-template> + <xsl:apply-templates mode="iso690.mode" select="./ulink"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode"/> + </xsl:otherwise> + </xsl:choose> + <xsl:value-of select="$access.sep"/> +</xsl:template> + +<!-- Standard number - ISBN --> +<xsl:template name="iso690.isbn"> + <xsl:choose> + <xsl:when test="./biblioid/@class='isbn'"> + <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/> + </xsl:when> + <xsl:when test="./isbn"> + <xsl:apply-templates mode="iso690.mode" select="./isbn"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode"> + <xsl:param name="isbn"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template> + </xsl:param> + <xsl:param name="stdnum.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template> + </xsl:param> + <xsl:value-of select="$isbn"/> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:value-of select="$stdnum.sep"/> +</xsl:template> + +<!-- Standard number - ISSN --> +<xsl:template name="iso690.issn"> + <xsl:choose> + <xsl:when test="./biblioid/@class='issn'"> + <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/> + </xsl:when> + <xsl:when test="./issn"> + <xsl:apply-templates mode="iso690.mode" select="./issn"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode"> + <xsl:param name="issn"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template> + </xsl:param> + <xsl:param name="stdnum.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template> + </xsl:param> + <xsl:value-of select="$issn"/> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:value-of select="$stdnum.sep"/> +</xsl:template> + +<!-- Identification of patent document --> +<xsl:template name="iso690.pat.ident"> + <xsl:param name="patdate.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode" select="./address/country"/> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/> + <xsl:choose> + <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']"> + <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]"> + <xsl:with-param name="sep" select="$patdate.sep"/> + </xsl:apply-templates> +</xsl:template> + +<!-- Country or issuing office --> +<xsl:template match="address/country" mode="iso690.mode"> + <xsl:param name="patcountry.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template> + </xsl:param> + <fo:inline font-style="italic"> + <xsl:apply-templates mode="iso690.mode"/> + </fo:inline> + <xsl:value-of select="$patcountry.sep"/> +</xsl:template> + +<!-- Kind of patent document --> +<xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode"> + <xsl:param name="pattype.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template> + </xsl:param> + <fo:inline font-style="italic"> + <xsl:apply-templates mode="iso690.mode"/> + </fo:inline> + <xsl:value-of select="$pattype.sep"/> +</xsl:template> + +<!-- Number --> +<xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode"> + <xsl:param name="patnum.sep"> + <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template> + </xsl:param> + <xsl:apply-templates mode="iso690.mode"/> + <xsl:value-of select="$patnum.sep"/> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Supplementary templates --> + +<xsl:template name="iso690.endsep"> + <xsl:param name="text"/> + <xsl:param name="sep" select=". "/> + <xsl:choose> + <xsl:when test="substring($text,string-length($text))!=substring($sep,1,1)"> + <xsl:value-of select="$sep"/> + </xsl:when> + <xsl:when test="substring($text,string-length($text))=' '"> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="' '"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="iso690.mode"> + <xsl:apply-templates select="."/><!-- try the default mode --> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/biblio.xsl b/3rdParty/DocBook/XSL/fo/biblio.xsl new file mode 100644 index 0000000..4524612 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/biblio.xsl @@ -0,0 +1,1169 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: biblio.xsl 7467 2007-09-27 16:10:31Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="bibliography"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="not(parent::*) or parent::part or parent::book"> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}"> + <xsl:call-template name="bibliography.titlepage"/> + </fo:block> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em"> + <xsl:call-template name="bibliography.titlepage"/> + </fo:block> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="bibliography/bibliographyinfo"></xsl:template> +<xsl:template match="bibliography/info"></xsl:template> +<xsl:template match="bibliography/title"></xsl:template> +<xsl:template match="bibliography/subtitle"></xsl:template> +<xsl:template match="bibliography/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="bibliodiv"> + <fo:block> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + <xsl:call-template name="bibliodiv.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="bibliodiv/title"/> +<xsl:template match="bibliodiv/subtitle"/> +<xsl:template match="bibliodiv/titleabbrev"/> + +<!-- ==================================================================== --> + +<xsl:template match="bibliolist"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em"> + + <xsl:if test="blockinfo/title|info/title|title"> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + + <xsl:apply-templates select="*[not(self::blockinfo) + and not(self::info) + and not(self::title) + and not(self::titleabbrev)]"/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="biblioentry"> + <xsl:param name="label"> + <xsl:call-template name="biblioentry.label"/> + </xsl:param> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="string(.) = ''"> + <xsl:variable name="bib" select="document($bibliography.collection,.)"/> + <xsl:variable name="entry" select="$bib/bibliography// + *[@id=$id or @xml:id=$id][1]"/> + <xsl:choose> + <xsl:when test="$entry"> + <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:apply-templates select="$entry"> + <xsl:with-param name="label" select="$label"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entry"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>No bibliography entry: </xsl:text> + <xsl:value-of select="$id"/> + <xsl:text> found in </xsl:text> + <xsl:value-of select="$bibliography.collection"/> + </xsl:message> + <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing"> + <xsl:text>Error: no bibliography entry: </xsl:text> + <xsl:value-of select="$id"/> + <xsl:text> found in </xsl:text> + <xsl:value-of select="$bibliography.collection"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" xsl:use-attribute-sets="biblioentry.properties"> + <xsl:copy-of select="$label"/> + <xsl:choose> + <xsl:when test="$bibliography.style = 'iso690'"> + <xsl:call-template name="iso690.makecitation"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="bibliography.mode"/> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="bibliomixed"> + <xsl:param name="label"> + <xsl:call-template name="biblioentry.label"/> + </xsl:param> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="string(.) = ''"> + <xsl:variable name="bib" select="document($bibliography.collection,.)"/> + <xsl:variable name="entry" select="$bib/bibliography// + *[@id=$id or @xml:id=$id][1]"/> + <xsl:choose> + <xsl:when test="$entry"> + <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:apply-templates select="$entry"> + <xsl:with-param name="label" select="$label"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entry"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>No bibliography entry: </xsl:text> + <xsl:value-of select="$id"/> + <xsl:text> found in </xsl:text> + <xsl:value-of select="$bibliography.collection"/> + </xsl:message> + <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing"> + <xsl:text>Error: no bibliography entry: </xsl:text> + <xsl:value-of select="$id"/> + <xsl:text> found in </xsl:text> + <xsl:value-of select="$bibliography.collection"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" xsl:use-attribute-sets="biblioentry.properties"> + <xsl:copy-of select="$label"/> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="biblioentry.label"> + <xsl:param name="node" select="."/> + + <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:text>[</xsl:text> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:when test="local-name($node/child::*[1]) = 'abbrev'"> + <xsl:text>[</xsl:text> + <xsl:apply-templates select="$node/abbrev[1]"/> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:when test="$node/@xreflabel"> + <xsl:text>[</xsl:text> + <xsl:value-of select="$node/@xreflabel"/> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:when test="$node/@id or $node/@xml:id"> + <xsl:text>[</xsl:text> + <xsl:value-of select="($node/@id|$node/@xml:id)[1]"/> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:otherwise><!-- nop --></xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="bibliography.mode"> + <xsl:apply-templates select="."/><!-- try the default mode --> +</xsl:template> + +<xsl:template match="abbrev" mode="bibliography.mode"> + <xsl:if test="preceding-sibling::*"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> + </xsl:if> +</xsl:template> + +<xsl:template match="abstract" mode="bibliography.mode"> + <!-- suppressed --> +</xsl:template> + +<xsl:template match="address" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="affiliation" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="shortaffil" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="jobtitle" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="artheader|articleinfo|article/info" + mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="artpagenums" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="author" mode="bibliography.mode"> + <fo:inline> + <xsl:call-template name="person.name"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="authorblurb|personblurb" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="authorgroup" mode="bibliography.mode"> + <fo:inline> + <xsl:call-template name="person.name.list"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="authorinitials" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliomisc" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliomset" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<!-- ================================================== --> + +<xsl:template match="biblioset" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="biblioset/title|biblioset/citetitle" + mode="bibliography.mode"> + <xsl:variable name="relation" select="../@relation"/> + <xsl:choose> + <xsl:when test="$relation='article' or @pubwork='article'"> + <xsl:call-template name="gentext.startquote"/> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <fo:inline font-style="italic"> + <xsl:apply-templates/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> + <xsl:value-of select="$biblioentry.item.separator"/> +</xsl:template> + +<!-- ================================================== --> + +<xsl:template match="bookbiblio" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="citetitle" mode="bibliography.mode"> + <fo:inline> + <xsl:choose> + <xsl:when test="@pubwork = 'article'"> + <xsl:call-template name="gentext.startquote"/> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <fo:inline font-style="italic"> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="collab" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="confgroup" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="contractnum" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="contractsponsor" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="contrib" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<!-- ================================================== --> + +<xsl:template match="copyright" mode="bibliography.mode"> + <fo:inline> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Copyright'"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat">copyright</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="year" mode="bibliography.mode"/> + <xsl:if test="holder"> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="holder" mode="bibliography.mode"/> + </xsl:if> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="year" mode="bibliography.mode"> + <xsl:apply-templates/><xsl:text>, </xsl:text> +</xsl:template> + +<xsl:template match="year[position()=last()]" mode="bibliography.mode"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="holder" mode="bibliography.mode"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ================================================== --> + +<xsl:template match="corpauthor" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="corpcredit" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="corpname" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="date" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="edition" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="editor" mode="bibliography.mode"> + <fo:inline> + <xsl:call-template name="person.name"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="firstname" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="honorific" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="indexterm" mode="bibliography.mode"> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="invpartnumber" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="isbn" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="issn" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="issuenum" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="lineage" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="orgname" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="othercredit" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="othername" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="pagenums" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="printhistory" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="productname" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="productnumber" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="pubdate" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="publisher" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="publishername" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="pubsnumber" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="releaseinfo" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="revhistory" mode="bibliography.mode"> + <fo:block> + <xsl:apply-templates select="."/> <!-- use normal mode --> + </fo:block> +</xsl:template> + +<xsl:template match="seriesinfo" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="seriesvolnums" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="subtitle" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="surname" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="title" mode="bibliography.mode"> + <fo:inline> + <fo:inline font-style="italic"> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="titleabbrev" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="volumenum" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="orgdiv" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="collabname" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="confdates" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="conftitle" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="confnum" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="confsponsor" mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" + mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="bibliomixed.mode"> + <xsl:apply-templates select="."/><!-- try the default mode --> +</xsl:template> + +<xsl:template match="abbrev" mode="bibliomixed.mode"> + <xsl:if test="preceding-sibling::*"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> + </xsl:if> +</xsl:template> + +<xsl:template match="abstract" mode="bibliomixed.mode"> + <fo:block start-indent="1in"> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="para" mode="bibliomixed.mode"> + <fo:block> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="address" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="affiliation" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="shortaffil" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="jobtitle" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="artpagenums" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="author" mode="bibliomixed.mode"> + <fo:inline> + <xsl:call-template name="person.name"/> + </fo:inline> +</xsl:template> + +<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="authorgroup" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="authorinitials" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliomisc" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<!-- ================================================== --> + +<xsl:template match="bibliomset" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliomset/title|bibliomset/citetitle" + mode="bibliomixed.mode"> + <xsl:variable name="relation" select="../@relation"/> + <xsl:choose> + <xsl:when test="$relation='article' or @pubwork='article'"> + <xsl:call-template name="gentext.startquote"/> + <xsl:apply-templates mode="bibliomixed.mode"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <fo:inline font-style="italic"> + <xsl:apply-templates/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ================================================== --> + +<xsl:template match="biblioset" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="citetitle" mode="bibliomixed.mode"> + <xsl:choose> + <xsl:when test="@pubwork = 'article'"> + <xsl:call-template name="gentext.startquote"/> + <xsl:apply-templates mode="bibliomixed.mode"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <fo:inline font-style="italic"> + <xsl:apply-templates mode="bibliography.mode"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="collab" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="confgroup" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="contractnum" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="contractsponsor" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="contrib" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="copyright" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="corpauthor" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="corpcredit" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="corpname" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="date" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="edition" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="editor" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="firstname" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="honorific" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="indexterm" mode="bibliomixed.mode"> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="invpartnumber" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="isbn" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="issn" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="issuenum" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="lineage" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="orgname" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="othercredit" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="othername" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="pagenums" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="printhistory" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="productname" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="productnumber" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="pubdate" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="publisher" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="publishername" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="pubsnumber" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="releaseinfo" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="revhistory" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="seriesvolnums" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="subtitle" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="surname" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="title" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="titleabbrev" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="volumenum" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" + mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/block.xsl b/3rdParty/DocBook/XSL/fo/block.xsl new file mode 100644 index 0000000..907200b --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/block.xsl @@ -0,0 +1,643 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: block.xsl 8441 2009-05-24 02:14:56Z abdelazer $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> +<!-- What should we do about styling blockinfo? --> + +<xsl:template match="blockinfo|info"> + <!-- suppress --> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="block.object"> + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + <fo:block> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="para"> + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="simpara"> + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="formalpara"> + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- Only use title from info --> +<xsl:template match="formalpara/info"> + <xsl:apply-templates select="title"/> +</xsl:template> + +<xsl:template match="formalpara/title|formalpara/info/title"> + <xsl:variable name="titleStr"> + <xsl:apply-templates/> + </xsl:variable> + <xsl:variable name="lastChar"> + <xsl:if test="$titleStr != ''"> + <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/> + </xsl:if> + </xsl:variable> + + <fo:inline font-weight="bold" + keep-with-next.within-line="always" + padding-end="1em"> + <xsl:copy-of select="$titleStr"/> + <xsl:if test="$lastChar != '' + and not(contains($runinhead.title.end.punct, $lastChar))"> + <xsl:value-of select="$runinhead.default.title.end.punct"/> + </xsl:if> + <xsl:text> </xsl:text> + </fo:inline> +</xsl:template> + +<xsl:template match="formalpara/para"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="blockquote"> + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + <fo:block xsl:use-attribute-sets="blockquote.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> + <fo:block> + <xsl:if test="title|info/title"> + <fo:block xsl:use-attribute-sets="formal.title.properties"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </fo:block> + </xsl:if> + <xsl:apply-templates select="*[local-name(.) != 'title' + and local-name(.) != 'attribution']"/> + </fo:block> + <xsl:if test="attribution"> + <fo:block text-align="right"> + <!-- mdash --> + <xsl:text>—</xsl:text> + <xsl:apply-templates select="attribution"/> + </fo:block> + </xsl:if> + </fo:block> +</xsl:template> + +<!-- Use an em dash per Chicago Manual of Style and https://sourceforge.net/tracker/index.php?func=detail&aid=2793878&group_id=21935&atid=373747 --> +<xsl:template match="epigraph"> + <fo:block> + <xsl:call-template name="anchor"/> + <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> + <xsl:if test="attribution"> + <fo:inline> + <xsl:text>—</xsl:text> + <xsl:apply-templates select="attribution"/> + </fo:inline> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="attribution"> + <fo:inline><xsl:apply-templates/></fo:inline> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="floater"> + <xsl:param name="position" select="'none'"/> + <xsl:param name="clear" select="'both'"/> + <xsl:param name="width"/> + <xsl:param name="content"/> + <xsl:param name="start.indent">0pt</xsl:param> + <xsl:param name="end.indent">0pt</xsl:param> + + <xsl:choose> + <xsl:when test="not($fop.extensions = 0)"> + <!-- fop 0.20.5 does not support floats --> + <xsl:copy-of select="$content"/> + </xsl:when> + <xsl:when test="$position = 'none'"> + <xsl:copy-of select="$content"/> + </xsl:when> + <xsl:when test="$position = 'before'"> + <fo:float float="before"> + <xsl:copy-of select="$content"/> + </fo:float> + </xsl:when> + <xsl:when test="$position = 'left' or + $position = 'start' or + $position = 'right' or + $position = 'end' or + $position = 'inside' or + $position = 'outside'"> + <xsl:variable name="float"> + <fo:float float="{$position}" + clear="{$clear}"> + <fo:block-container + start-indent="{$start.indent}" + end-indent="{$end.indent}"> + <xsl:if test="$width != ''"> + <xsl:attribute name="inline-progression-dimension"> + <xsl:value-of select="$width"/> + </xsl:attribute> + </xsl:if> + <fo:block> + <xsl:copy-of select="$content"/> + </fo:block> + </fo:block-container> + </fo:float> + </xsl:variable> + <xsl:choose> + <xsl:when test="$axf.extensions != 0 and self::sidebar"> + <fo:block xsl:use-attribute-sets="normal.para.spacing" + space-after="0pt" + space-after.precedence="force" + start-indent="0pt" end-indent="0pt"> + <xsl:copy-of select="$float"/> + </fo:block> + </xsl:when> + <xsl:when test="$axf.extensions != 0 and + ($position = 'left' or $position = 'start')"> + <fo:float float="{$position}" + clear="{$clear}"> + <fo:block-container + inline-progression-dimension=".001mm" + end-indent="{$start.indent} + {$width} + {$end.indent}"> + <xsl:attribute name="start-indent"> + <xsl:choose> + <xsl:when test="ancestor::para"> + <!-- Special case for handling inline floats + in Antenna House--> + <xsl:value-of select="concat('-', $body.start.indent)"/> + </xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <fo:block start-indent="{$start.indent}" + end-indent="-{$start.indent} - {$width}"> + <xsl:copy-of select="$content"/> + </fo:block> + </fo:block-container> + </fo:float> + + </xsl:when> + <xsl:when test="$axf.extensions != 0 and + ($position = 'right' or $position = 'end')"> + <!-- Special case for handling inline floats in Antenna House--> + <fo:float float="{$position}" + clear="{$clear}"> + <fo:block-container + inline-progression-dimension=".001mm" + end-indent="-{$body.end.indent}" + start-indent="{$start.indent} + {$width} + {$end.indent}"> + <fo:block end-indent="{$end.indent}" + start-indent="-{$end.indent} - {$width}"> + <xsl:copy-of select="$content"/> + </fo:block> + </fo:block-container> + </fo:float> + + </xsl:when> + <xsl:when test="$xep.extensions != 0 and self::sidebar"> + <!-- float needs some space above to line up with following para --> + <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:copy-of select="$float"/> + </fo:block> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:copy-of select="$float"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$float"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$content"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="sidebar" name="sidebar"> + <!-- Also does margin notes --> + <xsl:variable name="pi-type"> + <xsl:call-template name="pi.dbfo_float-type"/> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$pi-type = 'margin.note'"> + <xsl:call-template name="margin.note"/> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="content"> + <fo:block xsl:use-attribute-sets="sidebar.properties" + id="{$id}"> + <xsl:call-template name="sidebar.titlepage"/> + <xsl:apply-templates select="node()[not(self::title) and + not(self::info) and + not(self::sidebarinfo)]"/> + </fo:block> + </xsl:variable> + + <xsl:variable name="pi-width"> + <xsl:call-template name="pi.dbfo_sidebar-width"/> + </xsl:variable> + + <xsl:variable name="position"> + <xsl:choose> + <xsl:when test="$pi-type != ''"> + <xsl:value-of select="$pi-type"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$sidebar.float.type"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:call-template name="floater"> + <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="position" select="$position"/> + <xsl:with-param name="width"> + <xsl:choose> + <xsl:when test="$pi-width != ''"> + <xsl:value-of select="$pi-width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$sidebar.float.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="start.indent"> + <xsl:choose> + <xsl:when test="$position = 'start' or + $position = 'left'">0pt</xsl:when> + <xsl:when test="$position = 'end' or + $position = 'right'">0.5em</xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="end.indent"> + <xsl:choose> + <xsl:when test="$position = 'start' or + $position = 'left'">0.5em</xsl:when> + <xsl:when test="$position = 'end' or + $position = 'right'">0pt</xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template match="sidebar/title|sidebarinfo|sidebar/info"/> + +<xsl:template match="sidebar/title|sidebarinfo/title|sidebar/info/title" + mode="titlepage.mode" priority="1"> + <fo:block xsl:use-attribute-sets="sidebar.title.properties"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template name="margin.note"> + <xsl:param name="content"> + <fo:block xsl:use-attribute-sets="margin.note.properties"> + <xsl:if test="./title"> + <fo:block xsl:use-attribute-sets="margin.note.title.properties"> + <xsl:apply-templates select="./title" mode="margin.note.title.mode"/> + </fo:block> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:param> + + <xsl:variable name="pi-width"> + <xsl:call-template name="pi.dbfo_sidebar-width"/> + </xsl:variable> + + <xsl:variable name="position" select="$margin.note.float.type"/> + + <xsl:call-template name="floater"> + <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="position" select="$position"/> + <xsl:with-param name="width" > + <xsl:choose> + <xsl:when test="$pi-width != ''"> + <xsl:value-of select="$pi-width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$margin.note.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="start.indent"> + <xsl:choose> + <xsl:when test="$position = 'start' or + $position = 'left'">0pt</xsl:when> + <xsl:when test="$position = 'end' or + $position = 'right'">0.5em</xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="end.indent"> + <xsl:choose> + <xsl:when test="$position = 'start' or + $position = 'left'">0.5em</xsl:when> + <xsl:when test="$position = 'end' or + $position = 'right'">0pt</xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="sidebar/title" mode="margin.note.title.mode"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="abstract"> + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + <fo:block xsl:use-attribute-sets="abstract.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="abstract/title|abstract/info/title"> + <fo:block xsl:use-attribute-sets="abstract.title.properties"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="msgset"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="msgentry"> + <xsl:call-template name="block.object"/> +</xsl:template> + +<xsl:template match="simplemsgentry"> + <xsl:call-template name="block.object"/> +</xsl:template> + +<xsl:template match="msg"> + <xsl:call-template name="block.object"/> +</xsl:template> + +<xsl:template match="msgmain"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="msgsub"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="msgrel"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="msgtext"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="msginfo"> + <xsl:call-template name="block.object"/> +</xsl:template> + +<xsl:template match="msglevel"> + <fo:block> + <fo:inline font-weight="bold" + keep-with-next.within-line="always"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgLevel'"/> + </xsl:call-template> + </fo:inline> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="msgorig"> + <fo:block> + <fo:inline font-weight="bold" + keep-with-next.within-line="always"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgOrig'"/> + </xsl:call-template> + </fo:inline> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="msgaud"> + <fo:block> + <fo:inline font-weight="bold" + keep-with-next.within-line="always"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgAud'"/> + </xsl:call-template> + </fo:inline> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="msgexplan"> + <xsl:call-template name="block.object"/> +</xsl:template> + +<xsl:template match="msgexplan/title"> + <fo:block font-weight="bold" + keep-with-next.within-column="always" + hyphenate="false"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> +<!-- For better or worse, revhistory is allowed in content... --> + +<xsl:template match="revhistory"> + <fo:table table-layout="fixed" xsl:use-attribute-sets="revhistory.table.properties"> + <xsl:call-template name="anchor"/> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="3" column-width="proportional-column-width(1)"/> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <fo:table-row> + <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block xsl:use-attribute-sets="revhistory.title.properties"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'RevHistory'"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + <xsl:apply-templates/> + </fo:table-body> + </fo:table> +</xsl:template> + +<xsl:template match="revhistory/revision"> + <xsl:variable name="revnumber" select="revnumber"/> + <xsl:variable name="revdate" select="date"/> + <xsl:variable name="revauthor" select="authorinitials|author"/> + <xsl:variable name="revremark" select="revremark|revdescription"/> + <fo:table-row> + <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:call-template name="anchor"/> + <xsl:if test="$revnumber"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Revision'"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="$revnumber[1]"/> + </xsl:if> + </fo:block> + </fo:table-cell> + <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:apply-templates select="$revdate[1]"/> + </fo:block> + </fo:table-cell> + <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:for-each select="$revauthor"> + <xsl:apply-templates select="."/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </fo:block> + </fo:table-cell> + </fo:table-row> + <xsl:if test="$revremark"> + <fo:table-row> + <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:apply-templates select="$revremark[1]"/> + </fo:block> + </fo:table-cell> + </fo:table-row> + </xsl:if> +</xsl:template> + +<xsl:template match="revision/revnumber"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/date"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/authorinitials"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/author"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/revremark"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/revdescription"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="ackno|acknowledgements[parent::article]"> + <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="highlights"> + <xsl:call-template name="block.object"/> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/callout.xsl b/3rdParty/DocBook/XSL/fo/callout.xsl new file mode 100644 index 0000000..a31f218 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/callout.xsl @@ -0,0 +1,231 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" + xmlns:xverb="com.nwalsh.xalan.Verbatim" + xmlns:lxslt="http://xml.apache.org/xslt" + exclude-result-prefixes="sverb xverb lxslt" + version='1.0'> + +<!-- ******************************************************************** + $Id: callout.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<lxslt:component prefix="xverb" + functions="insertCallouts"/> + +<xsl:template match="programlistingco|screenco"> + <xsl:variable name="verbatim" select="programlisting|screen"/> + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + + <xsl:choose> + <xsl:when test="$use.extensions != '0' + and $callouts.extension != '0'"> + <xsl:variable name="rtf"> + <xsl:apply-templates select="$verbatim"> + <xsl:with-param name="suppress-numbers" select="'1'"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:variable name="rtf-with-callouts"> + <xsl:choose> + <xsl:when test="contains($vendor, 'SAXON ')"> + <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/> + </xsl:when> + <xsl:when test="contains($vendor, 'Apache Software Foundation')"> + <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Don't know how to do callouts with </xsl:text> + <xsl:value-of select="$vendor"/> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$verbatim/@linenumbering = 'numbered' + and $linenumbering.extension != '0'"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf" select="$rtf-with-callouts"/> + <xsl:with-param name="pi.context" + select="programlisting|screen"/> + </xsl:call-template> + <xsl:apply-templates select="calloutlist"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$rtf-with-callouts"/> + <xsl:apply-templates select="calloutlist"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="areaspec|areaset|area"> +</xsl:template> + +<xsl:template match="areaset" mode="conumber"> + <xsl:number count="area|areaset" format="1"/> +</xsl:template> + +<xsl:template match="area" mode="conumber"> + <xsl:number count="area|areaset" format="1"/> +</xsl:template> + +<xsl:template match="co"> + <fo:inline> + <xsl:call-template name="anchor"/> + <xsl:apply-templates select="." mode="callout-bug"/> + </fo:inline> +</xsl:template> + +<xsl:template match="coref"> + <!-- tricky; this relies on the fact that we can process the "co" that's --> + <!-- "over there" as if it were "right here" --> + + <xsl:variable name="co" select="key('id', @linkend)"/> + <xsl:choose> + <xsl:when test="not($co)"> + <xsl:message> + <xsl:text>Error: coref link is broken: </xsl:text> + <xsl:value-of select="@linkend"/> + </xsl:message> + </xsl:when> + <xsl:when test="local-name($co) != 'co'"> + <xsl:message> + <xsl:text>Error: coref doesn't point to a co: </xsl:text> + <xsl:value-of select="@linkend"/> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <fo:inline> + <xsl:call-template name="anchor"/> + <xsl:apply-templates select="$co" mode="callout-bug"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="co" mode="callout-bug"> + <xsl:call-template name="callout-bug"> + <xsl:with-param name="conum"> + <xsl:number count="co" + level="any" + from="programlisting|screen|literallayout|synopsis" + format="1"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template name="callout-bug"> + <xsl:param name="conum" select='1'/> + + <xsl:choose> + <!-- Draw callouts as images --> + <xsl:when test="$callout.graphics != '0' + and $conum <= $callout.graphics.number.limit"> + <xsl:variable name="filename" + select="concat($callout.graphics.path, $conum, + $callout.graphics.extension)"/> + + <fo:external-graphic content-width="{$callout.icon.size}" + width="{$callout.icon.size}"> + <xsl:attribute name="src"> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0 + or $fop.extensions != 0 + or $arbortext.extensions != 0"> + <xsl:value-of select="$filename"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>url(</xsl:text> + <xsl:value-of select="$filename"/> + <xsl:text>)</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:external-graphic> + </xsl:when> + + <xsl:when test="$callout.unicode != 0 + and $conum <= $callout.unicode.number.limit"> + <xsl:variable name="comarkup"> + <xsl:choose> + <xsl:when test="$callout.unicode.start.character = 10102"> + <xsl:choose> + <xsl:when test="$conum = 1">❶</xsl:when> + <xsl:when test="$conum = 2">❷</xsl:when> + <xsl:when test="$conum = 3">❸</xsl:when> + <xsl:when test="$conum = 4">❹</xsl:when> + <xsl:when test="$conum = 5">❺</xsl:when> + <xsl:when test="$conum = 6">❻</xsl:when> + <xsl:when test="$conum = 7">❼</xsl:when> + <xsl:when test="$conum = 8">❽</xsl:when> + <xsl:when test="$conum = 9">❾</xsl:when> + <xsl:when test="$conum = 10">❿</xsl:when> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Don't know how to generate Unicode callouts </xsl:text> + <xsl:text>when $callout.unicode.start.character is </xsl:text> + <xsl:value-of select="$callout.unicode.start.character"/> + </xsl:message> + <fo:inline background-color="#404040" + color="white" + padding-top="0.1em" + padding-bottom="0.1em" + padding-start="0.2em" + padding-end="0.2em" + baseline-shift="0.1em" + font-family="{$body.fontset}" + font-weight="bold" + font-size="75%"> + <xsl:value-of select="$conum"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$callout.unicode.font != ''"> + <fo:inline font-family="{$callout.unicode.font}"> + <xsl:copy-of select="$comarkup"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$comarkup"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <!-- Most safe: draw a dark gray square with a white number inside --> + <xsl:otherwise> + <fo:inline background-color="#404040" + color="white" + padding-top="0.1em" + padding-bottom="0.1em" + padding-start="0.2em" + padding-end="0.2em" + baseline-shift="0.1em" + font-family="{$body.fontset}" + font-weight="bold" + font-size="75%"> + <xsl:value-of select="$conum"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/component.xsl b/3rdParty/DocBook/XSL/fo/component.xsl new file mode 100644 index 0000000..1466413 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/component.xsl @@ -0,0 +1,887 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: component.xsl 8320 2009-03-12 17:43:44Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + + +<xsl:template name="component.title"> + <xsl:param name="node" select="."/> + <xsl:param name="pagewide" select="0"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$node"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="title"> + <xsl:apply-templates select="$node" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:variable name="titleabbrev"> + <xsl:apply-templates select="$node" mode="titleabbrev.markup"/> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:choose> + <xsl:when test="ancestor::section"> + <xsl:value-of select="count(ancestor::section)+1"/> + </xsl:when> + <xsl:when test="ancestor::sect5">6</xsl:when> + <xsl:when test="ancestor::sect4">5</xsl:when> + <xsl:when test="ancestor::sect3">4</xsl:when> + <xsl:when test="ancestor::sect2">3</xsl:when> + <xsl:when test="ancestor::sect1">2</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="2" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$titleabbrev"/> + </fotex:bookmark> + </xsl:if> + + <fo:block xsl:use-attribute-sets="component.title.properties"> + <xsl:if test="$pagewide != 0"> + <!-- Doesn't work to use 'all' here since not a child of fo:flow --> + <xsl:attribute name="span">inherit</xsl:attribute> + </xsl:if> + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level"> + <xsl:value-of select="count($node/ancestor::*)"/> + </xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:value-of select="normalize-space($title)"/> + </xsl:attribute> + </xsl:if> + + <!-- Let's handle the case where a component (bibliography, for example) + occurs inside a section; will we need parameters for this? + Danger Will Robinson: using section.title.level*.properties here + runs the risk that someone will set something other than + font-size there... --> + <xsl:choose> + <xsl:when test="$level=2"> + <fo:block xsl:use-attribute-sets="section.title.level2.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=3"> + <fo:block xsl:use-attribute-sets="section.title.level3.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=4"> + <fo:block xsl:use-attribute-sets="section.title.level4.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=5"> + <fo:block xsl:use-attribute-sets="section.title.level5.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=6"> + <fo:block xsl:use-attribute-sets="section.title.level6.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <!-- not in a section: do nothing special --> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="dedication" mode="dedication"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="dedication.titlepage"/> + </fo:block> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" --> +<xsl:template match="dedication/docinfo"></xsl:template> +<xsl:template match="dedication/title"></xsl:template> +<xsl:template match="dedication/subtitle"></xsl:template> +<xsl:template match="dedication/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="acknowledgements" mode="acknowledgements"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="acknowledgements.titlepage"/> + </fo:block> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="acknowledgements"></xsl:template> +<xsl:template match="acknowledgements/info"></xsl:template> +<xsl:template match="acknowledgements/title"></xsl:template> +<xsl:template match="acknowledgements/titleabbrev"></xsl:template> +<xsl:template match="acknowledgements/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="colophon"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="colophon.titlepage"/> + </fo:block> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="colophon/title"></xsl:template> +<xsl:template match="colophon/subtitle"></xsl:template> +<xsl:template match="colophon/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="preface"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="preface.titlepage"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" + select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template> +<xsl:template match="preface/info"></xsl:template> +<xsl:template match="preface/title"></xsl:template> +<xsl:template match="preface/titleabbrev"></xsl:template> +<xsl:template match="preface/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="chapter"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="chapter.titlepage"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template> +<xsl:template match="chapter/info"></xsl:template> +<xsl:template match="chapter/title"></xsl:template> +<xsl:template match="chapter/titleabbrev"></xsl:template> +<xsl:template match="chapter/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="appendix"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="appendix.titlepage"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template> +<xsl:template match="appendix/info"></xsl:template> +<xsl:template match="appendix/title"></xsl:template> +<xsl:template match="appendix/titleabbrev"></xsl:template> +<xsl:template match="appendix/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="article"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="article.titlepage"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="article/artheader"></xsl:template> +<xsl:template match="article/articleinfo"></xsl:template> +<xsl:template match="article/info"></xsl:template> +<xsl:template match="article/title"></xsl:template> +<xsl:template match="article/subtitle"></xsl:template> +<xsl:template match="article/titleabbrev"></xsl:template> + +<xsl:template match="article/appendix"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="title"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:variable> + + <xsl:variable name="titleabbrev"> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:variable> + + <fo:block id='{$id}'> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level"> + <xsl:value-of select="count(ancestor::*)+2"/> + </xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:value-of select="normalize-space($titleabbrev)"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="{count(ancestor::*)+2}" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$titleabbrev"/> + </fotex:bookmark> + </xsl:if> + + <fo:block xsl:use-attribute-sets="article.appendix.title.properties"> + <fo:marker marker-class-name="section.head.marker"> + <xsl:choose> + <xsl:when test="$titleabbrev = ''"> + <xsl:value-of select="$title"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$titleabbrev"/> + </xsl:otherwise> + </xsl:choose> + </fo:marker> + <xsl:copy-of select="$title"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- Utility template to create a page sequence for an element --> +<xsl:template match="*" mode="page.sequence" name="page.sequence"> + <xsl:param name="content"> + <xsl:apply-templates/> + </xsl:param> + <xsl:param name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:param> + <xsl:param name="element" select="local-name(.)"/> + <xsl:param name="gentext-key" select="local-name(.)"/> + <xsl:param name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:param> + + <xsl:param name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="element" select="$element"/> + </xsl:call-template> + </xsl:param> + + <xsl:param name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="element" select="$element"/> + </xsl:call-template> + </xsl:param> + + <xsl:param name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="element" select="$element"/> + </xsl:call-template> + </xsl:param> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:value-of select="$language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:value-of select="$format"/> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:value-of select="$initial-page-number"/> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:value-of select="$force-page-count"/> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <xsl:copy-of select="$content"/> + + </fo:flow> + </fo:page-sequence> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/division.xsl b/3rdParty/DocBook/XSL/fo/division.xsl new file mode 100644 index 0000000..975d8c5 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/division.xsl @@ -0,0 +1,612 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: division.xsl 8320 2009-03-12 17:43:44Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template name="division.title"> + <xsl:param name="node" select="."/> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$node"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="title"> + <xsl:apply-templates select="$node" mode="object.title.markup"/> + </xsl:variable> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="1" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$title"/> + </fotex:bookmark> + </xsl:if> + + <fo:block keep-with-next.within-column="always" + hyphenate="false"> + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level"> + <xsl:choose> + <xsl:when test="count($node/ancestor::*) > 0"> + <xsl:value-of select="count($node/ancestor::*)"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:value-of select="normalize-space($title)"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$title"/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="set"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="preamble" + select="*[not(self::book or self::set or self::setindex)]"/> + + <xsl:variable name="content" select="book|set|setindex"/> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="$preamble"> + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$titlepage-master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}"> + <xsl:call-template name="set.titlepage"/> + </fo:block> + </fo:flow> + </fo:page-sequence> + </xsl:if> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$lot-master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + + <xsl:call-template name="set.toc"/> + </fo:flow> + </fo:page-sequence> + </xsl:if> + + <xsl:apply-templates select="$content"/> +</xsl:template> + +<xsl:template match="set/setinfo"></xsl:template> +<xsl:template match="set/title"></xsl:template> +<xsl:template match="set/subtitle"></xsl:template> +<xsl:template match="set/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="book"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="preamble" + select="title|subtitle|titleabbrev|bookinfo|info"/> + + <xsl:variable name="content" + select="node()[not(self::title or self::subtitle + or self::titleabbrev + or self::info + or self::bookinfo)]"/> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="front.cover"/> + + <xsl:if test="$preamble"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + <xsl:with-param name="content"> + <fo:block id="{$id}"> + <xsl:call-template name="book.titlepage"/> + </fo:block> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:apply-templates select="dedication" mode="dedication"/> + <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/> + + <xsl:call-template name="make.book.tocs"/> + + <xsl:apply-templates select="$content"/> + + <xsl:call-template name="back.cover"/> + +</xsl:template> + +<xsl:template match="book/bookinfo"></xsl:template> +<xsl:template match="book/info"></xsl:template> +<xsl:template match="book/title"></xsl:template> +<xsl:template match="book/subtitle"></xsl:template> +<xsl:template match="book/titleabbrev"></xsl:template> + +<!-- Placeholder templates --> +<xsl:template name="front.cover"/> +<xsl:template name="back.cover"/> + +<!-- ================================================================= --> +<xsl:template name="make.book.tocs"> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'TableofContents'"/> + <xsl:with-param name="content"> + <xsl:call-template name="division.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="contains($toc.params,'figure') and .//figure"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'ListofFigures'"/> + <xsl:with-param name="content"> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'figure'"/> + <xsl:with-param name="nodes" select=".//figure"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="contains($toc.params,'table') and .//table"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'ListofTables'"/> + <xsl:with-param name="content"> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'table'"/> + <xsl:with-param name="nodes" select=".//table"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="contains($toc.params,'example') and .//example"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'ListofExample'"/> + <xsl:with-param name="content"> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'example'"/> + <xsl:with-param name="nodes" select=".//example"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="contains($toc.params,'equation') and + .//equation[title or info/title]"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'ListofEquations'"/> + <xsl:with-param name="content"> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'equation'"/> + <xsl:with-param name="nodes" + select=".//equation[title or info/title]"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="contains($toc.params,'procedure') and + .//procedure[title or info/title]"> + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'ListofProcedures'"/> + <xsl:with-param name="content"> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'procedure'"/> + <xsl:with-param name="nodes" + select=".//procedure[title or info/title]"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> +</xsl:template> +<!-- ==================================================================== --> + +<xsl:template match="part"> + <xsl:if test="not(partintro)"> + <xsl:apply-templates select="." mode="part.titlepage.mode"/> + <xsl:call-template name="generate.part.toc"/> + </xsl:if> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="part" mode="part.titlepage.mode"> + <!-- done this way to force the context node to be the part --> + <xsl:param name="additional.content"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$titlepage-master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" + select="$titlepage-master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}"> + <xsl:call-template name="part.titlepage"/> + </fo:block> + <xsl:copy-of select="$additional.content"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="part/docinfo|partinfo"></xsl:template> +<xsl:template match="part/info"></xsl:template> +<xsl:template match="part/title"></xsl:template> +<xsl:template match="part/subtitle"></xsl:template> +<xsl:template match="part/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="generate.part.toc"> + <xsl:param name="part" select="."/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="$part"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" select="reference| + preface| + chapter| + appendix| + article| + bibliography| + glossary| + index"/> + + <xsl:if test="count($nodes) > 0 and contains($toc.params, 'toc')"> + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$lot-master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="$part" mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$part" mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + </xsl:call-template> + + <xsl:call-template name="division.toc"> + <xsl:with-param name="toc-context" select="$part"/> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="part/partintro"> + <xsl:apply-templates select=".." mode="part.titlepage.mode"> + <xsl:with-param name="additional.content"> + <xsl:if test="title"> + <xsl:call-template name="partintro.titlepage"/> + </xsl:if> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:apply-templates> + + <xsl:call-template name="generate.part.toc"> + <xsl:with-param name="part" select=".."/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="partintro/title"></xsl:template> +<xsl:template match="partintro/subtitle"></xsl:template> +<xsl:template match="partintro/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="book" mode="division.number"> + <xsl:number from="set" count="book" format="1."/> +</xsl:template> + +<xsl:template match="part" mode="division.number"> + <xsl:number from="book" count="part" format="I."/> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/docbook.xsl b/3rdParty/DocBook/XSL/fo/docbook.xsl new file mode 100644 index 0000000..aeff84b --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/docbook.xsl @@ -0,0 +1,333 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" + exclude-result-prefixes="db ng exsl" + version='1.0'> + +<!-- It is important to use indent="no" here, otherwise verbatim --> +<!-- environments get broken by indented tags...at least when the --> +<!-- callout extension is used...at least with some processors --> +<xsl:output method="xml" indent="no"/> + +<!-- ******************************************************************** + $Id: docbook.xsl 8414 2009-04-18 22:40:23Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:include href="../VERSION"/> +<xsl:include href="param.xsl"/> +<xsl:include href="../lib/lib.xsl"/> +<xsl:include href="../common/l10n.xsl"/> +<xsl:include href="../common/common.xsl"/> +<xsl:include href="../common/utility.xsl"/> +<xsl:include href="../common/labels.xsl"/> +<xsl:include href="../common/titles.xsl"/> +<xsl:include href="../common/subtitles.xsl"/> +<xsl:include href="../common/gentext.xsl"/> +<xsl:include href="../common/olink.xsl"/> +<xsl:include href="../common/targets.xsl"/> +<xsl:include href="../common/pi.xsl"/> +<xsl:include href="autotoc.xsl"/> +<xsl:include href="autoidx.xsl"/> +<xsl:include href="lists.xsl"/> +<xsl:include href="callout.xsl"/> +<xsl:include href="verbatim.xsl"/> +<xsl:include href="graphics.xsl"/> +<xsl:include href="xref.xsl"/> +<xsl:include href="formal.xsl"/> +<xsl:include href="table.xsl"/> +<xsl:include href="htmltbl.xsl"/> +<xsl:include href="sections.xsl"/> +<xsl:include href="inline.xsl"/> +<xsl:include href="footnote.xsl"/> +<xsl:include href="fo.xsl"/> +<xsl:include href="fo-rtf.xsl"/> +<xsl:include href="info.xsl"/> +<xsl:include href="keywords.xsl"/> +<xsl:include href="division.xsl"/> +<xsl:include href="index.xsl"/> +<xsl:include href="toc.xsl"/> +<xsl:include href="refentry.xsl"/> +<xsl:include href="math.xsl"/> +<xsl:include href="admon.xsl"/> +<xsl:include href="component.xsl"/> +<xsl:include href="biblio.xsl"/> +<xsl:include href="biblio-iso690.xsl"/> +<xsl:include href="glossary.xsl"/> +<xsl:include href="block.xsl"/> +<xsl:include href="task.xsl"/> +<xsl:include href="qandaset.xsl"/> +<xsl:include href="synop.xsl"/> +<xsl:include href="titlepage.xsl"/> +<xsl:include href="titlepage.templates.xsl"/> +<xsl:include href="pagesetup.xsl"/> +<xsl:include href="pi.xsl"/> +<xsl:include href="spaces.xsl"/> +<xsl:include href="ebnf.xsl"/> +<xsl:include href="../html/chunker.xsl"/> +<xsl:include href="annotations.xsl"/> +<xsl:include href="../common/stripns.xsl"/> + +<xsl:include href="fop.xsl"/> +<xsl:include href="fop1.xsl"/> +<xsl:include href="passivetex.xsl"/> +<xsl:include href="xep.xsl"/> +<xsl:include href="axf.xsl"/> +<xsl:include href="ptc.xsl"/> + +<xsl:param name="stylesheet.result.type" select="'fo'"/> + +<!-- ==================================================================== --> + +<xsl:key name="id" match="*" use="@id|@xml:id"/> + +<!-- ==================================================================== --> + +<xsl:template match="*"> + <xsl:message> + <xsl:text>Element </xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text> in namespace '</xsl:text> + <xsl:value-of select="namespace-uri(.)"/> + <xsl:text>' encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> + </xsl:message> + + <fo:block color="red"> + <xsl:text><</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>></xsl:text> + <xsl:apply-templates/> + <xsl:text></</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>></xsl:text> + </fo:block> +</xsl:template> + +<!-- Update this list if new root elements supported --> +<xsl:variable name="root.elements" select="' appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex '"/> + +<xsl:template match="/"> + <!-- * Get a title for current doc so that we let the user --> + <!-- * know what document we are processing at this point. --> + <xsl:variable name="doc.title"> + <xsl:call-template name="get.doc.title"/> + </xsl:variable> + <xsl:choose> + <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, + toss the namespace and continue. Use the docbook5 namespaced + stylesheets for DocBook5 if you don't want to use this feature.--> + <xsl:when test="$exsl.node.set.available != 0 + and (*/self::ng:* or */self::db:*)"> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title"/> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>stripped namespace before processing</xsl:text> + </xsl:with-param> + </xsl:call-template> + <xsl:variable name="nons"> + <xsl:apply-templates mode="stripNS"/> + </xsl:variable> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title"/> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>processing stripped document</xsl:text> + </xsl:with-param> + </xsl:call-template> + <xsl:apply-templates select="exsl:node-set($nons)"/> + </xsl:when> + <!-- Can't process unless namespace removed --> + <xsl:when test="*/self::ng:* or */self::db:*"> + <xsl:message terminate="yes"> + <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text> + <xsl:text> cannot proceed.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:variable name="root.element" select="key('id', $rootid)"/> + <xsl:choose> + <xsl:when test="count($root.element) = 0"> + <xsl:message terminate="yes"> + <xsl:text>ID '</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>' not found in document.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:when test="not(contains($root.elements, concat(' ', local-name($root.element), ' ')))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: Document root element ($rootid=</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>) for FO output </xsl:text> + <xsl:text>must be one of the following elements:</xsl:text> + <xsl:value-of select="$root.elements"/> + </xsl:message> + </xsl:when> + <!-- Otherwise proceed --> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="$root.element" + mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="$root.element" + mode="process.root"/> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <!-- Otherwise process the document root element --> + <xsl:otherwise> + <xsl:variable name="document.element" select="*[1]"/> + <xsl:choose> + <xsl:when test="not(contains($root.elements, + concat(' ', local-name($document.element), ' ')))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: Document root element for FO output </xsl:text> + <xsl:text>must be one of the following elements:</xsl:text> + <xsl:value-of select="$root.elements"/> + </xsl:message> + </xsl:when> + <!-- Otherwise proceed --> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="/" + mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="/" + mode="process.root"/> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="process.root"> + <xsl:variable name="document.element" select="self::*"/> + + <xsl:call-template name="root.messages"/> + + <xsl:variable name="title"> + <xsl:choose> + <xsl:when test="$document.element/title[1]"> + <xsl:value-of select="$document.element/title[1]"/> + </xsl:when> + <xsl:otherwise>[could not find document title]</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Include all id values in XEP output --> + <xsl:if test="$xep.extensions != 0"> + <xsl:processing-instruction + name="xep-pdf-drop-unused-destinations">false</xsl:processing-instruction> + </xsl:if> + + <fo:root xsl:use-attribute-sets="root.properties"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="target" select="/*[1]"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:if test="$xep.extensions != 0"> + <xsl:call-template name="xep-pis"/> + <xsl:call-template name="xep-document-information"/> + </xsl:if> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-document-information"/> + </xsl:if> + + <xsl:call-template name="setup.pagemasters"/> + + <xsl:if test="$fop.extensions != 0"> + <xsl:apply-templates select="$document.element" mode="fop.outline"/> + </xsl:if> + + <xsl:if test="$fop1.extensions != 0"> + <xsl:call-template name="fop1-document-information"/> + <xsl:variable name="bookmarks"> + <xsl:apply-templates select="$document.element" + mode="fop1.outline"/> + </xsl:variable> + <xsl:if test="string($bookmarks) != ''"> + <fo:bookmark-tree> + <xsl:copy-of select="$bookmarks"/> + </fo:bookmark-tree> + </xsl:if> + </xsl:if> + + <xsl:if test="$xep.extensions != 0"> + <xsl:variable name="bookmarks"> + <xsl:apply-templates select="$document.element" mode="xep.outline"/> + </xsl:variable> + <xsl:if test="string($bookmarks) != ''"> + <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions"> + <xsl:copy-of select="$bookmarks"/> + </rx:outline> + </xsl:if> + </xsl:if> + + <xsl:if test="$arbortext.extensions != 0 and $ati.xsl11.bookmarks != 0"> + <xsl:variable name="bookmarks"> + <xsl:apply-templates select="$document.element" + mode="ati.xsl11.bookmarks"/> + </xsl:variable> + <xsl:if test="string($bookmarks) != ''"> + <fo:bookmark-tree> + <xsl:copy-of select="$bookmarks"/> + </fo:bookmark-tree> + </xsl:if> + </xsl:if> + + <xsl:apply-templates select="$document.element"/> + </fo:root> +</xsl:template> + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <xsl:message> + <xsl:text>Making </xsl:text> + <xsl:value-of select="$page.orientation"/> + <xsl:text> pages on </xsl:text> + <xsl:value-of select="$paper.type"/> + <xsl:text> paper (</xsl:text> + <xsl:value-of select="$page.width"/> + <xsl:text>x</xsl:text> + <xsl:value-of select="$page.height"/> + <xsl:text>)</xsl:text> + </xsl:message> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/ebnf.xsl b/3rdParty/DocBook/XSL/fo/ebnf.xsl new file mode 100644 index 0000000..09dcb11 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/ebnf.xsl @@ -0,0 +1,325 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" + exclude-result-prefixes="doc" + version='1.0'> + +<!-- ******************************************************************** + $Id: ebnf.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<doc:reference xmlns=""> +<referenceinfo> +<releaseinfo role="meta"> +$Id: ebnf.xsl 6910 2007-06-28 23:23:30Z xmldoc $ +</releaseinfo> +<author><surname>Walsh</surname> +<firstname>Norman</firstname></author> +<copyright><year>1999</year><year>2000</year><year>2001</year> +<holder>Norman Walsh</holder> +</copyright> +</referenceinfo> +<title>HTML EBNF Reference</title> + +<partintro> +<section><title>Introduction</title> + +<para>This is technical reference documentation for the DocBook XSL +Stylesheets; it documents (some of) the parameters, templates, and +other elements of the stylesheets.</para> + +<para>This reference describes the templates and parameters relevant +to formatting EBNF markup.</para> + +<para>This is not intended to be <quote>user</quote> documentation. +It is provided for developers writing customization layers for the +stylesheets, and for anyone who's interested in <quote>how it +works</quote>.</para> + +<para>Although I am trying to be thorough, this documentation is known +to be incomplete. Don't forget to read the source, too :-)</para> +</section> +</partintro> +</doc:reference> + +<!-- ==================================================================== --> + +<xsl:template match="productionset"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:choose> + <xsl:when test="title"> + <fo:block id="{$id}" xsl:use-attribute-sets="formal.object.properties"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="'before'"/> + </xsl:call-template> + + <fo:table table-layout="fixed" width="100%"> + <fo:table-column column-number="1" column-width="3%"/> + <fo:table-column column-number="2" column-width="15%"/> + <fo:table-column column-number="3" column-width="5%"/> + <fo:table-column column-number="4" column-width="52%"/> + <fo:table-column column-number="5" column-width="25%"/> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="production|productionrecap"/> + </fo:table-body> + </fo:table> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:table id="{$id}" table-layout="fixed" width="100%"> + <fo:table-column column-number="1" column-width="3%"/> + <fo:table-column column-number="2" column-width="15%"/> + <fo:table-column column-number="3" column-width="5%"/> + <fo:table-column column-number="4" column-width="52%"/> + <fo:table-column column-number="5" column-width="25%"/> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="production|productionrecap"/> + </fo:table-body> + </fo:table> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="productionset/title"> + <!-- suppressed --> +</xsl:template> + +<xsl:template match="production"> + <xsl:param name="recap" select="false()"/> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <fo:table-row> + <fo:table-cell> + <fo:block text-align="start"> + <xsl:text>[</xsl:text> + <xsl:number count="production" level="any"/> + <xsl:text>]</xsl:text> + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="end"> + <xsl:choose> + <xsl:when test="$recap"> + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="xref.properties"> + <xsl:apply-templates select="lhs"/> + </fo:basic-link> + </xsl:when> + <xsl:otherwise> + <fo:wrapper id="{$id}"> + <xsl:apply-templates select="lhs"/> + </fo:wrapper> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="center"> + <xsl:copy-of select="$ebnf.assignment"/> + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block> + <xsl:apply-templates select="rhs"/> + <xsl:copy-of select="$ebnf.statement.terminator"/> + </fo:block> + </fo:table-cell> + <fo:table-cell border-start-width="3pt"> + <fo:block text-align="start"> + <xsl:choose> + <xsl:when test="rhs/lineannotation|constraint"> + <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/> + <xsl:apply-templates select="constraint"/> + </xsl:when> + <xsl:otherwise> + <xsl:text> </xsl:text> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </fo:table-cell> + </fo:table-row> +</xsl:template> + +<xsl:template match="productionrecap"> + <xsl:variable name="targets" select="key('id',@linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:if test="count($targets)=0"> + <xsl:message> + <xsl:text>Error: no ID for productionrecap linkend: </xsl:text> + <xsl:value-of select="@linkend"/> + <xsl:text>.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="count($targets)>1"> + <xsl:message> + <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text> + <xsl:value-of select="@linkend"/> + <xsl:text>.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:apply-templates select="$target"> + <xsl:with-param name="recap" select="true()"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="lhs"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="rhs"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="nonterminal"> + <xsl:variable name="linkend"> + <xsl:call-template name="xpointer.idref"> + <xsl:with-param name="xpointer" select="@def"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="check.id.unique"> + <xsl:with-param name="linkend" select="$linkend"/> + </xsl:call-template> + + <xsl:call-template name="check.idref.targets"> + <xsl:with-param name="linkend" select="$linkend"/> + <xsl:with-param name="element-list">production</xsl:with-param> + </xsl:call-template> + + <!-- If you don't provide content, you can't point outside this doc. --> + <xsl:choose> + <xsl:when test="*|text()"><!--nop--></xsl:when> + <xsl:otherwise> + <xsl:if test="$linkend = ''"> + <xsl:message> + <xsl:text>Non-terminals with no content must point to </xsl:text> + <xsl:text>production elements in the current document.</xsl:text> + </xsl:message> + <xsl:message> + <xsl:text>Invalid xpointer for empty nt: </xsl:text> + <xsl:value-of select="@def"/> + </xsl:message> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + + <xsl:variable name="href"> + <xsl:choose> + <xsl:when test="$linkend != ''"> + <xsl:variable name="targets" select="key('id',$linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@def"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:basic-link internal-destination="{$href}" + xsl:use-attribute-sets="xref.properties"> + <xsl:choose> + <xsl:when test="*|text()"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$linkend != ''"> + <xsl:variable name="targets" select="key('id',$linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:apply-templates select="$target/lhs"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>???</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </fo:basic-link> +</xsl:template> + +<xsl:template match="rhs/lineannotation"> + <!--nop--> +</xsl:template> + +<xsl:template match="rhs/lineannotation" mode="rhslo"> + <xsl:text>/* </xsl:text> + <xsl:apply-templates/> + <xsl:text> */</xsl:text> +</xsl:template> + +<xsl:template match="constraint"> + <xsl:call-template name="check.id.unique"> + <xsl:with-param name="linkend" select="@linkend"/> + </xsl:call-template> + + <xsl:call-template name="check.idref.targets"> + <xsl:with-param name="linkend" select="@linkend"/> + <xsl:with-param name="element-list">constraintdef</xsl:with-param> + </xsl:call-template> + + <xsl:variable name="href"> + <xsl:variable name="targets" select="key('id',@linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="preceding-sibling::constraint"> + <fo:inline linefeed-treatment="preserve">
</fo:inline> + </xsl:if> + <xsl:text>[ </xsl:text> + + <xsl:choose> + <xsl:when test="@role"> + <xsl:value-of select="@role"/> + <xsl:text>: </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="targets" select="key('id',@linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:if test="$target/@role"> + <xsl:value-of select="$target/@role"/> + <xsl:text>: </xsl:text> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + + <fo:basic-link internal-destination="{$href}" + xsl:use-attribute-sets="xref.properties"> + <xsl:variable name="targets" select="key('id',@linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:apply-templates select="$target" mode="title.markup"/> + </fo:basic-link> + <xsl:text> ]</xsl:text> +</xsl:template> + +<xsl:template match="constraintdef"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <fo:block id="{$id}"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="constraintdef/title"> + <fo:block font-weight="bold"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/fo-rtf.xsl b/3rdParty/DocBook/XSL/fo/fo-rtf.xsl new file mode 100644 index 0000000..4aa0f32 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/fo-rtf.xsl @@ -0,0 +1,154 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:exsl="http://exslt.org/common" + xmlns:set="http://exslt.org/sets" + exclude-result-prefixes="exsl set" + version="1.0"> + +<!-- ******************************************************************** + $Id: fo-rtf.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- This module contains templates that match against FO nodes. It is used + to post-process result tree fragments for some sorts of cleanup. + These templates can only ever be fired by a processor that supports + exslt:node-set(). --> + +<!-- ==================================================================== --> + +<!-- insert.fo.fnum mode templates insert a particular RTF at the beginning + of the first paragraph in the primary RTF. In fact, they are inserting + a footnote-number, so we tinker a few other things too, like spacing and + font-sizes. --> + +<xsl:template match="/" mode="insert.fo.fnum"> + <xsl:param name="mark" select="'?'"/> + <xsl:apply-templates mode="insert.fo.fnum"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="*" mode="insert.fo.fnum"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates mode="insert.fo.fnum"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> + </xsl:copy> +</xsl:template> + +<xsl:template match="fo:block" mode="insert.fo.fnum"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:choose> + <xsl:when test="starts-with(name(.), 'space-before')"/> + <xsl:when test="starts-with(name(.), 'space-after')"/> + <xsl:when test="starts-with(name(.), 'font-size')"/> + <xsl:otherwise> + <xsl:copy-of select="."/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:if test="not(preceding::fo:block)"> + <xsl:copy-of select="$mark"/> + </xsl:if> + <xsl:apply-templates mode="insert.fo.fnum"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> + </xsl:copy> +</xsl:template> + +<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.fnum"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy/> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- insert.fo.block mode templates insert a particular RTF at the beginning + of the first paragraph in the primary RTF. --> + +<xsl:template match="/" mode="insert.fo.block"> + <xsl:param name="mark" select="'?'"/> + <xsl:apply-templates mode="insert.fo.block"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="*" mode="insert.fo.block"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates mode="insert.fo.block"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> + </xsl:copy> +</xsl:template> + +<xsl:template match="fo:block" mode="insert.fo.block"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:if test="not(preceding::fo:block)"> + <xsl:copy-of select="$mark"/> + </xsl:if> + <xsl:apply-templates mode="insert.fo.block"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> + </xsl:copy> +</xsl:template> + +<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.block"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy/> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- insert.fo.text mode templates insert a particular RTF at the beginning + of the first text-node in the primary RTF. --> + +<xsl:template match="/" mode="insert.fo.text"> + <xsl:param name="mark" select="'?'"/> + <xsl:apply-templates mode="insert.fo.text"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="*" mode="insert.fo.text"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates mode="insert.fo.text"> + <xsl:with-param name="mark" select="$mark"/> + </xsl:apply-templates> + </xsl:copy> +</xsl:template> + +<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.text"> + <xsl:param name="mark" select="'?'"/> + + <xsl:if test="not(preceding::text())"> + <xsl:copy-of select="$mark"/> + </xsl:if> + + <xsl:copy/> +</xsl:template> + +<xsl:template match="processing-instruction()|comment()" mode="insert.fo.text"> + <xsl:param name="mark" select="'?'"/> + <xsl:copy/> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/fo.xsl b/3rdParty/DocBook/XSL/fo/fo.xsl new file mode 100644 index 0000000..854098f --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/fo.xsl @@ -0,0 +1,117 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: fo.xsl 8287 2009-03-06 23:53:33Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- These variables set the margin-left or -right attribute value for FO output based on + the writing-mode specified in the gentext file for the document's lang. --> + +<xsl:param name="direction.align.start"> + <xsl:choose> + <!-- FOP does not support writing-mode="rl-tb" --> + <xsl:when test="$fop.extensions != 0">left</xsl:when> + <xsl:when test="$fop1.extensions != 0">left</xsl:when> + <xsl:when test="starts-with($writing.mode, 'lr')">left</xsl:when> + <xsl:when test="starts-with($writing.mode, 'rl')">right</xsl:when> + <xsl:when test="starts-with($writing.mode, 'tb')">top</xsl:when> + <xsl:otherwise>left</xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:param name="direction.align.end"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0">right</xsl:when> + <xsl:when test="$fop1.extensions != 0">right</xsl:when> + <xsl:when test="starts-with($writing.mode, 'lr')">right</xsl:when> + <xsl:when test="starts-with($writing.mode, 'rl')">left</xsl:when> + <xsl:when test="starts-with($writing.mode, 'tb')">bottom</xsl:when> + <xsl:otherwise>right</xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:param name="direction.mode"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0 and + starts-with($writing.mode, 'rl')"> + <xsl:message>WARNING: FOP does not support right-to-left writing-mode</xsl:message> + <xsl:text>lr-tb</xsl:text> + </xsl:when> + <xsl:when test="$fop1.extensions != 0 and + starts-with($writing.mode, 'rl')"> + <xsl:message>WARNING: FOP does not support right-to-left writing-mode</xsl:message> + <xsl:text>lr-tb</xsl:text> + </xsl:when> + <xsl:when test="starts-with($writing.mode, 'lr')">lr-tb</xsl:when> + <xsl:when test="starts-with($writing.mode, 'rl')">rl-tb</xsl:when> + <xsl:when test="starts-with($writing.mode, 'tb')">tb-rl</xsl:when> + <xsl:otherwise>lr-tb</xsl:otherwise> + </xsl:choose> +</xsl:param> + + +<xsl:template name="anchor"> + <xsl:param name="node" select="."/> + <xsl:param name="conditional" select="1"/> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$node"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id"> + <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute> + </xsl:if> +</xsl:template> + +<xsl:template name="dingbat"> + <xsl:param name="dingbat">bullet</xsl:param> + <xsl:variable name="symbol"> + <xsl:choose> + <xsl:when test="$dingbat='bullet'">o</xsl:when> + <xsl:when test="$dingbat='copyright'">©</xsl:when> + <xsl:when test="$dingbat='trademark'">™</xsl:when> + <xsl:when test="$dingbat='trade'">™</xsl:when> + <xsl:when test="$dingbat='registered'">®</xsl:when> + <xsl:when test="$dingbat='service'">(SM)</xsl:when> + <xsl:when test="$dingbat='ldquo'">"</xsl:when> + <xsl:when test="$dingbat='rdquo'">"</xsl:when> + <xsl:when test="$dingbat='lsquo'">'</xsl:when> + <xsl:when test="$dingbat='rsquo'">'</xsl:when> + <xsl:when test="$dingbat='em-dash'">—</xsl:when> + <xsl:when test="$dingbat='en-dash'">-</xsl:when> + <xsl:otherwise>o</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$dingbat.font.family = ''"> + <xsl:copy-of select="$symbol"/> + </xsl:when> + <xsl:otherwise> + <fo:inline font-family="{$dingbat.font.family}"> + <xsl:copy-of select="$symbol"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="href.target"> + <xsl:param name="context" select="."/> + <xsl:param name="object" select="."/> + <xsl:text>#</xsl:text> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$object"/> + </xsl:call-template> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/footnote.xsl b/3rdParty/DocBook/XSL/fo/footnote.xsl new file mode 100644 index 0000000..cc0242d --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/footnote.xsl @@ -0,0 +1,220 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:exsl="http://exslt.org/common" + exclude-result-prefixes="exsl xlink" + version='1.0'> + +<!-- ******************************************************************** + $Id: footnote.xsl 8359 2009-03-20 18:42:06Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:template name="format.footnote.mark"> + <xsl:param name="mark" select="'?'"/> + <fo:inline xsl:use-attribute-sets="footnote.mark.properties"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0"> + <xsl:attribute name="vertical-align">super</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="baseline-shift">super</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:copy-of select="$mark"/> + </fo:inline> +</xsl:template> + +<xsl:template match="footnote"> + <xsl:choose> + <xsl:when test="ancestor::table or ancestor::informaltable"> + <xsl:call-template name="format.footnote.mark"> + <xsl:with-param name="mark"> + <xsl:apply-templates select="." mode="footnote.number"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <fo:footnote> + <fo:inline> + <xsl:call-template name="format.footnote.mark"> + <xsl:with-param name="mark"> + <xsl:apply-templates select="." mode="footnote.number"/> + </xsl:with-param> + </xsl:call-template> + </fo:inline> + <fo:footnote-body xsl:use-attribute-sets="footnote.properties"> + <xsl:apply-templates/> + </fo:footnote-body> + </fo:footnote> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="footnoteref"> + <xsl:variable name="footnote" select="key('id',@linkend)"/> + + <xsl:if test="not(local-name($footnote) = 'footnote')"> + <xsl:message terminate="yes"> +ERROR: A footnoteref element has a linkend that points to an element that is not a footnote. +Typically this happens when an id attribute is accidentally applied to the child of a footnote element. +target element: <xsl:value-of select="local-name($footnote)"/> +linkend/id: <xsl:value-of select="@linkend"/> + </xsl:message> + </xsl:if> + + <xsl:call-template name="format.footnote.mark"> + <xsl:with-param name="mark"> + <xsl:apply-templates select="$footnote" mode="footnote.number"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="footnote" mode="footnote.number"> + <xsl:choose> + <xsl:when test="string-length(@label) != 0"> + <xsl:value-of select="@label"/> + </xsl:when> + <xsl:when test="ancestor::table or ancestor::informaltable"> + <xsl:variable name="tfnum"> + <xsl:number level="any" from="table|informaltable" format="1"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum"> + <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number level="any" from="table|informaltable" + format="{$table.footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="fnum"> + <!-- * Determine the footnote number to display for this footnote, --> + <!-- * by counting all foonotes, ulinks, and any elements that have --> + <!-- * an xlink:href attribute that meets the following criteria: --> + <!-- * --> + <!-- * - the content of the element is not a URI that is the same --> + <!-- * URI as the value of the href attribute --> + <!-- * - the href attribute is not an internal ID reference (does --> + <!-- * not start with a hash sign) --> + <!-- * - the href is not part of an olink reference (the element --> + <!-- * - does not have an xlink:role attribute that indicates it is --> + <!-- * an olink, and the hrf does not contain a hash sign) --> + <!-- * - the element either has no xlink:type attribute or has --> + <!-- * an xlink:type attribute whose value is 'simple' --> + <!-- * --> + <!-- * Note that hyperlinks are counted only if both the value of --> + <!-- * ulink.footnotes is non-zero and the value of ulink.show is --> + <!-- * non-zero --> + <!-- FIXME: list in @from is probably not complete --> + <xsl:number level="any" + from="chapter|appendix|preface|article|refentry|bibliography" + count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)] + |ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::footnote)][$ulink.show != 0] + |*[node()][@xlink:href][not(@xlink:href = .)][not(starts-with(@xlink:href,'#'))] + [not(contains(@xlink:href,'#') and @xlink:role = $xolink.role)] + [not(@xlink:type) or @xlink:type='simple'] + [not(ancestor::footnote)][$ulink.footnotes != 0][$ulink.show != 0] + " + format="1"/> + </xsl:variable> + <xsl:choose> + <xsl:when test="string-length($footnote.number.symbols) >= $fnum"> + <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number value="$fnum" format="{$footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="footnote.body.number"> + <xsl:variable name="footnote.mark"> + <xsl:call-template name="format.footnote.mark"> + <xsl:with-param name="mark"> + <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="fo"> + <xsl:apply-templates select="."/> + </xsl:variable> + + <xsl:variable name="fo-nodes" select="exsl:node-set($fo)"/> + + <xsl:choose> + <xsl:when test="$fo-nodes//fo:block"> + <xsl:apply-templates select="$fo-nodes" mode="insert.fo.fnum"> + <xsl:with-param name="mark" select="$footnote.mark"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$fo-nodes" mode="insert.fo.text"> + <xsl:with-param name="mark" select="$footnote.mark"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="footnote/para[1] + |footnote/simpara[1] + |footnote/formalpara[1]" + priority="2"> + <!-- this only works if the first thing in a footnote is a para, --> + <!-- which is ok, because it usually is. --> + <fo:block> + <xsl:call-template name="format.footnote.mark"> + <xsl:with-param name="mark"> + <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/> + </xsl:with-param> + </xsl:call-template> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="footnote" mode="table.footnote.mode"> + <xsl:choose> + <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'"> + <fo:block xsl:use-attribute-sets="table.footnote.properties"> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + + <xsl:when test="$exsl.node.set.available != 0"> + <fo:block xsl:use-attribute-sets="table.footnote.properties"> + <xsl:apply-templates select="*[1]" mode="footnote.body.number"/> + <xsl:apply-templates select="*[position() > 1]"/> + </fo:block> + </xsl:when> + + <xsl:otherwise> + <xsl:message> + <xsl:text>Warning: footnote number may not be generated </xsl:text> + <xsl:text>correctly; </xsl:text> + <xsl:value-of select="local-name(*[1])"/> + <xsl:text> unexpected as first child of footnote.</xsl:text> + </xsl:message> + <fo:block xsl:use-attribute-sets="table.footnote.properties"> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/fop.xsl b/3rdParty/DocBook/XSL/fo/fop.xsl new file mode 100644 index 0000000..c82a48d --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/fop.xsl @@ -0,0 +1,93 @@ +<?xml version='1.0' encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xml.apache.org/fop/extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: fop.xsl 7531 2007-10-17 18:06:49Z dcramer $ + ******************************************************************** + (c) Stephane Bline Peregrine Systems 2001 + Driver file to allow pdf bookmarking (based on fop implementation). + ******************************************************************** --> +<!-- +In PDF bookmarks can't be used characters with code>255. This version of file +translates characters with code>255 back to ASCII. + + Pavel Zampach (zampach@volny.cz) +--> + +<xsl:variable name="a-dia" select= +"'āăąćĉċčďđēĕėęěœĝğġģĥħĩīĭįıĵķĺļľŀłńņňŋōŏőŕŗřśŝşšţťŧũūŭůűųŵŷźżžĀĂĄĆĈĊČĎĐĒĔĖĘĚŒĜĞĠĢĤĦĨĪĬĮİĴĶĹĻĽĿŁŃŅŇŊŌŎŐŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ'"/> +<xsl:variable name="a-asc" select= +"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/> + +<xsl:template match="*" mode="fop.outline"> + <xsl:variable name="id"> + <xsl:value-of select="(@id|@xml:id)[1]"/> + </xsl:variable> + <xsl:if test="$id != ''"> + <fox:destination internal-destination="{$id}"/> + </xsl:if> + <xsl:apply-templates select="*" mode="fop.outline"/> +</xsl:template> + +<xsl:template match="set|book|part|reference|preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry + |sect1|sect2|sect3|sect4|sect5|section" + mode="fop.outline"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="bookmark-label"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:variable> + + <!-- Put the root element bookmark at the same level as its children --> + <!-- If the object is a set or book, generate a bookmark for the toc --> + + <xsl:choose> + <xsl:when test="self::index and $generate.index = 0"/> + <xsl:when test="parent::*"> + <fox:outline internal-destination="{$id}"> + <fox:label> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> + </fox:label> + <xsl:apply-templates select="*" mode="fop.outline"/> + </fox:outline> + </xsl:when> + <xsl:otherwise> + <fox:outline internal-destination="{$id}"> + <fox:label> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> + </fox:label> + </fox:outline> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (book|part|reference|preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry + |sect1|sect2|sect3|sect4|sect5|section)"> + <fox:outline internal-destination="toc...{$id}"> + <fox:label> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </fox:label> + </fox:outline> + </xsl:if> + <xsl:apply-templates select="*" mode="fop.outline"/> + </xsl:otherwise> + </xsl:choose> + <fox:destination internal-destination="{$id}"/> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/fop1.xsl b/3rdParty/DocBook/XSL/fo/fop1.xsl new file mode 100644 index 0000000..e44eb2a --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/fop1.xsl @@ -0,0 +1,188 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: fop1.xsl 8418 2009-04-27 17:10:33Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:variable name="bookmarks.state"> + <xsl:choose> + <xsl:when test="$bookmarks.collapse != 0">hide</xsl:when> + <xsl:otherwise>show</xsl:otherwise> + </xsl:choose> +</xsl:variable> + +<xsl:template match="*" mode="fop1.outline"> + <xsl:apply-templates select="*" mode="fop1.outline"/> +</xsl:template> + +<xsl:template match="set|book|part|reference| + preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry + |sect1|sect2|sect3|sect4|sect5|section" + mode="fop1.outline"> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="bookmark-label"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:variable> + + <!-- Put the root element bookmark at the same level as its children --> + <!-- If the object is a set or book, generate a bookmark for the toc --> + + <xsl:choose> + <xsl:when test="self::index and $generate.index = 0"/> + <xsl:when test="parent::*"> + <fo:bookmark internal-destination="{$id}"> + <xsl:attribute name="starting-state"> + <xsl:value-of select="$bookmarks.state"/> + </xsl:attribute> + <fo:bookmark-title> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> + </fo:bookmark-title> + <xsl:apply-templates select="*" mode="fop1.outline"/> + </fo:bookmark> + </xsl:when> + <xsl:otherwise> + <fo:bookmark internal-destination="{$id}"> + <xsl:attribute name="starting-state"> + <xsl:value-of select="$bookmarks.state"/> + </xsl:attribute> + <fo:bookmark-title> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> + </fo:bookmark-title> + </fo:bookmark> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (book|part|reference|preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry + |sect1|sect2|sect3|sect4|sect5|section)"> + <fo:bookmark internal-destination="toc...{$id}"> + <fo:bookmark-title> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </fo:bookmark-title> + </fo:bookmark> + </xsl:if> + <xsl:apply-templates select="*" mode="fop1.outline"/> + </xsl:otherwise> + </xsl:choose> +<!-- + <fo:bookmark internal-destination="{$id}"/> +--> +</xsl:template> + +<!-- Metadata support ("Document Properties" in Adobe Reader) --> +<xsl:template name="fop1-document-information"> + <xsl:variable name="authors" select="(//author|//editor|//corpauthor|//authorgroup)[1]"/> + + <xsl:variable name="title"> + <xsl:apply-templates select="/*[1]" mode="label.markup"/> + <xsl:apply-templates select="/*[1]" mode="title.markup"/> + <xsl:variable name="subtitle"> + <xsl:apply-templates select="/*[1]" mode="subtitle.markup"/> + </xsl:variable> + <xsl:if test="$subtitle !=''"> + <xsl:text> - </xsl:text> + <xsl:value-of select="$subtitle"/> + </xsl:if> + </xsl:variable> + + <fo:declarations> + <x:xmpmeta xmlns:x="adobe:ns:meta/"> + <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <!-- Dublin Core properties go here --> + + <!-- Title --> + <dc:title><xsl:value-of select="normalize-space($title)"/></dc:title> + + <!-- Author --> + <xsl:if test="$authors"> + <xsl:variable name="author"> + <xsl:choose> + <xsl:when test="$authors[self::authorgroup]"> + <xsl:call-template name="person.name.list"> + <xsl:with-param name="person.list" + select="$authors/*[self::author|self::corpauthor| + self::othercredit|self::editor]"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$authors[self::corpauthor]"> + <xsl:value-of select="$authors"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"> + <xsl:with-param name="node" select="$authors"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <dc:creator><xsl:value-of select="normalize-space($author)"/></dc:creator> + </xsl:if> + + <!-- Subject --> + <xsl:if test="//subjectterm"> + <dc:description> + <xsl:for-each select="//subjectterm"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </dc:description> + </xsl:if> + </rdf:Description> + + <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/"> + <!-- PDF properties go here --> + + <!-- Keywords --> + <xsl:if test="//keyword"> + <pdf:Keywords> + <xsl:for-each select="//keyword"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </pdf:Keywords> + </xsl:if> + </rdf:Description> + + <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> + <!-- XMP properties go here --> + + <!-- Creator Tool --> + <xmp:CreatorTool>DocBook XSL Stylesheets with Apache FOP</xmp:CreatorTool> + </rdf:Description> + + </rdf:RDF> + </x:xmpmeta> + </fo:declarations> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/formal.xsl b/3rdParty/DocBook/XSL/fo/formal.xsl new file mode 100644 index 0000000..5c602b9 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/formal.xsl @@ -0,0 +1,618 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: formal.xsl 8417 2009-04-24 16:20:18Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- formal.object creates a basic block containing the + result of processing the object, including its title + and any keep-together properties. + The template calling formal.object may wrap these results in a + float or pgwide block. --> + +<xsl:template name="formal.object"> + <xsl:param name="placement" select="'before'"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="content"> + <xsl:if test="$placement = 'before'"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:if> + <xsl:apply-templates/> + <xsl:if test="$placement != 'before'"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:if> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:choose> + <!-- tables have their own templates and + are not handled by formal.object --> + <xsl:when test="self::figure"> + <fo:block id="{$id}" + xsl:use-attribute-sets="figure.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="self::example"> + <fo:block id="{$id}" + xsl:use-attribute-sets="example.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="self::equation"> + <fo:block id="{$id}" + xsl:use-attribute-sets="equation.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="self::procedure"> + <fo:block id="{$id}" + xsl:use-attribute-sets="procedure.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="formal.object.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="formal.object.heading"> + <xsl:param name="object" select="."/> + <xsl:param name="placement" select="'before'"/> + + <fo:block xsl:use-attribute-sets="formal.title.properties"> + <xsl:choose> + <xsl:when test="$placement = 'before'"> + <xsl:attribute + name="keep-with-next.within-column">always</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute + name="keep-with-previous.within-column">always</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="$object" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </fo:block> +</xsl:template> + +<xsl:template name="informal.object"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <!-- Some don't have a pgwide attribute, so may use a PI --> + <xsl:variable name="pgwide.pi"> + <xsl:call-template name="pi.dbfo_pgwide"/> + </xsl:variable> + + <xsl:variable name="pgwide"> + <xsl:choose> + <xsl:when test="@pgwide"> + <xsl:value-of select="@pgwide"/> + </xsl:when> + <xsl:when test="$pgwide.pi"> + <xsl:value-of select="$pgwide.pi"/> + </xsl:when> + <!-- child element may set pgwide --> + <xsl:when test="*[@pgwide]"> + <xsl:value-of select="*[@pgwide][1]/@pgwide"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <!-- informaltables have their own templates and + are not handled by formal.object --> + <xsl:when test="local-name(.) = 'equation'"> + <xsl:choose> + <xsl:when test="$pgwide = '1'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="pgwide.properties + equation.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="equation.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="local-name(.) = 'procedure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="procedure.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'informalfigure'"> + <xsl:choose> + <xsl:when test="$pgwide = '1'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="pgwide.properties + informalfigure.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="informalfigure.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="local-name(.) = 'informalexample'"> + <xsl:choose> + <xsl:when test="$pgwide = '1'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="pgwide.properties + informalexample.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="informalexample.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="local-name(.) = 'informalequation'"> + <xsl:choose> + <xsl:when test="$pgwide = '1'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="pgwide.properties + informalequation.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="informalequation.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="informal.object.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="semiformal.object"> + <xsl:param name="placement" select="'before'"/> + <xsl:choose> + <xsl:when test="./title"> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="informal.object"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="figure"> + <xsl:variable name="param.placement" + select="substring-after(normalize-space($formal.title.placement), + concat(local-name(.), ' '))"/> + + <xsl:variable name="placement"> + <xsl:choose> + <xsl:when test="contains($param.placement, ' ')"> + <xsl:value-of select="substring-before($param.placement, ' ')"/> + </xsl:when> + <xsl:when test="$param.placement = ''">before</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$param.placement"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="figure"> + <xsl:choose> + <xsl:when test="@pgwide = '1'"> + <fo:block xsl:use-attribute-sets="pgwide.properties"> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="floatstyle"> + <xsl:call-template name="floatstyle"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$floatstyle != ''"> + <xsl:call-template name="floater"> + <xsl:with-param name="position" select="$floatstyle"/> + <xsl:with-param name="content" select="$figure"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$figure"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="example"> + <xsl:variable name="param.placement" + select="substring-after(normalize-space($formal.title.placement), + concat(local-name(.), ' '))"/> + + <xsl:variable name="placement"> + <xsl:choose> + <xsl:when test="contains($param.placement, ' ')"> + <xsl:value-of select="substring-before($param.placement, ' ')"/> + </xsl:when> + <xsl:when test="$param.placement = ''">before</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$param.placement"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Example doesn't have a pgwide attribute, so may use a PI --> + <xsl:variable name="pgwide.pi"> + <xsl:call-template name="pi.dbfo_pgwide"/> + </xsl:variable> + + <xsl:variable name="pgwide"> + <xsl:choose> + <xsl:when test="$pgwide.pi"> + <xsl:value-of select="$pgwide.pi"/> + </xsl:when> + <!-- child element may set pgwide --> + <xsl:when test="*[@pgwide]"> + <xsl:value-of select="*[@pgwide][1]/@pgwide"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <!-- Get align value from internal mediaobject --> + <xsl:variable name="align"> + <xsl:if test="mediaobject|mediaobjectco"> + <xsl:variable name="olist" select="mediaobject/imageobject + |mediaobjectco/imageobjectco + |mediaobject/videoobject + |mediaobject/audioobject + |mediaobject/textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="example"> + <xsl:choose> + <xsl:when test="$pgwide = '1'"> + <fo:block xsl:use-attribute-sets="pgwide.properties"> + <xsl:if test="$align != ''"> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block> + <xsl:if test="$align != ''"> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="floatstyle"> + <xsl:call-template name="floatstyle"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$floatstyle != ''"> + <xsl:call-template name="floater"> + <xsl:with-param name="position" select="$floatstyle"/> + <xsl:with-param name="content" select="$example"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$example"/> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<!-- Unified handling of CALS and HTML tables, formal and not --> +<!-- Creates a hierarchy of nested containers: + - Outer container does a float. + - Nested container does block-container for rotation + - Nested block contains title, layout table and footnotes + - Nested layout table placeholder template supports extensions. + - fo:table is innermost. + Created from the innermost and working out. + Not all layers apply to every table. +--> +<xsl:template match="table|informaltable"> + <xsl:if test="tgroup/tbody/tr + |tgroup/thead/tr + |tgroup/tfoot/tr"> + <xsl:message terminate="yes"> + <xsl:text>Broken table: tr descendent of CALS Table.</xsl:text> + <xsl:text>The text in the first tr is: </xsl:text> + <xsl:value-of + select="(tgroup//tr)[1]"/> + </xsl:message> + </xsl:if> + <xsl:if test="not(tgroup) and .//row"> + <xsl:message terminate="yes"> + <xsl:text>Broken table: row descendent of HTML table.</xsl:text> + <xsl:text>The text in the first row is: </xsl:text> + <xsl:value-of + select=".//row[1]"/> + </xsl:message> + </xsl:if> + + <!-- Contains fo:table, not title or footnotes --> + <xsl:variable name="table.content"> + <xsl:call-template name="make.table.content"/> + </xsl:variable> + + <!-- Optional layout table template for extensions --> + <xsl:variable name="table.layout"> + <xsl:call-template name="table.layout"> + <xsl:with-param name="table.content" select="$table.content"/> + </xsl:call-template> + </xsl:variable> + + <!-- fo:block contains title, layout table, and footnotes --> + <xsl:variable name="table.block"> + <xsl:call-template name="table.block"> + <xsl:with-param name="table.layout" select="$table.layout"/> + </xsl:call-template> + </xsl:variable> + + <!-- pgwide or orient container --> + <xsl:variable name="table.container"> + <xsl:call-template name="table.container"> + <xsl:with-param name="table.block" select="$table.block"/> + </xsl:call-template> + </xsl:variable> + + <!-- float or not --> + <xsl:variable name="floatstyle"> + <xsl:call-template name="floatstyle"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$floatstyle != ''"> + <xsl:call-template name="floater"> + <xsl:with-param name="position" select="$floatstyle"/> + <xsl:with-param name="content" select="$table.container"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$table.container"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<xsl:template match="equation"> + <xsl:variable name="param.placement" + select="substring-after(normalize-space($formal.title.placement), + concat(local-name(.), ' '))"/> + + <xsl:variable name="placement"> + <xsl:choose> + <xsl:when test="contains($param.placement, ' ')"> + <xsl:value-of select="substring-before($param.placement, ' ')"/> + </xsl:when> + <xsl:when test="$param.placement = ''">before</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$param.placement"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Equation doesn't have a pgwide attribute, so may use a PI --> + <xsl:variable name="pgwide"> + <xsl:call-template name="pi.dbfo_pgwide"/> + </xsl:variable> + + <xsl:variable name="equation"> + <xsl:choose> + <xsl:when test="$pgwide = '1'"> + <fo:block xsl:use-attribute-sets="pgwide.properties"> + <xsl:call-template name="semiformal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="semiformal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="floatstyle"> + <xsl:call-template name="floatstyle"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$floatstyle != ''"> + <xsl:call-template name="floater"> + <xsl:with-param name="position" select="$floatstyle"/> + <xsl:with-param name="content" select="$equation"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$equation"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="figure/title"></xsl:template> +<xsl:template match="figure/titleabbrev"></xsl:template> +<xsl:template match="table/title"></xsl:template> +<xsl:template match="table/titleabbrev"></xsl:template> +<xsl:template match="table/textobject"></xsl:template> +<xsl:template match="example/title"></xsl:template> +<xsl:template match="example/titleabbrev"></xsl:template> +<xsl:template match="equation/title"></xsl:template> +<xsl:template match="equation/titleabbrev"></xsl:template> + +<xsl:template match="informalfigure"> + <xsl:call-template name="informal.object"/> +</xsl:template> + +<xsl:template match="informalexample"> + <xsl:call-template name="informal.object"/> +</xsl:template> + +<xsl:template match="informaltable/textobject"></xsl:template> + +<xsl:template match="informalequation"> + <xsl:call-template name="informal.object"/> +</xsl:template> + +<xsl:template name="floatstyle"> + <xsl:if test="(@float and @float != '0') or @floatstyle != ''"> + <xsl:choose> + <xsl:when test="@floatstyle != ''"> + <xsl:value-of select="@floatstyle"/> + </xsl:when> + <xsl:when test="@float = '1'"> + <xsl:value-of select="$default.float.class"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@float"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/glossary.xsl b/3rdParty/DocBook/XSL/fo/glossary.xsl new file mode 100644 index 0000000..7c2f368 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/glossary.xsl @@ -0,0 +1,1144 @@ +<?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink='http://www.w3.org/1999/xlink' + exclude-result-prefixes="xlink" + version='1.0'> + +<!-- ******************************************************************** + $Id: glossary.xsl 8393 2009-04-02 14:20:44Z dcramer $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="glossary"> + <xsl:call-template name="make-glossary"/> +</xsl:template> + +<xsl:template match="glossdiv/title"/> +<xsl:template match="glossdiv/subtitle"/> +<xsl:template match="glossdiv/titleabbrev"/> + +<!-- ==================================================================== --> + +<xsl:template name="make-glossary"> + <xsl:param name="divs" select="glossdiv"/> + <xsl:param name="entries" select="glossentry"/> + <xsl:param name="preamble" select="*[not(self::title + or self::subtitle + or self::glossdiv + or self::glossentry)]"/> + + &setup-language-variable; + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="presentation"> + <xsl:call-template name="pi.dbfo_glossary-presentation"/> + </xsl:variable> + + <xsl:variable name="term-width"> + <xsl:call-template name="pi.dbfo_glossterm-width"/> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="glossary.titlepage"/> + </fo:block> + + <xsl:if test="$preamble"> + <xsl:apply-templates select="$preamble"/> + </xsl:if> + + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="$divs" mode="glossary.as.list"> + <xsl:with-param name="width" select="$width"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> + </xsl:if> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$divs" mode="glossary.as.list"> + <xsl:with-param name="width" select="$width"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="book/glossary|part/glossary|/glossary" priority="2"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <xsl:call-template name="make-glossary"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="glossary/glossaryinfo"></xsl:template> +<xsl:template match="glossary/info"></xsl:template> +<xsl:template match="glossary/title"></xsl:template> +<xsl:template match="glossary/subtitle"></xsl:template> +<xsl:template match="glossary/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="glosslist"> + &setup-language-variable; + + <xsl:variable name="presentation"> + <xsl:call-template name="pi.dbfo_glosslist-presentation"/> + </xsl:variable> + + <xsl:variable name="term-width"> + <xsl:call-template name="pi.dbfo_glossterm-width"/> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="title or info/title"> + <xsl:apply-templates select="(title|info/title)[1]" mode="list.title.mode"/> + </xsl:if> + + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="glossentry" mode="glossary.as.list"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossentry" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="$glosslist.as.blocks != 0"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="glossentry" mode="glossary.as.list"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossentry" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Glossary collection --> + +<xsl:template match="glossary[@role='auto']" priority="2"> + <xsl:variable name="collection" select="document($glossary.collection, .)"/> + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:if test="not($collection) and $glossary.collection != ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary but unable to </xsl:text> + <xsl:text>open glossary.collection file '</xsl:text> + <xsl:value-of select="$glossary.collection"/> + <xsl:text>'</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:call-template name="make-auto-glossary"/> +</xsl:template> + +<xsl:template name="make-auto-glossary"> + <xsl:param name="collection" select="document($glossary.collection, .)"/> + <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> + <xsl:param name="preamble" select="*[not(self::title + or self::subtitle + or self::glossdiv + or self::glossentry)]"/> + + &setup-language-variable; + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="presentation"> + <xsl:call-template name="pi.dbfo_glossary-presentation"/> + </xsl:variable> + + <xsl:variable name="term-width"> + <xsl:call-template name="pi.dbfo_glossterm-width"/> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <fo:block id="{$id}"> + <xsl:call-template name="glossary.titlepage"/> + </fo:block> + + <xsl:if test="$preamble"> + <xsl:apply-templates select="$preamble"/> + </xsl:if> + + <xsl:choose> + <xsl:when test="glossdiv and $collection//glossdiv"> + <xsl:for-each select="$collection//glossdiv"> + <!-- first see if there are any in this div --> + <xsl:variable name="exist.test"> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:value-of select="glossterm"/> + </xsl:if> + </xsl:for-each> + </xsl:variable> + + <xsl:if test="$exist.test != ''"> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"> + <xsl:with-param name="width" select="$width"/> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="auto-glossary-as-list"> + <xsl:with-param name="width" select="$width"/> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:for-each select="$collection//glossentry"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." + mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." + mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> + </xsl:when> + <xsl:when test="$presentation = 'blocks' or + $glossary.as.blocks != 0"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:for-each select="$collection//glossentry"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." + mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." + mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:for-each select="$collection//glossentry"> + + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." + mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." + mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="book/glossary[@role='auto']| + part/glossary[@role='auto']| + /glossary[@role='auto']" priority="2.5"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <xsl:call-template name="make-auto-glossary"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="glossdiv" mode="auto-glossary-as-list"> + <xsl:param name="width" select="$glossterm.width"/> + <xsl:param name="terms" select="."/> + + &setup-language-variable; + + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:for-each select="glossentry"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> +</xsl:template> + +<xsl:template match="glossentry" mode="auto-glossary-as-list"> + <xsl:apply-templates select="." mode="glossary.as.list"/> +</xsl:template> + +<xsl:template match="glossdiv" mode="auto-glossary-as-blocks"> + <xsl:param name="terms" select="."/> + + &setup-language-variable; + + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:for-each select="glossentry"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template match="glossentry" mode="auto-glossary-as-blocks"> + <xsl:apply-templates select="." mode="glossary.as.blocks"/> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Format glossary as a list --> + +<xsl:template match="glossdiv" mode="glossary.as.list"> + <xsl:param name="width" select="$glossterm.width"/> + + &setup-language-variable; + + <xsl:variable name="entries" select="glossentry"/> + + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </fo:list-block> +</xsl:template> + +<!-- +GlossEntry ::= + GlossTerm, Acronym?, Abbrev?, + (IndexTerm)*, + RevHistory?, + (GlossSee | GlossDef+) +--> + +<xsl:template match="glossentry" mode="glossary.as.list"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:list-item xsl:use-attribute-sets="glossentry.list.item.properties"> + <xsl:call-template name="anchor"> + <xsl:with-param name="conditional"> + <xsl:choose> + <xsl:when test="$glossterm.auto.link != 0 + or $glossary.collection != ''">0</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + + <fo:list-item-label end-indent="label-end()"> + <fo:block xsl:use-attribute-sets="glossterm.list.properties"> + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="acronym|abbrev" + mode="glossary.as.list"/> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="glossterm" + mode="glossary.as.list"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm" + mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$glossentry.show.acronym = 'yes'"> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + + <xsl:if test="acronym|abbrev"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="acronym|abbrev" + mode="glossary.as.list"/> + <xsl:text>)</xsl:text> + </xsl:if> + </xsl:when> + + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="indexterm"/> + </fo:block> + </fo:list-item-label> + + <fo:list-item-body start-indent="body-start()"> + <fo:block xsl:use-attribute-sets="glossdef.list.properties"> + <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.list"/> + </fo:block> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<xsl:template match="glossentry/glossterm" mode="glossary.as.list"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:inline id="{$id}"> + <xsl:apply-templates/> + </fo:inline> + <xsl:if test="following-sibling::glossterm">, </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/acronym" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/abbrev" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/revhistory" mode="glossary.as.list"> +</xsl:template> + +<xsl:template match="glossentry/glosssee" mode="glossary.as.list"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="key('id', $otherterm)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:variable name="xlink" select="@xlink:href"/> + + <fo:block> + <xsl:variable name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'see'"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="title"> + <xsl:choose> + <xsl:when test="$target"> + <fo:basic-link internal-destination="{$otherterm}" + xsl:use-attribute-sets="xref.properties"> + <xsl:apply-templates select="$target" mode="xref-to"/> + </fo:basic-link> + </xsl:when> + <xsl:when test="$xlink"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template" select="$template"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> + </fo:block> +</xsl:template> + +<xsl:template match="glossentry/glossdef" mode="glossary.as.list"> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> + <xsl:if test="glossseealso"> + <fo:block> + <xsl:variable name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso'"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="title"> + <xsl:apply-templates select="glossseealso" mode="glossary.as.list"/> + </xsl:variable> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template" select="$template"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]" + mode="glossary.as.list"> + <fo:block> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="glossseealso" mode="glossary.as.list"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="key('id', $otherterm)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:variable name="xlink" select="@xlink:href"/> + + <xsl:choose> + <xsl:when test="$target"> + <fo:basic-link internal-destination="{$otherterm}" + xsl:use-attribute-sets="xref.properties"> + <xsl:apply-templates select="$target" mode="xref-to"/> + </fo:basic-link> + </xsl:when> + <xsl:when test="$xlink"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="position() = last()"/> + <xsl:otherwise> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso-separator'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Format glossary blocks --> + +<xsl:template match="glossdiv" mode="glossary.as.blocks"> + &setup-language-variable; + <xsl:variable name="entries" select="glossentry"/> + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- +GlossEntry ::= + GlossTerm, Acronym?, Abbrev?, + (IndexTerm)*, + RevHistory?, + (GlossSee | GlossDef+) +--> + +<xsl:template match="glossentry" mode="glossary.as.blocks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block xsl:use-attribute-sets="glossterm.block.properties"> + <xsl:call-template name="anchor"> + <xsl:with-param name="conditional"> + <xsl:choose> + <xsl:when test="$glossterm.auto.link != 0 + or $glossary.collection != ''">0</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$glossentry.show.acronym = 'yes'"> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + + <xsl:if test="acronym|abbrev"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/> + <xsl:text>)</xsl:text> + </xsl:if> + </xsl:when> + + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates select="indexterm"/> + </fo:block> + + <fo:block xsl:use-attribute-sets="glossdef.block.properties"> + <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.blocks"/> + </fo:block> +</xsl:template> + +<xsl:template match="glossentry/glossterm" mode="glossary.as.blocks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:inline id="{$id}"> + <xsl:apply-templates/> + </fo:inline> + <xsl:if test="following-sibling::glossterm">, </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/acronym" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/abbrev" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="key('id', $otherterm)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:variable name="xlink" select="@xlink:href"/> + + <xsl:variable name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'see'"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="title"> + <xsl:choose> + <xsl:when test="$target"> + <fo:basic-link internal-destination="{$otherterm}" + xsl:use-attribute-sets="xref.properties"> + <xsl:apply-templates select="$target" mode="xref-to"/> + </fo:basic-link> + </xsl:when> + <xsl:when test="$xlink"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template" select="$template"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="glossentry/glossdef" mode="glossary.as.blocks"> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']" + mode="glossary.as.blocks"/> + <xsl:if test="glossseealso"> + <fo:block> + <xsl:variable name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso'"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="title"> + <xsl:apply-templates select="glossseealso" mode="glossary.as.blocks"/> + </xsl:variable> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template" select="$template"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]" + mode="glossary.as.blocks"> + <fo:block> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- Handle any other glossdef content normally --> +<xsl:template match="*" mode="glossary.as.blocks"> + <xsl:apply-templates select="." /> +</xsl:template> + +<xsl:template match="glossseealso" mode="glossary.as.blocks"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="key('id', $otherterm)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:variable name="xlink" select="@xlink:href"/> + + <xsl:choose> + <xsl:when test="$target"> + <fo:basic-link internal-destination="{$otherterm}" + xsl:use-attribute-sets="xref.properties"> + <xsl:apply-templates select="$target" mode="xref-to"/> + </fo:basic-link> + </xsl:when> + <xsl:when test="$xlink"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="position() = last()"/> + <xsl:otherwise> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso-separator'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/graphics.xsl b/3rdParty/DocBook/XSL/fo/graphics.xsl new file mode 100644 index 0000000..f75d66b --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/graphics.xsl @@ -0,0 +1,642 @@ +<?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> +<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> + ]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory" + xmlns:xtext="com.nwalsh.xalan.Text" + xmlns:lxslt="http://xml.apache.org/xslt" + exclude-result-prefixes="xlink stext xtext lxslt" + extension-element-prefixes="stext xtext" + version='1.0'> + +<!-- ******************************************************************** + $Id: graphics.xsl 8144 2008-10-25 09:41:24Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + Contributors: + Colin Paul Adams, <colin@colina.demon.co.uk> + Paul Grosso, <pgrosso@arbortext.com> + + ******************************************************************** --> + +<!-- ==================================================================== --> +<!-- Graphic format tests for the FO backend --> + +<xsl:param name="graphic.notations"> + <!-- n.b. exactly one leading space, one trailing space, and one inter-word space --> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text> PNG PDF JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$fop1.extensions != 0"> + <xsl:text> BMP GIF TIFF SVG PNG EPS JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:text> BMP GIF TIFF SVG PNG EPS JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$arbortext.extensions != 0"> + <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:text> SVG PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:template name="is.graphic.format"> + <xsl:param name="format"/> + <xsl:if test="contains($graphic.notations, concat(' ',$format,' '))">1</xsl:if> +</xsl:template> + +<xsl:param name="graphic.extensions"> + <!-- n.b. exactly one leading space, one trailing space, and one inter-word space --> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text> png pdf jpg jpeg </xsl:text> + </xsl:when> + <xsl:when test="$fop1.extensions != 0"> + <xsl:text> bmp gif tif tiff svg png pdf jpg jpeg eps </xsl:text> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:text> bmp gif tif tiff svg png pdf jpg jpeg eps </xsl:text> + </xsl:when> + <xsl:when test="$arbortext.extensions != 0"> + <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp eps </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp eps </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:template name="is.graphic.extension"> + <xsl:param name="ext"/> + <xsl:variable name="lcext" select="translate($ext, + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + 'abcdefghijklmnopqrstuvwxyz')"/> + + <xsl:if test="contains($graphic.extensions, + concat(' ', $lcext, ' '))">1</xsl:if> +</xsl:template> + +<xsl:template name="graphic.format.content-type"> + <xsl:param name="format"/> + <xsl:variable name="is.graphic.format"> + <xsl:call-template name="is.graphic.format"> + <xsl:with-param name="format" select="$format"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="$is.graphic.format"> + <xsl:choose> + <xsl:when test="$format = ''"></xsl:when> + <xsl:when test="$format = 'linespecific'"></xsl:when> + <xsl:when test="$format = 'PS'">application/postscript</xsl:when> + <xsl:when test="$format = 'PDF'">application/pdf</xsl:when> + <xsl:when test="$format = 'PNG'">image/png</xsl:when> + <xsl:when test="$format = 'SVG'">image/svg+xml</xsl:when> + <xsl:when test="$format = 'JPG'">image/jpeg</xsl:when> + <xsl:when test="$format = 'GIF87a'">image/gif</xsl:when> + <xsl:when test="$format = 'GIF89a'">image/gif</xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat('image/', + translate($format, &uppercase;, &lowercase;))"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> +</xsl:template> + + +<!-- ==================================================================== --> + +<xsl:template match="screenshot"> + <fo:block> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="screeninfo"> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Override these templates for FO --> +<!-- ==================================================================== --> + +<xsl:template name="process.image"> + <!-- When this template is called, the current node should be --> + <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> + <!-- those elements have the same set of attributes, so we can --> + <!-- handle them all in one place. --> + + <xsl:variable name="scalefit"> + <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">0</xsl:when> + <xsl:when test="@contentwidth">0</xsl:when> + <xsl:when test="@contentdepth and + @contentdepth != '100%'">0</xsl:when> + <xsl:when test="@scale">0</xsl:when> + <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when> + <xsl:when test="@width or @depth">1</xsl:when> + <xsl:when test="$default.image.width != ''">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="scale"> + <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">0</xsl:when> + <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when> + <xsl:when test="@scale"> + <xsl:value-of select="@scale div 100.0"/> + </xsl:when> + <xsl:otherwise>1.0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="local-name(.) = 'graphic' + or local-name(.) = 'inlinegraphic'"> + <!-- handle legacy graphic and inlinegraphic by new template --> + <xsl:call-template name="mediaobject.filename"> + <xsl:with-param name="object" select="."/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <!-- imagedata, videodata, audiodata --> + <xsl:call-template name="mediaobject.filename"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="content-type"> + <xsl:if test="@format"> + <xsl:call-template name="graphic.format.content-type"> + <xsl:with-param name="format" select="@format"/> + </xsl:call-template> + </xsl:if> + </xsl:variable> + + <xsl:variable name="bgcolor"> + <xsl:call-template name="pi.dbfo_background-color"> + <xsl:with-param name="node" select=".."/> + </xsl:call-template> + </xsl:variable> + + <fo:external-graphic> + <xsl:attribute name="src"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename"> + <xsl:if test="$img.src.path != '' and + not(starts-with($filename, '/')) and + not(contains($filename, '://'))"> + <xsl:value-of select="$img.src.path"/> + </xsl:if> + <xsl:value-of select="$filename"/> + </xsl:with-param> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="width"> + <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> + <xsl:when test="contains(@width,'%')"> + <xsl:value-of select="@width"/> + </xsl:when> + <xsl:when test="@width and not(@width = '')"> + <xsl:call-template name="length-spec"> + <xsl:with-param name="length" select="@width"/> + <xsl:with-param name="default.units" select="'px'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="not(@depth) and $default.image.width != ''"> + <xsl:call-template name="length-spec"> + <xsl:with-param name="length" select="$default.image.width"/> + <xsl:with-param name="default.units" select="'px'"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise>auto</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:attribute name="height"> + <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> + <xsl:when test="contains(@depth,'%')"> + <xsl:value-of select="@depth"/> + </xsl:when> + <xsl:when test="@depth"> + <xsl:call-template name="length-spec"> + <xsl:with-param name="length" select="@depth"/> + <xsl:with-param name="default.units" select="'px'"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise>auto</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:attribute name="content-width"> + <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> + <xsl:when test="contains(@contentwidth,'%')"> + <xsl:value-of select="@contentwidth"/> + </xsl:when> + <xsl:when test="@contentwidth"> + <xsl:call-template name="length-spec"> + <xsl:with-param name="length" select="@contentwidth"/> + <xsl:with-param name="default.units" select="'px'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="number($scale) != 1.0"> + <xsl:value-of select="$scale * 100"/> + <xsl:text>%</xsl:text> + </xsl:when> + <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when> + <xsl:otherwise>auto</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:attribute name="content-height"> + <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> + <xsl:when test="contains(@contentdepth,'%')"> + <xsl:value-of select="@contentdepth"/> + </xsl:when> + <xsl:when test="@contentdepth"> + <xsl:call-template name="length-spec"> + <xsl:with-param name="length" select="@contentdepth"/> + <xsl:with-param name="default.units" select="'px'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="number($scale) != 1.0"> + <xsl:value-of select="$scale * 100"/> + <xsl:text>%</xsl:text> + </xsl:when> + <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when> + <xsl:otherwise>auto</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:if test="$content-type != ''"> + <xsl:attribute name="content-type"> + <xsl:value-of select="concat('content-type:',$content-type)"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="$bgcolor != ''"> + <xsl:attribute name="background-color"> + <xsl:value-of select="$bgcolor"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="@align"> + <xsl:attribute name="text-align"> + <xsl:value-of select="@align"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="@valign"> + <xsl:attribute name="display-align"> + <xsl:choose> + <xsl:when test="@valign = 'top'">before</xsl:when> + <xsl:when test="@valign = 'middle'">center</xsl:when> + <xsl:when test="@valign = 'bottom'">after</xsl:when> + <xsl:otherwise>auto</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + </fo:external-graphic> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="graphic"> + <xsl:choose> + <xsl:when test="parent::inlineequation"> + <xsl:call-template name="process.image"/> + </xsl:when> + <xsl:otherwise> + <fo:block> + <xsl:if test="@align"> + <xsl:attribute name="text-align"> + <xsl:value-of select="@align"/> + </xsl:attribute> + </xsl:if> + <xsl:call-template name="process.image"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="inlinegraphic"> + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="@format='linespecific'"> + <xsl:choose> + <xsl:when test="$use.extensions != '0' + and $textinsert.extension != '0'"> + <xsl:choose> + <xsl:when test="contains($vendor, 'SAXON')"> + <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/> + </xsl:when> + <xsl:when test="contains($vendor, 'Apache Software Foundation')"> + <xtext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Don't know how to insert files with </xsl:text> + <xsl:value-of select="$vendor"/> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/> + <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="process.image"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="mediaobject|mediaobjectco"> + + <xsl:variable name="olist" select="imageobject|imageobjectco + |videoobject|audioobject + |textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:variable name="align"> + <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:if test="$align != '' "> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$object"/> + <xsl:apply-templates select="caption"/> + </fo:block> +</xsl:template> + +<xsl:template match="inlinemediaobject"> + <xsl:call-template name="select.mediaobject"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="imageobjectco"> + <xsl:apply-templates select="imageobject"/> + <xsl:apply-templates select="calloutlist"/> +</xsl:template> + +<xsl:template match="imageobject"> + <xsl:choose> + <xsl:when test="imagedata"> + <xsl:apply-templates select="imagedata"/> + </xsl:when> + <xsl:otherwise> + <fo:instream-foreign-object> + <xsl:apply-templates mode="copy-all"/> + </fo:instream-foreign-object> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="copy-all"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:copy/> + </xsl:for-each> + <xsl:apply-templates mode="copy-all"/> + </xsl:copy> +</xsl:template> + +<xsl:template match="text()|comment()|processing-instruction()" mode="copy-all"> + <xsl:copy/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="imagedata"> + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:variable name="filename"> + <xsl:call-template name="mediaobject.filename"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML"> + <xsl:apply-templates/> + </xsl:when> + + <xsl:when test="@format='linespecific'"> + <xsl:choose> + <xsl:when test="$use.extensions != '0' + and $textinsert.extension != '0'"> + <xsl:choose> + <xsl:when test="contains($vendor, 'SAXON')"> + <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/> + </xsl:when> + <xsl:when test="contains($vendor, 'Apache Software Foundation')"> + <xtext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Don't know how to insert files with </xsl:text> + <xsl:value-of select="$vendor"/> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/> + <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="process.image"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="videoobject"> + <xsl:apply-templates select="videodata"/> +</xsl:template> + +<xsl:template match="videodata"> + <xsl:call-template name="process.image"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="audioobject"> + <xsl:apply-templates select="audiodata"/> +</xsl:template> + +<xsl:template match="audiodata"> + <xsl:call-template name="process.image"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="textobject"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="textdata"> + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="encoding"> + <xsl:choose> + <xsl:when test="@encoding"> + <xsl:value-of select="@encoding"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$textdata.default.encoding"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$use.extensions != '0' + and $textinsert.extension != '0'"> + <xsl:choose> + <xsl:when test="element-available('stext:insertfile')"> + <stext:insertfile href="{$filename}" encoding="{$encoding}"/> + </xsl:when> + <xsl:when test="element-available('xtext:insertfile')"> + <xtext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Don't know how to insert files with </xsl:text> + <xsl:value-of select="$vendor"/> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/> + <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="caption"> + <fo:block> + <xsl:if test="@align = 'right' or @align = 'left' or @align='center'"> + <xsl:attribute name="text-align"><xsl:value-of + select="@align"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="fo-external-image"> + <xsl:param name="filename"/> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0 + or $fop.extensions != 0"> + <xsl:value-of select="$filename"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat('url(', $filename, ')')"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Resolve xml:base attributes --> +<xsl:template match="@fileref"> + <!-- need a check for absolute urls --> + <xsl:choose> + <xsl:when test="contains(., ':') or starts-with(.,'/')"> + <!-- it has a uri scheme or starts with '/', so it is an absolute uri --> + <xsl:value-of select="."/> + </xsl:when> + <xsl:when test="$keep.relative.image.uris != 0"> + <!-- leave it alone --> + <xsl:value-of select="."/> + </xsl:when> + <xsl:otherwise> + <!-- its a relative uri --> + <xsl:call-template name="relative-uri"> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/highlight.xsl b/3rdParty/DocBook/XSL/fo/highlight.xsl new file mode 100644 index 0000000..7843ad2 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/highlight.xsl @@ -0,0 +1,77 @@ +<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xslthl="http://xslthl.sf.net"
+ exclude-result-prefixes="xslthl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id: highlight.xsl 8419 2009-04-29 20:37:52Z kosek $
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://docbook.sf.net/release/xsl/current/ for
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:import href="../highlighting/common.xsl"/>
+
+<xsl:template match='xslthl:keyword' mode="xslthl">
+ <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:string' mode="xslthl">
+ <fo:inline font-weight="bold" font-style="italic"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:comment' mode="xslthl">
+ <fo:inline font-style="italic"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:tag' mode="xslthl">
+ <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:attribute' mode="xslthl">
+ <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:value' mode="xslthl">
+ <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<!--
+<xsl:template match='xslthl:html'>
+ <span style='background:#AFF'><font color='blue'><xsl:apply-templates/></font></span>
+</xsl:template>
+
+<xsl:template match='xslthl:xslt'>
+ <span style='background:#AAA'><font color='blue'><xsl:apply-templates/></font></span>
+</xsl:template>
+
+<xsl:template match='xslthl:section'>
+ <span style='background:yellow'><xsl:apply-templates/></span>
+</xsl:template>
+-->
+
+<xsl:template match='xslthl:number' mode="xslthl">
+ <xsl:apply-templates mode="xslthl"/>
+</xsl:template>
+
+<xsl:template match='xslthl:annotation' mode="xslthl">
+ <fo:inline color="gray"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:directive' mode="xslthl">
+ <xsl:apply-templates mode="xslthl"/>
+</xsl:template>
+
+<!-- Not sure which element will be in final XSLTHL 2.0 -->
+<xsl:template match='xslthl:doccomment|xslthl:doctype' mode="xslthl">
+ <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+
+</xsl:stylesheet>
+
diff --git a/3rdParty/DocBook/XSL/fo/htmltbl.xsl b/3rdParty/DocBook/XSL/fo/htmltbl.xsl new file mode 100644 index 0000000..4918b8a --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/htmltbl.xsl @@ -0,0 +1,425 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<!-- ******************************************************************** + $Id: htmltbl.xsl 8392 2009-04-01 08:47:55Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<!-- Outputs an fo:table only, not the caption --> +<xsl:template match="table|informaltable" mode="htmlTable"> + + <xsl:variable name="numcols"> + <xsl:call-template name="widest-html-row"> + <xsl:with-param name="rows" select=".//tr"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="prop-columns" + select=".//col[contains(@width, '%')] | + .//colgroup[contains(@width, '%')]"/> + + <xsl:variable name="table.width"> + <xsl:call-template name="table.width"/> + </xsl:variable> + + <fo:table xsl:use-attribute-sets="table.table.properties"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0 or + $passivetex.extensions != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:when> + </xsl:choose> + + <xsl:attribute name="width"> + <xsl:choose> + <xsl:when test="@width"> + <xsl:value-of select="@width"/> + </xsl:when> + <xsl:when test="$table.width"> + <xsl:value-of select="$table.width"/> + </xsl:when> + <xsl:otherwise>100%</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:call-template name="table.frame"> + <xsl:with-param name="frame"> + <xsl:choose> + <xsl:when test="@frame = 'box'">all</xsl:when> + <xsl:when test="@frame = 'border'">all</xsl:when> + <xsl:when test="@frame = 'below'">bottom</xsl:when> + <xsl:when test="@frame = 'above'">top</xsl:when> + <xsl:when test="@frame = 'hsides'">topbot</xsl:when> + <xsl:when test="@frame = 'vsides'">sides</xsl:when> + <xsl:when test="@frame = 'lhs'">lhs</xsl:when> + <xsl:when test="@frame = 'rhs'">rhs</xsl:when> + <xsl:when test="@frame = 'void'">none</xsl:when> + <xsl:when test="@border != '' and @border != 0">all</xsl:when> + <xsl:when test="@border != '' and @border = 0">none</xsl:when> + <xsl:when test="@frame != ''"> + <xsl:value-of select="@frame"/> + </xsl:when> + <xsl:when test="$default.table.frame != ''"> + <xsl:value-of select="$default.table.frame"/> + </xsl:when> + <xsl:otherwise>all</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + + <xsl:call-template name="make-html-table-columns"> + <xsl:with-param name="count" select="$numcols"/> + </xsl:call-template> + + <xsl:apply-templates select="thead" mode="htmlTable"/> + <xsl:apply-templates select="tfoot" mode="htmlTable"/> + <xsl:choose> + <xsl:when test="tbody"> + <xsl:apply-templates select="tbody" mode="htmlTable"/> + </xsl:when> + <xsl:otherwise> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="tr" mode="htmlTable"/> + </fo:table-body> + </xsl:otherwise> + </xsl:choose> + </fo:table> + +</xsl:template> + +<!-- This template writes rowsep or colsep equivalant for html tables --> +<xsl:template name="html.table.cell.rules"> + <xsl:variable name="border" + select="(ancestor::table | + ancestor::informaltable)[last()]/@border"/> + <xsl:variable name="table.rules" + select="(ancestor::table | + ancestor::informaltable)[last()]/@rules"/> + + <xsl:variable name="rules"> + <xsl:choose> + <xsl:when test="$table.rules != ''"> + <xsl:value-of select="$table.rules"/> + </xsl:when> + <xsl:when test="$default.table.rules != ''"> + <xsl:value-of select="$default.table.rules"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$border != '' and $border != 0"> + <xsl:attribute name="border"> + <xsl:value-of select="$table.cell.border.thickness"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$table.cell.border.style"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$table.cell.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$rules = 'none'"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + </xsl:when> + + <xsl:when test="$rules = 'cols' and following-sibling::*"> + <!-- If not the last column, add border after --> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="border-end-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-end-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-end-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <!-- If not the last row, add border below --> + <xsl:when test="$rules = 'rows'"> + <xsl:variable name="rowborder"> + <xsl:choose> + <!-- If in thead and tbody has rows, add border --> + <xsl:when test="parent::tr/parent::thead/ + following-sibling::tbody/tr">1</xsl:when> + <!-- If in tbody and tfoot has rows, add border --> + <xsl:when test="parent::tr/parent::tbody/ + following-sibling::tfoot/tr">1</xsl:when> + <xsl:when test="parent::tr/parent::tbody/ + preceding-sibling::tfoot/tr">1</xsl:when> + <!-- If following rows, but not rowspan reaches last row --> + <xsl:when test="parent::tr/following-sibling::tr and + not(@rowspan = count(parent::tr/following-sibling::tr) + 1)">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$rowborder = 1"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:if> + </xsl:when> + <xsl:when test="$rules = 'all'"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + + <xsl:variable name="rowborder"> + <xsl:choose> + <!-- If in thead and tbody has rows, add border --> + <xsl:when test="parent::tr/parent::thead/ + following-sibling::tbody/tr">1</xsl:when> + <!-- If in tbody and tfoot has rows, add border --> + <xsl:when test="parent::tr/parent::tbody/ + following-sibling::tfoot/tr">1</xsl:when> + <xsl:when test="parent::tr/parent::tbody/ + preceding-sibling::tfoot/tr">1</xsl:when> + <!-- If following rows, but not rowspan reaches last row --> + <xsl:when test="parent::tr/following-sibling::tr and + not(@rowspan = count(parent::tr/following-sibling::tr) + 1)">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$rowborder = 1"> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="following-sibling::*"> + <!-- If not the last column, add border after --> + <xsl:attribute name="border-end-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-end-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-end-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:if> + </xsl:when> + <xsl:when test="$rules = 'groups' and ancestor::thead + and not(parent::tr/following-sibling::tr)"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$rules = 'groups' and ancestor::tfoot + and not(parent::tr/preceding-sibling::tr)"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-top-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="caption" mode="htmlTable"> + <!-- Handled by formal.object.heading --> +</xsl:template> + +<xsl:template name="widest-html-row"> + <xsl:param name="rows" select="''"/> + <xsl:param name="count" select="0"/> + <xsl:choose> + <xsl:when test="count($rows) = 0"> + <xsl:value-of select="$count"/> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$count > count($rows[1]/*)"> + <xsl:call-template name="widest-html-row"> + <xsl:with-param name="rows" select="$rows[position() > 1]"/> + <xsl:with-param name="count" select="$count"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="widest-html-row"> + <xsl:with-param name="rows" select="$rows[position() > 1]"/> + <xsl:with-param name="count" select="count($rows[1]/*)"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="make-html-table-columns"> + <xsl:param name="count" select="0"/> + <xsl:param name="number" select="1"/> + + <xsl:choose> + <xsl:when test="col|colgroup/col"> + <xsl:for-each select="col|colgroup/col"> + <fo:table-column> + <xsl:attribute name="column-number"> + <xsl:number from="table|informaltable" level="any" format="1"/> + </xsl:attribute> + <xsl:if test="@width"> + <xsl:attribute name="column-width"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0 and + contains(@width, '%')"> + <xsl:value-of select="concat('proportional-column-width(', + substring-before(@width, '%'), + ')')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + </fo:table-column> + </xsl:for-each> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:if test="$number <= $count"> + <fo:table-column column-number="{$number}" + column-width="{6.5 div $count}in"/> + <xsl:call-template name="make-html-table-columns"> + <xsl:with-param name="count" select="$count"/> + <xsl:with-param name="number" select="$number + 1"/> + </xsl:call-template> + </xsl:if> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="tbody" mode="htmlTable"> + <fo:table-body start-indent="0pt" + end-indent="0pt"> + <xsl:apply-templates mode="htmlTable"/> + </fo:table-body> +</xsl:template> + +<xsl:template match="tfoot" mode="htmlTable"> + <fo:table-footer start-indent="0pt" + end-indent="0pt"> + <xsl:apply-templates mode="htmlTable"/> + </fo:table-footer> +</xsl:template> + +<xsl:template match="th|td" mode="htmlTable"> + <xsl:variable name="bgcolor.pi"> + <xsl:call-template name="pi.dbfo_bgcolor"/> + </xsl:variable> + + <xsl:variable name="bgcolor"> + <xsl:choose> + <xsl:when test="$bgcolor.pi != ''"> + <xsl:value-of select="$bgcolor.pi"/> + </xsl:when> + <xsl:when test="string-length(@bgcolor) != 0"> + <xsl:value-of select="@bgcolor"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="align"> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="row" select="parent::tr"/> + <xsl:with-param name="attribute" select="'align'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="valign"> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="row" select="parent::tr"/> + <xsl:with-param name="attribute" select="'valign'"/> + </xsl:call-template> + </xsl:variable> + + <fo:table-cell xsl:use-attribute-sets="table.cell.padding"> + <xsl:call-template name="table.cell.properties"> + <xsl:with-param name="bgcolor.pi" select="$bgcolor"/> + <xsl:with-param name="rowsep.inherit" select="0"/> + <xsl:with-param name="align.inherit" select="$align"/> + <xsl:with-param name="valign.inherit" select="$valign"/> + <xsl:with-param name="colsep.inherit" select="0"/> + </xsl:call-template> + + <xsl:if test="@colspan > 1"> + <xsl:attribute name="number-columns-spanned"> + <xsl:value-of select="@colspan"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="@rowspan > 1"> + <xsl:attribute name="number-rows-spanned"> + <xsl:value-of select="@rowspan"/> + </xsl:attribute> + </xsl:if> + + <fo:block> + <xsl:call-template name="table.cell.block.properties"/> + <xsl:apply-templates/> + </fo:block> + </fo:table-cell> +</xsl:template> + +<xsl:template match="thead" mode="htmlTable"> + <fo:table-header start-indent="0pt" + end-indent="0pt"> + <xsl:apply-templates mode="htmlTable"/> + </fo:table-header> +</xsl:template> + +<xsl:template match="tr" mode="htmlTable"> + <fo:table-row> + <xsl:call-template name="table.row.properties"/> + <xsl:apply-templates mode="htmlTable"/> + </fo:table-row> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/index.xsl b/3rdParty/DocBook/XSL/fo/index.xsl new file mode 100644 index 0000000..e8a8b2e --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/index.xsl @@ -0,0 +1,485 @@ +<?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> +<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> +<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'> +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:rx="http://www.renderx.com/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: index.xsl 8317 2009-03-12 06:14:02Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="index"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:if test="$generate.index != 0"> + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}"> + <xsl:call-template name="index.titlepage"/> + </fo:block> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:if> +</xsl:template> + +<xsl:template match="book/index|part/index"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:if test="$generate.index != 0"> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass"> + <xsl:if test="$make.index.markup != 0">body</xsl:if> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="component.titlepage.properties"> + <xsl:call-template name="index.titlepage"/> + </fo:block> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + xsl:use-attribute-sets="monospace.verbatim.properties" + linefeed-treatment="preserve"> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:when test="indexentry|indexdiv/indexentry"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<xsl:template match="setindex"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:if test="$generate.index != 0"> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass"> + <xsl:choose> + <xsl:when test="$make.index.markup != 0">body</xsl:when> + <xsl:otherwise>index</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}"> + <xsl:call-template name="setindex.titlepage"/> + </fo:block> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + xsl:use-attribute-sets="monospace.verbatim.properties" + linefeed-treatment="preserve"> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="/"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:when test="indexentry|indexdiv/indexentry"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="/"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<xsl:template match="index/indexinfo"></xsl:template> +<xsl:template match="index/info"></xsl:template> +<xsl:template match="index/title"></xsl:template> +<xsl:template match="index/subtitle"></xsl:template> +<xsl:template match="index/titleabbrev"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="indexdiv.title"> + <xsl:param name="title"/> + <xsl:param name="titlecontent"/> + + <fo:block xsl:use-attribute-sets="index.div.title.properties"> + <xsl:choose> + <xsl:when test="$title"> + <xsl:apply-templates select="." mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$titlecontent"/> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<xsl:template match="indexdiv"> + <fo:block> + <xsl:call-template name="indexdiv.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="indexdiv/title"/> +<xsl:template match="indexdiv/subtitle"/> +<xsl:template match="indexdiv/titleabbrev"/> + +<!-- ==================================================================== --> + +<!-- Text used for distiguishing between normal and significant entries --> +<xsl:variable name="significant.flag">.tnacifingis</xsl:variable> + +<xsl:template match="indexterm" name="indexterm"> + <!-- Temporal workaround for bug in AXF --> + <xsl:variable name="wrapper.name"> + <xsl:choose> + <xsl:when test="$axf.extensions != 0 or $fop1.extensions != 0"> + <xsl:call-template name="inline.or.block"/> + </xsl:when> + <xsl:otherwise>fo:wrapper</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:element name="{$wrapper.name}"> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <xsl:attribute name="rx:key"> + <xsl:value-of select="&primary;"/> + <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if> + <xsl:if test="secondary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="&secondary;"/> + </xsl:if> + <xsl:if test="tertiary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="&tertiary;"/> + </xsl:if> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:comment> + <xsl:call-template name="comment-escape-string"> + <xsl:with-param name="string"> + <xsl:value-of select="primary"/> + <xsl:if test="secondary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="secondary"/> + </xsl:if> + <xsl:if test="tertiary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="tertiary"/> + </xsl:if> + </xsl:with-param> + </xsl:call-template> + </xsl:comment> + </xsl:otherwise> + </xsl:choose> + </xsl:element> +</xsl:template> + +<xsl:template match="indexterm[@class='startofrange']"> + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <rx:begin-index-range> + <xsl:call-template name="anchor"/> + <xsl:attribute name="rx:key"> + <xsl:value-of select="&primary;"/> + <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if> + <xsl:if test="secondary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="&secondary;"/> + </xsl:if> + <xsl:if test="tertiary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="&tertiary;"/> + </xsl:if> + </xsl:attribute> + </rx:begin-index-range> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="indexterm"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="indexterm[@class='endofrange']"> + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <rx:end-index-range> + <xsl:attribute name="ref-id"> + <xsl:value-of select="@startref"/> + </xsl:attribute> + </rx:end-index-range> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="indexterm"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="indexentry"> + <fo:block> + <!-- don't process 'seeie's from here --> + <xsl:apply-templates select="primaryie|secondaryie|tertiaryie|seealsoie"/> + </fo:block> +</xsl:template> + +<xsl:template match="primaryie"> + <fo:block> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="secondaryie"> + <fo:block start-indent="1pc"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="tertiaryie"> + <fo:block start-indent="2pc"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="seeie"> + <fo:inline> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<xsl:template match="seealsoie"> + <fo:block> + <xsl:attribute name="start-indent"> + <xsl:choose> + <xsl:when test="(preceding-sibling::tertiaryie | + preceding-sibling::secondaryie)[last()] + [self::tertiaryie]">3pc</xsl:when> + <xsl:when test="(preceding-sibling::tertiaryie | + preceding-sibling::secondaryie)[last()] + [self::secondaryie]">2pc</xsl:when> + <xsl:otherwise>1pc</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:text>(</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'seealso'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + <xsl:text>)</xsl:text> + </fo:block> +</xsl:template> + +<!-- Determines if an object should be inserted as an fo:inline + or an fo:block. Used for indexterms --> +<xsl:template name="inline.or.block"> + <xsl:param name="parentnode" select=".."/> + + <xsl:variable name="parent" select="concat('|', local-name($parentnode), '|')"/> + + <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|info|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|variablelist|warning|'"/> + + <xsl:choose> + <xsl:when test="contains($block.parents, $parent)">fo:block</xsl:when> + <xsl:when test="$fop1.extensions != 0">fo:wrapper</xsl:when> + <xsl:otherwise>fo:inline</xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/info.xsl b/3rdParty/DocBook/XSL/fo/info.xsl new file mode 100644 index 0000000..7497b82 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/info.xsl @@ -0,0 +1,34 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: info.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- These templates define the "default behavior" for info + elements. Even if you don't process the *info wrappers, + some of these elements are needed because the elements are + processed from named templates that are called with modes. + Since modes aren't sticky, these rules apply. + (TODO: clarify this comment) --> + +<!-- ==================================================================== --> +<!-- called from named templates in a given mode --> + +<xsl:template match="corpauthor"> + <fo:inline> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/inline.xsl b/3rdParty/DocBook/XSL/fo/inline.xsl new file mode 100644 index 0000000..e8b5260 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/inline.xsl @@ -0,0 +1,1286 @@ +<?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink='http://www.w3.org/1999/xlink' + exclude-result-prefixes="xlink" + version='1.0'> + +<!-- ******************************************************************** + $Id: inline.xsl 8363 2009-03-21 07:46:57Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:template name="simple.xlink"> + <xsl:param name="node" select="."/> + <xsl:param name="content"> + <xsl:apply-templates/> + </xsl:param> + <xsl:param name="linkend" select="$node/@linkend"/> + <xsl:param name="xhref" select="$node/@xlink:href"/> + + <xsl:choose> + <xsl:when test="$xhref + and (not($node/@xlink:type) or + $node/@xlink:type='simple')"> + + <!-- Is it a local idref? --> + <xsl:variable name="is.idref"> + <xsl:choose> + <!-- if the href starts with # and does not contain an "(" --> + <!-- or if the href starts with #xpointer(id(, it's just an ID --> + <xsl:when test="starts-with($xhref,'#') + and (not(contains($xhref,'(')) + or starts-with($xhref, + '#xpointer(id('))">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Is it an olink ? --> + <xsl:variable name="is.olink"> + <xsl:choose> + <!-- If xlink:role="http://docbook.org/xlink/role/olink" --> + <!-- and if the href contains # --> + <xsl:when test="contains($xhref,'#') and + @xlink:role = $xolink.role">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$is.olink = 1"> + <xsl:call-template name="olink"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="$is.idref = 1"> + + <xsl:variable name="idref"> + <xsl:call-template name="xpointer.idref"> + <xsl:with-param name="xpointer" select="$xhref"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="targets" select="key('id',$idref)"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:call-template name="check.id.unique"> + <xsl:with-param name="linkend" select="$idref"/> + </xsl:call-template> + + <xsl:choose> + <xsl:when test="count($target) = 0"> + <xsl:message> + <xsl:text>XLink to nonexistent id: </xsl:text> + <xsl:value-of select="$idref"/> + </xsl:message> + <xsl:copy-of select="$content"/> + </xsl:when> + + <xsl:otherwise> + <fo:basic-link internal-destination="{$idref}"> + <xsl:copy-of select="$content"/> + </fo:basic-link> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <!-- otherwise it's a URI --> + <xsl:otherwise> + <fo:basic-link external-destination="url({$xhref})"> + <xsl:copy-of select="$content"/> + </fo:basic-link> + <!-- * Call the template for determining whether the URL for this --> + <!-- * hyperlink is displayed, and how to display it (either inline or --> + <!-- * as a numbered footnote). --> + <xsl:call-template name="hyperlink.url.display"> + <xsl:with-param name="url" select="$xhref"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$linkend"> + <xsl:variable name="targets" select="key('id',$linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:call-template name="check.id.unique"> + <xsl:with-param name="linkend" select="$linkend"/> + </xsl:call-template> + + <xsl:choose> + <xsl:when test="count($target) = 0"> + <xsl:message> + <xsl:text>XLink to nonexistent id: </xsl:text> + <xsl:value-of select="$linkend"/> + </xsl:message> + <xsl:copy-of select="$content"/> + </xsl:when> + + <xsl:otherwise> + <fo:basic-link internal-destination="{$linkend}"> + <xsl:copy-of select="$content"/> + </fo:basic-link> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:otherwise> + <xsl:copy-of select="$content"/> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template name="inline.charseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <xsl:choose> + <xsl:when test="@dir"> + <fo:inline> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:copy-of select="$content"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$content"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="inline.monoseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline xsl:use-attribute-sets="monospace.properties"> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<xsl:template name="inline.boldseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline font-weight="bold"> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<xsl:template name="inline.italicseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline font-style="italic"> + <xsl:call-template name="anchor"/> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<xsl:template name="inline.boldmonoseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties"> + <xsl:call-template name="anchor"/> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<xsl:template name="inline.italicmonoseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties"> + <xsl:call-template name="anchor"/> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<xsl:template name="inline.superscriptseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline xsl:use-attribute-sets="superscript.properties"> + <xsl:call-template name="anchor"/> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:choose> + <xsl:when test="$fop.extensions != 0"> + <xsl:attribute name="vertical-align">super</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="baseline-shift">super</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<xsl:template name="inline.subscriptseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + + <fo:inline xsl:use-attribute-sets="subscript.properties"> + <xsl:call-template name="anchor"/> + <xsl:if test="@dir"> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <xsl:choose> + <xsl:when test="$fop.extensions != 0"> + <xsl:attribute name="vertical-align">sub</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="baseline-shift">sub</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:copy-of select="$content"/> + </fo:inline> +</xsl:template> + +<!-- ==================================================================== --> +<!-- some special cases --> + +<xsl:template match="author"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:call-template name="person.name"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="editor"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:call-template name="person.name"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="othercredit"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:call-template name="person.name"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="authorinitials"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="accel"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="action"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="application"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="classname"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="exceptionname"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="interfacename"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="methodname"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="command"> + <xsl:call-template name="inline.boldseq"/> +</xsl:template> + +<xsl:template match="computeroutput"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="constant"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="database"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="date"> + <!-- should this support locale-specific formatting? how? --> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="errorcode"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="errorname"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="errortype"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="errortext"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="envar"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="filename"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="function"> + <xsl:choose> + <xsl:when test="$function.parens != '0' + and (parameter or function or replaceable)"> + <xsl:variable name="nodes" select="text()|*"/> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates select="$nodes[1]"/> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + <xsl:text>(</xsl:text> + <xsl:apply-templates select="$nodes[position()>1]"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.monoseq"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="function/parameter" priority="2"> + <xsl:call-template name="inline.italicmonoseq"/> + <xsl:if test="following-sibling::*"> + <xsl:text>, </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="function/replaceable" priority="2"> + <xsl:call-template name="inline.italicmonoseq"/> + <xsl:if test="following-sibling::*"> + <xsl:text>, </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="guibutton"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="guiicon"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="guilabel"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="guimenu"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="guimenuitem"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="guisubmenu"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="hardware"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="interface"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="interfacedefinition"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="keycap"> + <xsl:call-template name="inline.boldseq"/> +</xsl:template> + +<xsl:template match="keycode"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="keysym"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="literal"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="code"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="medialabel"> + <xsl:call-template name="inline.italicseq"/> +</xsl:template> + +<xsl:template match="shortcut"> + <xsl:call-template name="inline.boldseq"/> +</xsl:template> + +<xsl:template match="mousebutton"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="option"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="package"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="parameter"> + <xsl:call-template name="inline.italicmonoseq"/> +</xsl:template> + +<xsl:template match="property"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="prompt"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="replaceable"> + <xsl:call-template name="inline.italicmonoseq"/> +</xsl:template> + +<xsl:template match="returnvalue"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="structfield"> + <xsl:call-template name="inline.italicmonoseq"/> +</xsl:template> + +<xsl:template match="structname"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="symbol"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="systemitem"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="token"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="type"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="userinput"> + <xsl:call-template name="inline.boldmonoseq"/> +</xsl:template> + +<xsl:template match="abbrev"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="acronym"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="citerefentry"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="citetitle"> + <xsl:choose> + <xsl:when test="@pubwork = 'article'"> + <xsl:call-template name="gentext.startquote"/> + <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.italicseq"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="emphasis"> + <xsl:variable name="depth"> + <xsl:call-template name="dot.count"> + <xsl:with-param name="string"> + <xsl:number level="multiple"/> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="@role='bold' or @role='strong'"> + <xsl:call-template name="inline.boldseq"/> + </xsl:when> + <xsl:when test="@role='underline'"> + <fo:inline text-decoration="underline"> + <xsl:call-template name="inline.charseq"/> + </fo:inline> + </xsl:when> + <xsl:when test="@role='strikethrough'"> + <fo:inline text-decoration="line-through"> + <xsl:call-template name="inline.charseq"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$depth mod 2 = 1"> + <fo:inline font-style="normal"> + <xsl:apply-templates/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.italicseq"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="foreignphrase"> + <xsl:call-template name="inline.italicseq"/> +</xsl:template> + +<xsl:template match="markup"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="phrase"> + <fo:inline> + <xsl:call-template name="anchor"/> + <xsl:call-template name="inline.charseq"/> + </fo:inline> +</xsl:template> + +<xsl:template match="quote"> + <xsl:variable name="depth"> + <xsl:call-template name="dot.count"> + <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="content"> + <xsl:choose> + <xsl:when test="$depth mod 2 = 0"> + <xsl:call-template name="gentext.startquote"/> + <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="gentext.nestedstartquote"/> + <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="gentext.nestedendquote"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:inline> + <xsl:call-template name="anchor"/> + <xsl:copy-of select="$content"/> + </fo:inline> + +</xsl:template> + +<xsl:template match="varname"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="wordasword"> + <xsl:call-template name="inline.italicseq"/> +</xsl:template> + +<xsl:template match="lineannotation"> + <fo:inline font-style="italic"> + <xsl:call-template name="inline.charseq"/> + </fo:inline> +</xsl:template> + +<xsl:template match="superscript"> + <xsl:call-template name="inline.superscriptseq"/> +</xsl:template> + +<xsl:template match="subscript"> + <xsl:call-template name="inline.subscriptseq"/> +</xsl:template> + +<xsl:template match="trademark"> + <xsl:call-template name="inline.charseq"/> + <xsl:choose> + <xsl:when test="@class = 'copyright' + or @class = 'registered'"> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat" select="@class"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="@class = 'service'"> + <xsl:call-template name="inline.superscriptseq"> + <xsl:with-param name="content" select="'SM'"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat" select="'trademark'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="firstterm"> + <xsl:call-template name="glossterm"> + <xsl:with-param name="firstterm" select="1"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="glossterm" name="glossterm"> + <xsl:param name="firstterm" select="0"/> + + <xsl:choose> + <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend"> + <xsl:variable name="targets" select="key('id',@linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:choose> + <xsl:when test="$target"> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:call-template name="inline.italicseq"/> + </fo:basic-link> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.italicseq"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="not(@linkend) + and ($firstterm.only.link = 0 or $firstterm = 1) + and ($glossterm.auto.link != 0) + and $glossary.collection != ''"> + <xsl:variable name="term"> + <xsl:choose> + <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when> + <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="cterm" + select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/> + + <xsl:choose> + <xsl:when test="not($cterm)"> + <xsl:message> + <xsl:text>There's no entry for </xsl:text> + <xsl:value-of select="$term"/> + <xsl:text> in </xsl:text> + <xsl:value-of select="$glossary.collection"/> + </xsl:message> + <xsl:call-template name="inline.italicseq"/> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$cterm"/> + </xsl:call-template> + </xsl:variable> + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="xref.properties"> + <xsl:call-template name="inline.italicseq"/> + </fo:basic-link> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="not(@linkend) + and ($firstterm.only.link = 0 or $firstterm = 1) + and $glossterm.auto.link != 0"> + <xsl:variable name="term"> + <xsl:choose> + <xsl:when test="@baseform"> + <xsl:value-of select="normalize-space(@baseform)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space(.)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="targets" + select="//glossentry[normalize-space(glossterm)=$term + or normalize-space(glossterm/@baseform)=$term]"/> + + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:choose> + <xsl:when test="count($targets)=0"> + <xsl:message> + <xsl:text>Error: no glossentry for glossterm: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>.</xsl:text> + </xsl:message> + <xsl:call-template name="inline.italicseq"/> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="termid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:variable> + + <fo:basic-link internal-destination="{$termid}" + xsl:use-attribute-sets="xref.properties"> + <xsl:call-template name="inline.charseq"/> + </fo:basic-link> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.italicseq"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="termdef"> + <fo:inline> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'termdef'"/> + <xsl:with-param name="name" select="'prefix'"/> + </xsl:call-template> + <xsl:apply-templates/> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'termdef'"/> + <xsl:with-param name="name" select="'suffix'"/> + </xsl:call-template> + </fo:inline> +</xsl:template> + +<xsl:template match="sgmltag|tag"> + <xsl:variable name="class"> + <xsl:choose> + <xsl:when test="@class"> + <xsl:value-of select="@class"/> + </xsl:when> + <xsl:otherwise>element</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$class='attribute'"> + <xsl:call-template name="inline.monoseq"/> + </xsl:when> + <xsl:when test="$class='attvalue'"> + <xsl:call-template name="inline.monoseq"/> + </xsl:when> + <xsl:when test="$class='element'"> + <xsl:call-template name="inline.monoseq"/> + </xsl:when> + <xsl:when test="$class='endtag'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text></</xsl:text> + <xsl:apply-templates/> + <xsl:text>></xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='genentity'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text>&</xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='numcharref'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text>&#</xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='paramentity'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text>%</xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='pi'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text><?</xsl:text> + <xsl:apply-templates/> + <xsl:text>></xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='xmlpi'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text><?</xsl:text> + <xsl:apply-templates/> + <xsl:text>?></xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='starttag'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text><</xsl:text> + <xsl:apply-templates/> + <xsl:text>></xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='emptytag'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text><</xsl:text> + <xsl:apply-templates/> + <xsl:text>/></xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$class='sgmlcomment' or $class='comment'"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <xsl:text><!--</xsl:text> + <xsl:apply-templates/> + <xsl:text>--></xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.charseq"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="email"> + <xsl:call-template name="inline.monoseq"> + <xsl:with-param name="content"> + <fo:inline keep-together.within-line="always" hyphenate="false"> + <xsl:if test="not($email.delimiters.enabled = 0)"> + <xsl:text><</xsl:text> + </xsl:if> + <xsl:choose> + <xsl:when test="not($email.mailto.enabled = 0)"> + <fo:basic-link xsl:use-attribute-sets="xref.properties" + keep-together.within-line="always" hyphenate="false"> + <xsl:attribute name="external-destination"> + mailto:<xsl:value-of select="string(.)" /> + </xsl:attribute> + <xsl:apply-templates/> + </fo:basic-link> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="not($email.delimiters.enabled = 0)"> + <xsl:text>></xsl:text> + </xsl:if> + </fo:inline> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="keycombo"> + <xsl:variable name="action" select="@action"/> + <xsl:variable name="joinchar"> + <xsl:choose> + <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when> + <xsl:when test="$action='simul'">+</xsl:when> + <xsl:when test="$action='press'">-</xsl:when> + <xsl:when test="$action='click'">-</xsl:when> + <xsl:when test="$action='double-click'">-</xsl:when> + <xsl:when test="$action='other'"></xsl:when> + <xsl:otherwise>+</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:for-each select="*"> + <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if> + <xsl:apply-templates select="."/> + </xsl:for-each> +</xsl:template> + +<xsl:template match="uri"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="menuchoice"> + <xsl:variable name="shortcut" select="./shortcut"/> + <xsl:call-template name="process.menuchoice"/> + <xsl:if test="$shortcut"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="$shortcut"/> + <xsl:text>)</xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template name="process.menuchoice"> + <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) --> + <xsl:param name="count" select="1"/> + + <xsl:variable name="mm.separator"> + <xsl:choose> + <xsl:when test="($fop.extensions != 0 or $fop1.extensions != 0 ) and + contains($menuchoice.menu.separator, '→')"> + <fo:inline font-family="Symbol"> + <xsl:copy-of select="$menuchoice.menu.separator"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$menuchoice.menu.separator"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$count>count($nodelist)"></xsl:when> + <xsl:when test="$count=1"> + <xsl:apply-templates select="$nodelist[$count=position()]"/> + <xsl:call-template name="process.menuchoice"> + <xsl:with-param name="nodelist" select="$nodelist"/> + <xsl:with-param name="count" select="$count+1"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="node" select="$nodelist[$count=position()]"/> + <xsl:choose> + <xsl:when test="local-name($node)='guimenuitem' + or local-name($node)='guisubmenu'"> + <xsl:copy-of select="$mm.separator"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$menuchoice.separator"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="$node"/> + <xsl:call-template name="process.menuchoice"> + <xsl:with-param name="nodelist" select="$nodelist"/> + <xsl:with-param name="count" select="$count+1"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="optional"> + <xsl:value-of select="$arg.choice.opt.open.str"/> + <xsl:call-template name="inline.charseq"/> + <xsl:value-of select="$arg.choice.opt.close.str"/> +</xsl:template> + +<xsl:template match="citation"> + <!-- todo: integrate with bibliography collection --> + <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:choose> + <!-- try automatic linking based on match to abbrev --> + <xsl:when test="$target and not(xref) and not(link)"> + + <xsl:text>[</xsl:text> + <fo:basic-link> + <xsl:attribute name="internal-destination"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:apply-templates select="$target" mode="citation"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.charseq"/> + </xsl:otherwise> + </xsl:choose> + + </fo:basic-link> + <xsl:text>]</xsl:text> + </xsl:when> + + <xsl:otherwise> + <xsl:text>[</xsl:text> + <xsl:call-template name="inline.charseq"/> + <xsl:text>]</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="citebiblioid"> + <xsl:variable name="targets" select="//*[biblioid = string(current())]"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:choose> + <!-- try automatic linking based on match to parent of biblioid --> + <xsl:when test="$target and not(xref) and not(link)"> + + <xsl:text>[</xsl:text> + <fo:basic-link> + <xsl:attribute name="internal-destination"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:call-template name="inline.charseq"/> + + </fo:basic-link> + <xsl:text>]</xsl:text> + </xsl:when> + + <xsl:otherwise> + <xsl:text>[</xsl:text> + <xsl:call-template name="inline.charseq"/> + <xsl:text>]</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="biblioentry|bibliomixed" mode="citation"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]"> + <xsl:if test="$show.comments != 0"> + <fo:block font-style="italic"> + <xsl:call-template name="inline.charseq"/> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="comment|remark"> + <xsl:if test="$show.comments != 0"> + <fo:inline font-style="italic"> + <xsl:call-template name="inline.charseq"/> + </fo:inline> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="productname"> + <xsl:call-template name="inline.charseq"/> + <xsl:if test="@class"> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat" select="@class"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template match="productnumber"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="pob|street|city|state|postcode|country|otheraddr"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="phone|fax"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- in Addresses, for example --> +<xsl:template match="honorific|firstname|surname|lineage|othername"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="person"> + <xsl:apply-templates select="personname"/> +</xsl:template> + +<xsl:template match="personname"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:call-template name="person.name"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="jobtitle"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="org"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="orgname"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="orgdiv"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="affiliation"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="beginpage"> + <!-- does nothing; this *is not* markup to force a page break. --> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/keywords.xsl b/3rdParty/DocBook/XSL/fo/keywords.xsl new file mode 100644 index 0000000..6070b91 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/keywords.xsl @@ -0,0 +1,21 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: keywords.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:template match="keywordset"></xsl:template> +<xsl:template match="subjectset"></xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/lists.xsl b/3rdParty/DocBook/XSL/fo/lists.xsl new file mode 100644 index 0000000..ffe2394 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/lists.xsl @@ -0,0 +1,1393 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: lists.xsl 8436 2009-05-11 08:20:40Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="itemizedlist"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:variable name="pi-label-width"> + <xsl:call-template name="pi.dbfo_label-width"/> + </xsl:variable> + + <xsl:variable name="label-width"> + <xsl:choose> + <xsl:when test="$pi-label-width = ''"> + <xsl:value-of select="$itemizedlist.label.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$pi-label-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="title"> + <xsl:apply-templates select="title" mode="list.title.mode"/> + </xsl:if> + + <!-- Preserve order of PIs and comments --> + <xsl:apply-templates + select="*[not(self::listitem + or self::title + or self::titleabbrev)] + |comment()[not(preceding-sibling::listitem)] + |processing-instruction()[not(preceding-sibling::listitem)]"/> + + <xsl:variable name="content"> + <xsl:apply-templates + select="listitem + |comment()[preceding-sibling::listitem] + |processing-instruction()[preceding-sibling::listitem]"/> + </xsl:variable> + + <!-- nested lists don't add extra list-block spacing --> + <xsl:choose> + <xsl:when test="ancestor::listitem"> + <fo:list-block id="{$id}" xsl:use-attribute-sets="itemizedlist.properties"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:value-of select="$label-width"/> + </xsl:attribute> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:list-block> + </xsl:when> + <xsl:otherwise> + <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing itemizedlist.properties"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:value-of select="$label-width"/> + </xsl:attribute> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template match="itemizedlist/title|orderedlist/title"> + <!--nop--> +</xsl:template> + +<xsl:template match="variablelist/title" mode="vl.as.list"> + <!--nop--> +</xsl:template> + +<xsl:template match="variablelist/title" mode="vl.as.blocks"> + <!--nop--> +</xsl:template> + +<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev"> + <!--nop--> +</xsl:template> + +<xsl:template match="procedure/titleabbrev"> + <!--nop--> +</xsl:template> + +<xsl:template match="variablelist/titleabbrev" mode="vl.as.list"> + <!--nop--> +</xsl:template> + +<xsl:template match="variablelist/titleabbrev" mode="vl.as.blocks"> + <!--nop--> +</xsl:template> + +<xsl:template match="itemizedlist/listitem"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:variable name="item.contents"> + <fo:list-item-label end-indent="label-end()" xsl:use-attribute-sets="itemizedlist.label.properties"> + <fo:block> + <xsl:call-template name="itemizedlist.label.markup"> + <xsl:with-param name="itemsymbol"> + <xsl:call-template name="list.itemsymbol"> + <xsl:with-param name="node" select="parent::itemizedlist"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <xsl:choose> + <!-- * work around broken passivetex list-item-body rendering --> + <xsl:when test="$passivetex.extensions = '1'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </fo:list-item-body> + </xsl:variable> + + <xsl:choose> + <xsl:when test="parent::*/@spacing = 'compact'"> + <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:when> + <xsl:otherwise> + <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="itemizedlist.label.markup"> + <xsl:param name="itemsymbol" select="'disc'"/> + + <xsl:choose> + <xsl:when test="$itemsymbol='none'"></xsl:when> + <xsl:when test="$itemsymbol='disc'">•</xsl:when> + <xsl:when test="$itemsymbol='bullet'">•</xsl:when> + <xsl:when test="$itemsymbol='endash'">–</xsl:when> + <xsl:when test="$itemsymbol='emdash'">—</xsl:when> + <!-- Some of these may work in your XSL-FO processor and fonts --> + <!-- + <xsl:when test="$itemsymbol='square'">■</xsl:when> + <xsl:when test="$itemsymbol='box'">■</xsl:when> + <xsl:when test="$itemsymbol='smallblacksquare'">▪</xsl:when> + <xsl:when test="$itemsymbol='circle'">○</xsl:when> + <xsl:when test="$itemsymbol='opencircle'">○</xsl:when> + <xsl:when test="$itemsymbol='whitesquare'">□</xsl:when> + <xsl:when test="$itemsymbol='smallwhitesquare'">▫</xsl:when> + <xsl:when test="$itemsymbol='round'">●</xsl:when> + <xsl:when test="$itemsymbol='blackcircle'">●</xsl:when> + <xsl:when test="$itemsymbol='whitebullet'">◦</xsl:when> + <xsl:when test="$itemsymbol='triangle'">‣</xsl:when> + <xsl:when test="$itemsymbol='point'">›</xsl:when> + <xsl:when test="$itemsymbol='hand'"><fo:inline + font-family="Wingdings 2">A</fo:inline></xsl:when> + --> + <xsl:otherwise>•</xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="orderedlist"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="pi-label-width"> + <xsl:call-template name="pi.dbfo_label-width"/> + </xsl:variable> + + <xsl:variable name="label-width"> + <xsl:choose> + <xsl:when test="$pi-label-width = ''"> + <xsl:value-of select="$orderedlist.label.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$pi-label-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:if test="title"> + <xsl:apply-templates select="title" mode="list.title.mode"/> + </xsl:if> + + <!-- Preserve order of PIs and comments --> + <xsl:apply-templates + select="*[not(self::listitem + or self::title + or self::titleabbrev)] + |comment()[not(preceding-sibling::listitem)] + |processing-instruction()[not(preceding-sibling::listitem)]"/> + + <xsl:variable name="content"> + <xsl:apply-templates + select="listitem + |comment()[preceding-sibling::listitem] + |processing-instruction()[preceding-sibling::listitem]"/> + </xsl:variable> + + <!-- nested lists don't add extra list-block spacing --> + <xsl:choose> + <xsl:when test="ancestor::listitem"> + <fo:list-block id="{$id}" xsl:use-attribute-sets="orderedlist.properties"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:value-of select="$label-width"/> + </xsl:attribute> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:list-block> + </xsl:when> + <xsl:otherwise> + <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing orderedlist.properties"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:value-of select="$label-width"/> + </xsl:attribute> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="orderedlist/listitem"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:variable name="item.contents"> + <fo:list-item-label end-indent="label-end()" xsl:use-attribute-sets="orderedlist.label.properties"> + <fo:block> + <xsl:apply-templates select="." mode="item-number"/> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </xsl:variable> + + <xsl:choose> + <xsl:when test="parent::*/@spacing = 'compact'"> + <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:when> + <xsl:otherwise> + <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="listitem/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |glossdef/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |step/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |callout/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara']" + priority="2"> + <fo:block> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="variablelist"> + <xsl:variable name="presentation"> + <xsl:call-template name="pi.dbfo_list-presentation"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="." mode="vl.as.list"/> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="." mode="vl.as.blocks"/> + </xsl:when> + <xsl:when test="$variablelist.as.blocks != 0"> + <xsl:apply-templates select="." mode="vl.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="vl.as.list"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="variablelist" mode="vl.as.list"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:variable name="term-width"> + <xsl:call-template name="pi.dbfo_term-width"/> + </xsl:variable> + + <xsl:variable name="termlength"> + <xsl:choose> + <xsl:when test="$term-width != ''"> + <xsl:value-of select="$term-width"/> + </xsl:when> + <xsl:when test="@termlength"> + <xsl:variable name="termlength.is.number"> + <xsl:value-of select="@termlength + 0"/> + </xsl:variable> + <xsl:choose> + <xsl:when test="string($termlength.is.number) = 'NaN'"> + <!-- if the term length isn't just a number, assume it's a measurement --> + <xsl:value-of select="@termlength"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@termlength"/> + <xsl:choose> + <!-- workaround for passivetex lack of support for non-constant expressions --> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text>em</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>em * 0.60</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="longest.term"> + <xsl:with-param name="terms" select="varlistentry/term"/> + <xsl:with-param name="maxlength" select="$variablelist.max.termlength"/> + </xsl:call-template> + <xsl:choose> + <!-- workaround for passivetex lack of support for non-constant expressions --> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text>em</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>em * 0.60</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + +<!-- + <xsl:message> + <xsl:text>term width: </xsl:text> + <xsl:value-of select="$termlength"/> + </xsl:message> +--> + + <xsl:variable name="label-separation">1em</xsl:variable> + <xsl:variable name="distance-between-starts"> + <xsl:choose> + <!-- workaround for passivetex lack of support for non-constant expressions --> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:value-of select="$termlength"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$termlength"/> + <xsl:text>+</xsl:text> + <xsl:value-of select="$label-separation"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="title"> + <xsl:apply-templates select="title" mode="list.title.mode"/> + </xsl:if> + + <!-- Preserve order of PIs and comments --> + <xsl:apply-templates + select="*[not(self::varlistentry + or self::title + or self::titleabbrev)] + |comment()[not(preceding-sibling::varlistentry)] + |processing-instruction()[not(preceding-sibling::varlistentry)]"/> + + <xsl:variable name="content"> + <xsl:apply-templates mode="vl.as.list" + select="varlistentry + |comment()[preceding-sibling::varlistentry] + |processing-instruction()[preceding-sibling::varlistentry]"/> + </xsl:variable> + + <!-- nested lists don't add extra list-block spacing --> + <xsl:choose> + <xsl:when test="ancestor::listitem"> + <fo:list-block id="{$id}" + provisional-distance-between-starts= + "{$distance-between-starts}" + provisional-label-separation="{$label-separation}"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:list-block> + </xsl:when> + <xsl:otherwise> + <fo:list-block id="{$id}" + provisional-distance-between-starts= + "{$distance-between-starts}" + provisional-label-separation="{$label-separation}" + xsl:use-attribute-sets="list.block.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="longest.term"> + <xsl:param name="longest" select="0"/> + <xsl:param name="terms" select="."/> + <xsl:param name="maxlength" select="-1"/> + + <!-- Process out any indexterms in the term --> + <xsl:variable name="term.text"> + <xsl:apply-templates select="$terms[1]"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$longest > $maxlength and $maxlength > 0"> + <xsl:value-of select="$maxlength"/> + </xsl:when> + <xsl:when test="not($terms)"> + <xsl:value-of select="$longest"/> + </xsl:when> + <xsl:when test="string-length($term.text) > $longest"> + <xsl:call-template name="longest.term"> + <xsl:with-param name="longest" + select="string-length($term.text)"/> + <xsl:with-param name="maxlength" select="$maxlength"/> + <xsl:with-param name="terms" select="$terms[position() > 1]"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="longest.term"> + <xsl:with-param name="longest" select="$longest"/> + <xsl:with-param name="maxlength" select="$maxlength"/> + <xsl:with-param name="terms" select="$terms[position() > 1]"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="varlistentry" mode="vl.as.list"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:variable name="item.contents"> + <fo:list-item-label end-indent="label-end()" text-align="start"> + <fo:block xsl:use-attribute-sets="variablelist.term.properties"> + <xsl:apply-templates select="term"/> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <xsl:apply-templates select="listitem"/> + </fo:block> + </fo:list-item-body> + </xsl:variable> + + <xsl:choose> + <xsl:when test="parent::*/@spacing = 'compact'"> + <fo:list-item id="{$id}" + xsl:use-attribute-sets="compact.list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:when> + <xsl:otherwise> + <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<xsl:template match="variablelist" mode="vl.as.blocks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <!-- termlength is irrelevant --> + + <xsl:if test="title"> + <xsl:apply-templates select="title" mode="list.title.mode"/> + </xsl:if> + + <!-- Preserve order of PIs and comments --> + <xsl:apply-templates + select="*[not(self::varlistentry + or self::title + or self::titleabbrev)] + |comment()[not(preceding-sibling::varlistentry)] + |processing-instruction()[not(preceding-sibling::varlistentry)]"/> + + <xsl:variable name="content"> + <xsl:apply-templates mode="vl.as.blocks" + select="varlistentry + |comment()[preceding-sibling::varlistentry] + |processing-instruction()[preceding-sibling::varlistentry]"/> + </xsl:variable> + + <!-- nested lists don't add extra list-block spacing --> + <xsl:choose> + <xsl:when test="ancestor::listitem"> + <fo:block id="{$id}"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" xsl:use-attribute-sets="list.block.spacing"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="varlistentry" mode="vl.as.blocks"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <fo:block id="{$id}" xsl:use-attribute-sets="variablelist.term.properties + list.item.spacing" + keep-together.within-column="always" + keep-with-next.within-column="always"> + <xsl:apply-templates select="term"/> + </fo:block> + + <fo:block> + <xsl:attribute name="margin-{$direction.align.start}">0.25in</xsl:attribute> + <xsl:apply-templates select="listitem"/> + </fo:block> +</xsl:template> + +<xsl:template match="varlistentry/term"> + <fo:inline> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </fo:inline> + <xsl:choose> + <xsl:when test="not(following-sibling::term)"/> <!-- do nothing --> + <xsl:otherwise> + <!-- * if we have multiple terms in the same varlistentry, generate --> + <!-- * a separator (", " by default) and/or an additional line --> + <!-- * break after each one except the last --> + <fo:inline><xsl:value-of select="$variablelist.term.separator"/></fo:inline> + <xsl:if test="not($variablelist.term.break.after = '0')"> + <fo:block/> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="varlistentry/listitem"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="title" mode="list.title.mode"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="simplelist|simplelist[@type='vert']"> + <!-- with no type specified, the default is 'vert' --> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="explicit.table.width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'list-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="table.width"> + <xsl:choose> + <xsl:when test="$explicit.table.width != ''"> + <xsl:value-of select="$explicit.table.width"/> + </xsl:when> + <xsl:when test="$default.table.width = ''"> + <xsl:text>100%</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$default.table.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:table id="{$id}" xsl:use-attribute-sets="normal.para.spacing"> + + <xsl:choose> + <xsl:when test="$axf.extensions != 0 or $xep.extensions != 0"> + <xsl:attribute name="table-layout">auto</xsl:attribute> + <xsl:if test="$explicit.table.width != ''"> + <xsl:attribute name="width"><xsl:value-of + select="$explicit.table.width"/></xsl:attribute> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + <xsl:attribute name="width"><xsl:value-of + select="$table.width"/></xsl:attribute> + </xsl:otherwise> + </xsl:choose> + + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:call-template name="simplelist.vert"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </fo:table-body> + </fo:table> +</xsl:template> + +<xsl:template match="simplelist[@type='inline']"> + <!-- if dbchoice PI exists, use that to determine the choice separator --> + <!-- (that is, equivalent of "and" or "or" in current locale), or literal --> + <!-- value of "choice" otherwise --> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:inline id="{$id}"><xsl:variable name="localized-choice-separator"> + <xsl:choose> + <xsl:when test="processing-instruction('dbchoice')"> + <xsl:call-template name="select.choice.separator"/> + </xsl:when> + <xsl:otherwise> + <!-- empty --> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:for-each select="member"> + <xsl:apply-templates/> + <xsl:choose> + <xsl:when test="position() = last()"/> <!-- do nothing --> + <xsl:otherwise> + <xsl:text>, </xsl:text> + <xsl:if test="position() = last() - 1"> + <xsl:if test="$localized-choice-separator != ''"> + <xsl:value-of select="$localized-choice-separator"/> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each></fo:inline> +</xsl:template> + +<xsl:template match="simplelist[@type='horiz']"> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="explicit.table.width"> + <xsl:call-template name="pi.dbfo_list-width"/> + </xsl:variable> + + <xsl:variable name="table.width"> + <xsl:choose> + <xsl:when test="$explicit.table.width != ''"> + <xsl:value-of select="$explicit.table.width"/> + </xsl:when> + <xsl:when test="$default.table.width = ''"> + <xsl:text>100%</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$default.table.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:table id="{$id}" xsl:use-attribute-sets="normal.para.spacing"> + <xsl:choose> + <xsl:when test="$axf.extensions != 0 or $xep.extensions != 0"> + <xsl:attribute name="table-layout">auto</xsl:attribute> + <xsl:if test="$explicit.table.width != ''"> + <xsl:attribute name="width"><xsl:value-of + select="$explicit.table.width"/></xsl:attribute> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + <xsl:attribute name="width"><xsl:value-of + select="$table.width"/></xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:call-template name="simplelist.horiz"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </fo:table-body> + </fo:table> +</xsl:template> + +<xsl:template name="simplelist.table.columns"> + <xsl:param name="cols" select="1"/> + <xsl:param name="curcol" select="1"/> + <fo:table-column column-number="{$curcol}" + column-width="proportional-column-width(1)"/> + <xsl:if test="$curcol < $cols"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="curcol" select="$curcol + 1"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="simplelist.horiz"> + <xsl:param name="cols">1</xsl:param> + <xsl:param name="cell">1</xsl:param> + <xsl:param name="members" select="./member"/> + + <xsl:if test="$cell <= count($members)"> + <fo:table-row> + <xsl:call-template name="simplelist.horiz.row"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="cell" select="$cell"/> + <xsl:with-param name="members" select="$members"/> + </xsl:call-template> + </fo:table-row> + <xsl:call-template name="simplelist.horiz"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="cell" select="$cell + $cols"/> + <xsl:with-param name="members" select="$members"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="simplelist.horiz.row"> + <xsl:param name="cols">1</xsl:param> + <xsl:param name="cell">1</xsl:param> + <xsl:param name="members" select="./member"/> + <xsl:param name="curcol">1</xsl:param> + + <xsl:if test="$curcol <= $cols"> + <fo:table-cell> + <fo:block> + <xsl:if test="$members[position()=$cell]"> + <xsl:apply-templates select="$members[position()=$cell]"/> + </xsl:if> + </fo:block> + </fo:table-cell> + <xsl:call-template name="simplelist.horiz.row"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="cell" select="$cell+1"/> + <xsl:with-param name="members" select="$members"/> + <xsl:with-param name="curcol" select="$curcol+1"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="simplelist.vert"> + <xsl:param name="cols">1</xsl:param> + <xsl:param name="cell">1</xsl:param> + <xsl:param name="members" select="./member"/> + <xsl:param name="rows" + select="floor((count($members)+$cols - 1) div $cols)"/> + + <xsl:if test="$cell <= $rows"> + <fo:table-row> + <xsl:call-template name="simplelist.vert.row"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="rows" select="$rows"/> + <xsl:with-param name="cell" select="$cell"/> + <xsl:with-param name="members" select="$members"/> + </xsl:call-template> + </fo:table-row> + <xsl:call-template name="simplelist.vert"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="cell" select="$cell+1"/> + <xsl:with-param name="members" select="$members"/> + <xsl:with-param name="rows" select="$rows"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="simplelist.vert.row"> + <xsl:param name="cols">1</xsl:param> + <xsl:param name="rows">1</xsl:param> + <xsl:param name="cell">1</xsl:param> + <xsl:param name="members" select="./member"/> + <xsl:param name="curcol">1</xsl:param> + + <xsl:if test="$curcol <= $cols"> + <fo:table-cell> + <fo:block> + <xsl:if test="$members[position()=$cell]"> + <xsl:apply-templates select="$members[position()=$cell]"/> + </xsl:if> + </fo:block> + </fo:table-cell> + <xsl:call-template name="simplelist.vert.row"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="rows" select="$rows"/> + <xsl:with-param name="cell" select="$cell+$rows"/> + <xsl:with-param name="members" select="$members"/> + <xsl:with-param name="curcol" select="$curcol+1"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template match="member"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="procedure"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="param.placement" + select="substring-after(normalize-space($formal.title.placement), + concat(local-name(.), ' '))"/> + + <xsl:variable name="placement"> + <xsl:choose> + <xsl:when test="contains($param.placement, ' ')"> + <xsl:value-of select="substring-before($param.placement, ' ')"/> + </xsl:when> + <xsl:when test="$param.placement = ''">before</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$param.placement"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Preserve order of PIs and comments --> + <xsl:variable name="preamble" + select="*[not(self::step + or self::title + or self::titleabbrev)] + |comment()[not(preceding-sibling::step)] + |processing-instruction()[not(preceding-sibling::step)]"/> + + <xsl:variable name="steps" + select="step + |comment()[preceding-sibling::step] + |processing-instruction()[preceding-sibling::step]"/> + + <fo:block id="{$id}" xsl:use-attribute-sets="procedure.properties list.block.spacing"> + <xsl:if test="./title and $placement = 'before'"> + <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" --> + <!-- heading even though we called formal.object.heading. odd but true. --> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + + <xsl:apply-templates select="$preamble"/> + + <fo:list-block xsl:use-attribute-sets="list.block.spacing" + provisional-distance-between-starts="2em" + provisional-label-separation="0.2em"> + <xsl:apply-templates select="$steps"/> + </fo:list-block> + + <xsl:if test="./title and $placement != 'before'"> + <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" --> + <!-- heading even though we called formal.object.heading. odd but true. --> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="procedure/title"> +</xsl:template> + +<xsl:template match="substeps"> + <fo:list-block xsl:use-attribute-sets="list.block.spacing" + provisional-distance-between-starts="2em" + provisional-label-separation="0.2em"> + <xsl:apply-templates/> + </fo:list-block> +</xsl:template> + +<xsl:template match="procedure/step|substeps/step"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <fo:list-item xsl:use-attribute-sets="list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <fo:list-item-label end-indent="label-end()"> + <fo:block id="{$id}"> + <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 --> + <xsl:choose> + <xsl:when test="count(../step) = 1"> + <xsl:text>•</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="number"> + <xsl:with-param name="recursive" select="0"/> + </xsl:apply-templates>. + </xsl:otherwise> + </xsl:choose> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<xsl:template match="stepalternatives"> + <fo:list-block provisional-distance-between-starts="2em" + provisional-label-separation="0.2em"> + <xsl:apply-templates select="step"/> + </fo:list-block> +</xsl:template> + +<xsl:template match="stepalternatives/step"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <fo:list-item xsl:use-attribute-sets="list.item.spacing"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <fo:list-item-label end-indent="label-end()"> + <fo:block id="{$id}"> + <xsl:text>•</xsl:text> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<xsl:template match="step/title"> + <fo:block font-weight="bold" + keep-together.within-column="always" + keep-with-next.within-column="always"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="segmentedlist"> + <xsl:variable name="presentation"> + <xsl:call-template name="pi.dbfo_list-presentation"/> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$presentation = 'table'"> + <fo:block id="{$id}"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates select="." mode="seglist-table"/> + </fo:block> + </xsl:when> + <xsl:when test="$presentation = 'list'"> + <fo:block id="{$id}"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:when test="$segmentedlist.as.table != 0"> + <fo:block id="{$id}"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates select="." mode="seglist-table"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="segmentedlist/title"> + <xsl:apply-templates select="." mode="list.title.mode" /> +</xsl:template> + +<xsl:template match="segtitle"> +</xsl:template> + +<xsl:template match="segtitle" mode="segtitle-in-seg"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="seglistitem"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:block id="{$id}"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="seg"> + <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/> + <xsl:variable name="seglist" select="ancestor::segmentedlist"/> + <xsl:variable name="segtitles" select="$seglist/segtitle"/> + + <!-- + Note: segtitle is only going to be the right thing in a well formed + SegmentedList. If there are too many Segs or too few SegTitles, + you'll get something odd...maybe an error + --> + + <fo:block> + <fo:inline font-weight="bold"> + <xsl:apply-templates select="$segtitles[$segnum=position()]" + mode="segtitle-in-seg"/> + <xsl:text>: </xsl:text> + </fo:inline> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="segmentedlist" mode="seglist-table"> + <xsl:apply-templates select="title" mode="list.title.mode" /> + <fo:table> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-header start-indent="0pt" end-indent="0pt"> + <fo:table-row> + <xsl:apply-templates select="segtitle" mode="seglist-table"/> + </fo:table-row> + </fo:table-header> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="seglistitem" mode="seglist-table"/> + </fo:table-body> + </fo:table> +</xsl:template> + +<xsl:template match="segtitle" mode="seglist-table"> + <fo:table-cell> + <fo:block font-weight="bold"> + <xsl:apply-templates/> + </fo:block> + </fo:table-cell> +</xsl:template> + +<xsl:template match="seglistitem" mode="seglist-table"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:table-row id="{$id}"> + <xsl:apply-templates mode="seglist-table"/> + </fo:table-row> +</xsl:template> + +<xsl:template match="seg" mode="seglist-table"> + <fo:table-cell> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </fo:table-cell> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="calloutlist"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="pi-label-width"> + <xsl:call-template name="pi.dbfo_label-width"/> + </xsl:variable> + + <fo:block id="{$id}" + text-align="{$alignment}"> + <!-- The above restores alignment altered by image align attribute --> + <xsl:if test="title|info/title"> + <xsl:apply-templates select="(title|info/title)[1]" + mode="list.title.mode"/> + </xsl:if> + + <!-- Preserve order of PIs and comments --> + <xsl:apply-templates + select="*[not(self::callout or self::title or self::titleabbrev)] + |comment()[not(preceding-sibling::callout)] + |processing-instruction()[not(preceding-sibling::callout)]"/> + + <fo:list-block space-before.optimum="1em" + space-before.minimum="0.8em" + space-before.maximum="1.2em" + provisional-distance-between-starts="2.2em" + provisional-label-separation="0.2em"> + + <xsl:if test="$pi-label-width != ''"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:value-of select="$pi-label-width"/> + </xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="callout + |comment()[preceding-sibling::callout] + |processing-instruction()[preceding-sibling::callout]"/> + </fo:list-block> + </fo:block> +</xsl:template> + +<xsl:template match="calloutlist/title"> +</xsl:template> + +<xsl:template match="callout"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <fo:list-item id="{$id}"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <xsl:call-template name="callout.arearefs"> + <xsl:with-param name="arearefs" select="@arearefs"/> + </xsl:call-template> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<xsl:template name="callout.arearefs"> + <xsl:param name="arearefs"></xsl:param> + <xsl:if test="$arearefs!=''"> + <xsl:choose> + <xsl:when test="substring-before($arearefs,' ')=''"> + <xsl:call-template name="callout.arearef"> + <xsl:with-param name="arearef" select="$arearefs"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="callout.arearef"> + <xsl:with-param name="arearef" + select="substring-before($arearefs,' ')"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + <xsl:call-template name="callout.arearefs"> + <xsl:with-param name="arearefs" + select="substring-after($arearefs,' ')"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="callout.arearef"> + <xsl:param name="arearef"></xsl:param> + <xsl:variable name="targets" select="key('id',$arearef)"/> + <xsl:variable name="target" select="$targets[1]"/> + + <xsl:choose> + <xsl:when test="count($target)=0"> + <xsl:value-of select="$arearef"/> + <xsl:text>: ???</xsl:text> + </xsl:when> + <xsl:when test="local-name($target)='co'"> + <xsl:apply-templates select="$target" mode="callout-bug"/> + </xsl:when> + <xsl:when test="local-name($target)='areaset'"> + <xsl:call-template name="callout-bug"> + <xsl:with-param name="conum"> + <xsl:apply-templates select="$target" mode="conumber"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="local-name($target)='area'"> + <xsl:choose> + <xsl:when test="$target/parent::areaset"> + <xsl:call-template name="callout-bug"> + <xsl:with-param name="conum"> + <xsl:apply-templates select="$target/parent::areaset" + mode="conumber"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="callout-bug"> + <xsl:with-param name="conum"> + <xsl:apply-templates select="$target" mode="conumber"/> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:text>???</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="orderedlist-starting-number"> + <xsl:param name="list" select="."/> + <xsl:variable name="pi-start"> + <xsl:call-template name="pi.dbfo_start"> + <xsl:with-param name="node" select="$list"/> + </xsl:call-template> + </xsl:variable> + <xsl:call-template name="output-orderedlist-starting-number"> + <xsl:with-param name="list" select="$list"/> + <xsl:with-param name="pi-start" select="$pi-start"/> + </xsl:call-template> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/math.xsl b/3rdParty/DocBook/XSL/fo/math.xsl new file mode 100644 index 0000000..6d7d470 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/math.xsl @@ -0,0 +1,140 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + exclude-result-prefixes="mml" + version='1.0'> + +<!-- ******************************************************************** + $Id: math.xsl 7503 2007-10-08 01:57:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:template match="inlineequation"> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0 and $tex.math.in.alt != ''"> + <xsl:apply-templates select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"> + <xsl:with-param name="output.delims"> + <xsl:call-template name="tex.math.output.delims"/> + </xsl:with-param> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="alt"> +</xsl:template> + +<xsl:template match="mathphrase"> + <fo:inline> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<!-- "Support" for MathML --> + +<xsl:template match="mml:math" xmlns:mml="http://www.w3.org/1998/Math/MathML"> + <xsl:choose> + <!-- * If user is using passivetex, we don't wrap the output in --> + <!-- * fo:instream-foreign-object (which passivetex doesn't support). --> + <xsl:when test="not($passivetex.extensions = 0)"> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </xsl:copy> + </xsl:when> + <xsl:otherwise> + <fo:instream-foreign-object> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </xsl:copy> + </fo:instream-foreign-object> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML"> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="equation/graphic | informalequation/graphic"> + <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''"> + <fo:block> + <xsl:call-template name="process.image"/> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="inlineequation/alt[@role='tex'] | + inlineequation/inlinemediaobject/textobject[@role='tex']" priority="1"> + <xsl:param name="output.delims" select="1"/> + <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''"> + <xsl:processing-instruction name="xmltex"> + <xsl:if test="$output.delims != 0"> + <xsl:text>$</xsl:text> + </xsl:if> + <xsl:value-of select="."/> + <xsl:if test="$output.delims != 0"> + <xsl:text>$</xsl:text> + </xsl:if> + </xsl:processing-instruction> + </xsl:if> +</xsl:template> + +<xsl:template match="equation/alt[@role='tex'] | informalequation/alt[@role='tex'] | + equation/mediaobject/textobject[@role='tex'] | + informalequation/mediaobject/textobject[@role='tex']" priority="1"> + <xsl:variable name="output.delims"> + <xsl:call-template name="tex.math.output.delims"/> + </xsl:variable> + <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''"> + <xsl:processing-instruction name="xmltex"> + <xsl:if test="$output.delims != 0"> + <xsl:text>$$</xsl:text> + </xsl:if> + <xsl:value-of select="."/> + <xsl:if test="$output.delims != 0"> + <xsl:text>$$</xsl:text> + </xsl:if> + </xsl:processing-instruction> + </xsl:if> +</xsl:template> + +<xsl:template match="alt[@role='tex']"> + <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''"> + <xsl:message> + Your equation is misplaced. It should be in inlineequation, equation or informalequation. + </xsl:message> + </xsl:if> +</xsl:template> + +<xsl:template name="tex.math.output.delims"> + <xsl:variable name="pi.delims"> + <xsl:call-template name="pi-attribute"> + <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/> + <xsl:with-param name="attribute" select="'delims'"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="result"> + <xsl:choose> + <xsl:when test="$pi.delims = 'no'">0</xsl:when> + <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:value-of select="$result"/> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/pagesetup.xsl b/3rdParty/DocBook/XSL/fo/pagesetup.xsl new file mode 100644 index 0000000..62f5ac4 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/pagesetup.xsl @@ -0,0 +1,2567 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<!-- ******************************************************************** + $Id: pagesetup.xsl 8320 2009-03-12 17:43:44Z mzjn $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:param name="body.fontset"> + <xsl:value-of select="$body.font.family"/> + <xsl:if test="$body.font.family != '' + and $symbol.font.family != ''">,</xsl:if> + <xsl:value-of select="$symbol.font.family"/> +</xsl:param> + +<xsl:param name="title.fontset"> + <xsl:value-of select="$title.font.family"/> + <xsl:if test="$title.font.family != '' + and $symbol.font.family != ''">,</xsl:if> + <xsl:value-of select="$symbol.font.family"/> +</xsl:param> + +<xsl:param name="margin.left.inner"> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.margin.inner"/> + <xsl:text> - </xsl:text> + <xsl:value-of select="$title.margin.left"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:template name="setup.pagemasters"> + <fo:layout-master-set> + <!-- blank pages --> + <fo:simple-page-master master-name="blank" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">blank</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body display-align="center" + margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}"> + <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0"> + <xsl:attribute name="region-name">blank-body</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-blank" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-blank" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- title pages --> + <fo:simple-page-master master-name="titlepage-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">titlepage-first</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.titlepage}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">titlepage-odd</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.titlepage}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">titlepage-even</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.titlepage}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- list-of-title pages --> + <fo:simple-page-master master-name="lot-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">lot-first</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.lot}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">lot-odd</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.lot}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">lot-even</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.lot}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- frontmatter pages --> + <fo:simple-page-master master-name="front-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">front-first</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.front}" + column-count="{$column.count.front}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">front-odd</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.front}" + column-count="{$column.count.front}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">front-even</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.front}" + column-count="{$column.count.front}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- body pages --> + <fo:simple-page-master master-name="body-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">body-first</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.body}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">body-odd</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.body}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">body-even</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.body}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- backmatter pages --> + <fo:simple-page-master master-name="back-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">back-first</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.back}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">back-odd</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.back}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">back-even</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.back}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- index pages --> + <fo:simple-page-master master-name="index-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">index-first</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.index}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">index-odd</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.index}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">index-even</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.index}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <xsl:if test="$draft.mode != 'no'"> + <!-- draft blank pages --> + <fo:simple-page-master master-name="blank-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">blank-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-blank" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-blank" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft title pages --> + <fo:simple-page-master master-name="titlepage-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">titlepage-first-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.titlepage}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">titlepage-odd-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.titlepage}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">titlepage-even-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.titlepage}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft list-of-title pages --> + <fo:simple-page-master master-name="lot-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">lot-first-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.lot}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">lot-odd-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.lot}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">lot-even-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.lot}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft frontmatter pages --> + <fo:simple-page-master master-name="front-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">front-first-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.front}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">front-odd-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.front}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">front-even-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.front}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft body pages --> + <fo:simple-page-master master-name="body-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">body-first-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.body}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">body-odd-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.body}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">body-even-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.body}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft backmatter pages --> + <fo:simple-page-master master-name="back-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">back-first-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.back}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">back-odd-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.back}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">back-even-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.back}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft index pages --> + <fo:simple-page-master master-name="index-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">index-first-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.index}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.inner"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.outer"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">index-odd-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.index}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$page.margin.outer"/> + <xsl:if test="$fop.extensions != 0"> + <xsl:value-of select="concat(' - (',$title.margin.left,')')"/> + </xsl:if> + </xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}"> + <xsl:value-of select="$page.margin.inner"/> + </xsl:attribute> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-page-master-properties"> + <xsl:with-param name="page.master">index-even-draft</xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-gap="{$column.gap.index}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != ''"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + </xsl:if> + + <!-- setup for title page(s) --> + <fo:page-sequence-master master-name="titlepage"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="titlepage-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="titlepage-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">titlepage-even</xsl:when> + <xsl:otherwise>titlepage-odd</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for lots --> + <fo:page-sequence-master master-name="lot"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="lot-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="lot-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">lot-even</xsl:when> + <xsl:otherwise>lot-odd</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup front matter --> + <fo:page-sequence-master master-name="front"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="front-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="front-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">front-even</xsl:when> + <xsl:otherwise>front-odd</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for body pages --> + <fo:page-sequence-master master-name="body"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="body-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="body-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">body-even</xsl:when> + <xsl:otherwise>body-odd</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup back matter --> + <fo:page-sequence-master master-name="back"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="back-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="back-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">back-even</xsl:when> + <xsl:otherwise>back-odd</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup back matter --> + <fo:page-sequence-master master-name="index"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="index-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="index-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">index-even</xsl:when> + <xsl:otherwise>index-odd</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <xsl:if test="$draft.mode != 'no'"> + <!-- setup for draft title page(s) --> + <fo:page-sequence-master master-name="titlepage-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="titlepage-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="titlepage-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">titlepage-even-draft</xsl:when> + <xsl:otherwise>titlepage-odd-draft</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for draft lots --> + <fo:page-sequence-master master-name="lot-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="lot-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="lot-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">lot-even-draft</xsl:when> + <xsl:otherwise>lot-odd-draft</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft front matter --> + <fo:page-sequence-master master-name="front-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="front-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="front-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">front-even-draft</xsl:when> + <xsl:otherwise>front-odd-draft</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for draft body pages --> + <fo:page-sequence-master master-name="body-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="body-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="body-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">body-even-draft</xsl:when> + <xsl:otherwise>body-odd-draft</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft back matter --> + <fo:page-sequence-master master-name="back-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="back-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="back-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">back-even-draft</xsl:when> + <xsl:otherwise>back-odd-draft</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft index pages --> + <fo:page-sequence-master master-name="index-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="index-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="index-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference + odd-or-even="even"> + <xsl:attribute name="master-reference"> + <xsl:choose> + <xsl:when test="$double.sided != 0">index-even-draft</xsl:when> + <xsl:otherwise>index-odd-draft</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </fo:conditional-page-master-reference> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + </xsl:if> + + <xsl:call-template name="user.pagemasters"/> + + </fo:layout-master-set> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="user.pagemasters"/> <!-- intentionally empty --> + +<!-- ==================================================================== --> + +<xsl:template name="select.pagemaster"> + <xsl:param name="element" select="local-name(.)"/> + <xsl:param name="pageclass" select="''"/> + + <xsl:variable name="pagemaster"> + <xsl:choose> + <xsl:when test="$pageclass != ''"> + <xsl:value-of select="$pageclass"/> + </xsl:when> + <xsl:when test="$pageclass = 'lot'">lot</xsl:when> + <xsl:when test="$element = 'dedication'">front</xsl:when> + <xsl:when test="$element = 'acknowledgements'">front</xsl:when> + <xsl:when test="$element = 'preface'">front</xsl:when> + <xsl:when test="$element = 'appendix'">back</xsl:when> + <xsl:when test="$element = 'glossary'">back</xsl:when> + <xsl:when test="$element = 'bibliography'">back</xsl:when> + <xsl:when test="$element = 'index'">index</xsl:when> + <xsl:when test="$element = 'colophon'">back</xsl:when> + <xsl:otherwise>body</xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="$draft.mode = 'yes'"> + <xsl:text>-draft</xsl:text> + </xsl:when> + <xsl:when test="$draft.mode = 'no'"> + <!-- nop --> + </xsl:when> + <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> + <xsl:text>-draft</xsl:text> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:call-template name="select.user.pagemaster"> + <xsl:with-param name="element" select="$element"/> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="default-pagemaster" select="$pagemaster"/> + </xsl:call-template> +</xsl:template> + +<xsl:template name="select.user.pagemaster"> + <xsl:param name="element"/> + <xsl:param name="pageclass"/> + <xsl:param name="default-pagemaster"/> + + <!-- by default, return the default. But if you've created your own + pagemasters in user.pagemasters, you might want to select one here. --> + <xsl:value-of select="$default-pagemaster"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="head.sep.rule"> + <xsl:param name="pageclass"/> + <xsl:param name="sequence"/> + <xsl:param name="gentext-key"/> + + <xsl:if test="$header.rule != 0"> + <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-bottom-color">black</xsl:attribute> + </xsl:if> +</xsl:template> + +<xsl:template name="foot.sep.rule"> + <xsl:param name="pageclass"/> + <xsl:param name="sequence"/> + <xsl:param name="gentext-key"/> + + <xsl:if test="$footer.rule != 0"> + <xsl:attribute name="border-top-width">0.5pt</xsl:attribute> + <xsl:attribute name="border-top-style">solid</xsl:attribute> + <xsl:attribute name="border-top-color">black</xsl:attribute> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="running.head.mode"> + <xsl:param name="master-reference" select="'unknown'"/> + <xsl:param name="gentext-key" select="local-name(.)"/> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:static-content flow-name="xsl-region-before-first"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'first'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-odd"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'odd'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-even"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'even'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-blank"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'blank'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <xsl:call-template name="footnote-separator"/> + + <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0"> + <xsl:call-template name="blank.page.content"/> + </xsl:if> +</xsl:template> + +<xsl:template name="footnote-separator"> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block> + <fo:leader xsl:use-attribute-sets="footnote.sep.leader.properties"/> + </fo:block> + </fo:static-content> +</xsl:template> + +<xsl:template name="blank.page.content"> + <fo:static-content flow-name="blank-body"> + <fo:block text-align="center"/> + </fo:static-content> +</xsl:template> + +<xsl:template name="header.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + + <!-- default is a single table style for all headers --> + <!-- Customize it for different page classes or sequence location --> + + <xsl:choose> + <xsl:when test="$pageclass = 'index'"> + <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute> + </xsl:when> + </xsl:choose> + + <xsl:variable name="column1"> + <xsl:choose> + <xsl:when test="$double.sided = 0">1</xsl:when> + <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when> + <xsl:otherwise>3</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="column3"> + <xsl:choose> + <xsl:when test="$double.sided = 0">3</xsl:when> + <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="candidate"> + <fo:table xsl:use-attribute-sets="header.table.properties"> + <xsl:call-template name="head.sep.rule"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + + <fo:table-column column-number="1"> + <xsl:attribute name="column-width"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:call-template name="header.footer.width"> + <xsl:with-param name="location">header</xsl:with-param> + <xsl:with-param name="position" select="$column1"/> + </xsl:call-template> + <xsl:text>)</xsl:text> + </xsl:attribute> + </fo:table-column> + <fo:table-column column-number="2"> + <xsl:attribute name="column-width"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:call-template name="header.footer.width"> + <xsl:with-param name="location">header</xsl:with-param> + <xsl:with-param name="position" select="2"/> + </xsl:call-template> + <xsl:text>)</xsl:text> + </xsl:attribute> + </fo:table-column> + <fo:table-column column-number="3"> + <xsl:attribute name="column-width"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:call-template name="header.footer.width"> + <xsl:with-param name="location">header</xsl:with-param> + <xsl:with-param name="position" select="$column3"/> + </xsl:call-template> + <xsl:text>)</xsl:text> + </xsl:attribute> + </fo:table-column> + + <fo:table-body> + <fo:table-row> + <xsl:attribute name="block-progression-dimension.minimum"> + <xsl:value-of select="$header.table.height"/> + </xsl:attribute> + <fo:table-cell text-align="start" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="$direction.align.start"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="right" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="$direction.align.end"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + + <!-- Really output a header? --> + <xsl:choose> + <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book' + and $sequence='first'"> + <!-- no, book titlepages have no headers at all --> + </xsl:when> + <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0"> + <!-- no output --> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$candidate"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="header.content"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="position" select="''"/> + <xsl:param name="gentext-key" select="''"/> + +<!-- + <fo:block> + <xsl:value-of select="$pageclass"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$sequence"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$position"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$gentext-key"/> + </fo:block> +--> + + <fo:block> + + <!-- sequence can be odd, even, first, blank --> + <!-- position can be left, center, right --> + <xsl:choose> + <xsl:when test="$sequence = 'blank'"> + <!-- nothing --> + </xsl:when> + + <xsl:when test="$position='left'"> + <!-- Same for odd, even, empty, and blank sequences --> + <xsl:call-template name="draft.text"/> + </xsl:when> + + <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'"> + <xsl:if test="$pageclass != 'titlepage'"> + <xsl:choose> + <xsl:when test="ancestor::book and ($double.sided != 0)"> + <fo:retrieve-marker retrieve-class-name="section.head.marker" + retrieve-position="first-including-carryover" + retrieve-boundary="page-sequence"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:when> + + <xsl:when test="$position='center'"> + <!-- nothing for empty and blank sequences --> + </xsl:when> + + <xsl:when test="$position='right'"> + <!-- Same for odd, even, empty, and blank sequences --> + <xsl:call-template name="draft.text"/> + </xsl:when> + + <xsl:when test="$sequence = 'first'"> + <!-- nothing for first pages --> + </xsl:when> + + <xsl:when test="$sequence = 'blank'"> + <!-- nothing for blank pages --> + </xsl:when> + </xsl:choose> + </fo:block> +</xsl:template> + +<xsl:template name="header.footer.width"> + <xsl:param name="location" select="'header'"/> + <xsl:param name="position" select="1"/> + + <xsl:variable name="width.set"> + <xsl:choose> + <xsl:when test="$location = 'header'"> + <xsl:value-of select="normalize-space($header.column.widths)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space($footer.column.widths)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$position = 1"> + <xsl:value-of select="substring-before($width.set, ' ')"/> + </xsl:when> + <xsl:when test="$position = 2"> + <xsl:value-of select="substring-before(substring-after($width.set, ' '), ' ')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="substring-after(substring-after($width.set, ' '), ' ')"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Make sure it is a number --> + <xsl:choose> + <xsl:when test = "$width = number($width)"> + <xsl:value-of select="$width"/> + </xsl:when> + <xsl:otherwise> + <xsl:message>Error: value in <xsl:value-of select="$location"/>.column.widths at position <xsl:value-of select="$position"/> is not a number.</xsl:message> + <xsl:text>1</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="draft.text"> + <xsl:choose> + <xsl:when test="$draft.mode = 'yes'"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Draft'"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$draft.mode = 'no'"> + <!-- nop --> + </xsl:when> + <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Draft'"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="running.foot.mode"> + <xsl:param name="master-reference" select="'unknown'"/> + <xsl:param name="gentext-key" select="local-name(.)"/> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:static-content flow-name="xsl-region-after-first"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'first'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-odd"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'odd'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-even"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'even'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-blank"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'blank'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> +</xsl:template> + +<xsl:template name="footer.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + + <!-- default is a single table style for all footers --> + <!-- Customize it for different page classes or sequence location --> + + <xsl:choose> + <xsl:when test="$pageclass = 'index'"> + <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute> + </xsl:when> + </xsl:choose> + + <xsl:variable name="column1"> + <xsl:choose> + <xsl:when test="$double.sided = 0">1</xsl:when> + <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when> + <xsl:otherwise>3</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="column3"> + <xsl:choose> + <xsl:when test="$double.sided = 0">3</xsl:when> + <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="candidate"> + <fo:table xsl:use-attribute-sets="footer.table.properties"> + <xsl:call-template name="foot.sep.rule"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + <fo:table-column column-number="1"> + <xsl:attribute name="column-width"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:call-template name="header.footer.width"> + <xsl:with-param name="location">footer</xsl:with-param> + <xsl:with-param name="position" select="$column1"/> + </xsl:call-template> + <xsl:text>)</xsl:text> + </xsl:attribute> + </fo:table-column> + <fo:table-column column-number="2"> + <xsl:attribute name="column-width"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:call-template name="header.footer.width"> + <xsl:with-param name="location">footer</xsl:with-param> + <xsl:with-param name="position" select="2"/> + </xsl:call-template> + <xsl:text>)</xsl:text> + </xsl:attribute> + </fo:table-column> + <fo:table-column column-number="3"> + <xsl:attribute name="column-width"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:call-template name="header.footer.width"> + <xsl:with-param name="location">footer</xsl:with-param> + <xsl:with-param name="position" select="$column3"/> + </xsl:call-template> + <xsl:text>)</xsl:text> + </xsl:attribute> + </fo:table-column> + + <fo:table-body> + <fo:table-row> + <xsl:attribute name="block-progression-dimension.minimum"> + <xsl:value-of select="$footer.table.height"/> + </xsl:attribute> + <fo:table-cell text-align="start" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="$direction.align.start"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="end" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="$direction.align.end"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + + <!-- Really output a footer? --> + <xsl:choose> + <xsl:when test="$pageclass='titlepage' and $gentext-key='book' + and $sequence='first'"> + <!-- no, book titlepages have no footers at all --> + </xsl:when> + <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0"> + <!-- no output --> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$candidate"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="footer.content"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="position" select="''"/> + <xsl:param name="gentext-key" select="''"/> + +<!-- + <fo:block> + <xsl:value-of select="$pageclass"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$sequence"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$position"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$gentext-key"/> + </fo:block> +--> + + <fo:block> + <!-- pageclass can be front, body, back --> + <!-- sequence can be odd, even, first, blank --> + <!-- position can be left, center, right --> + <xsl:choose> + <xsl:when test="$pageclass = 'titlepage'"> + <!-- nop; no footer on title pages --> + </xsl:when> + + <xsl:when test="$double.sided != 0 and $sequence = 'even' + and $position='left'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first') + and $position='right'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$double.sided = 0 and $position='center'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$sequence='blank'"> + <xsl:choose> + <xsl:when test="$double.sided != 0 and $position = 'left'"> + <fo:page-number/> + </xsl:when> + <xsl:when test="$double.sided = 0 and $position = 'center'"> + <fo:page-number/> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="page.number.format"> + <xsl:param name="element" select="local-name(.)"/> + <xsl:param name="master-reference" select="''"/> + + <xsl:choose> + <xsl:when test="$element = 'toc' and self::book">i</xsl:when> + <xsl:when test="$element = 'preface'">i</xsl:when> + <xsl:when test="$element = 'dedication'">i</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="initial.page.number"> + <xsl:param name="element" select="local-name(.)"/> + <xsl:param name="master-reference" select="''"/> + + <!-- Select the first content that the stylesheet places + after the TOC --> + <xsl:variable name="first.book.content" + select="ancestor::book/*[ + not(self::title or + self::subtitle or + self::titleabbrev or + self::bookinfo or + self::info or + self::dedication or + self::preface or + self::toc or + self::lot)][1]"/> + <xsl:choose> + <!-- double-sided output --> + <xsl:when test="$double.sided != 0"> + <xsl:choose> + <xsl:when test="$element = 'toc'">auto-odd</xsl:when> + <xsl:when test="$element = 'book'">1</xsl:when> + <!-- preface typically continues TOC roman numerals --> + <!-- Change page.number.format if not --> + <xsl:when test="$element = 'preface'">auto-odd</xsl:when> + <xsl:when test="($element = 'dedication' or $element = 'article') + and not(preceding::chapter + or preceding::preface + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)">1</xsl:when> + <xsl:when test="generate-id($first.book.content) = + generate-id(.)">1</xsl:when> + <xsl:otherwise>auto-odd</xsl:otherwise> + </xsl:choose> + </xsl:when> + + <!-- single-sided output --> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$element = 'toc'">auto</xsl:when> + <xsl:when test="$element = 'book'">1</xsl:when> + <xsl:when test="$element = 'preface'">auto</xsl:when> + <xsl:when test="($element = 'dedication' or $element = 'article') and + not(preceding::chapter + or preceding::preface + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)">1</xsl:when> + <xsl:when test="generate-id($first.book.content) = + generate-id(.)">1</xsl:when> + <xsl:otherwise>auto</xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="force.page.count"> + <xsl:param name="element" select="local-name(.)"/> + <xsl:param name="master-reference" select="''"/> + + <xsl:choose> + <!-- double-sided output --> + <xsl:when test="$double.sided != 0">end-on-even</xsl:when> + <!-- single-sided output --> + <xsl:otherwise>no-force</xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="set.flow.properties"> + <xsl:param name="element" select="local-name(.)"/> + <xsl:param name="master-reference" select="''"/> + + <!-- This template is called after each <fo:flow> starts. --> + <!-- Customize this template to set attributes on fo:flow --> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$fop.extensions != 0 or $passivetex.extensions != 0"> + <!-- body.start.indent does not work well with these processors --> + </xsl:when> + <xsl:when test="starts-with($pageclass, 'body') or + starts-with($pageclass, 'lot') or + starts-with($pageclass, 'front') or + $element = 'preface' or + (starts-with($pageclass, 'back') and + $element = 'appendix')"> + <xsl:attribute name="start-indent"> + <xsl:value-of select="$body.start.indent"/> + </xsl:attribute> + <xsl:attribute name="end-indent"> + <xsl:value-of select="$body.end.indent"/> + </xsl:attribute> + </xsl:when> + </xsl:choose> + +</xsl:template> +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/param.xml b/3rdParty/DocBook/XSL/fo/param.xml new file mode 100644 index 0000000..25d366c --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/param.xml @@ -0,0 +1,12413 @@ +<?xml version="1.0" encoding="ASCII"?> +<book version="5.0"> +<info> +<title>FO Parameter Reference</title> +<releaseinfo role="meta"> +$Id: param.xweb 8392 2009-04-01 08:47:55Z bobstayton $ +</releaseinfo> +<author> + <personname> + <surname>Walsh</surname> + <firstname>Norman</firstname> + </personname> +</author> +<copyright> + <year>1999</year> + <year>2000</year> + <year>2001</year> + <year>2002</year> + <year>2003</year> + <year>2004</year> + <year>2005</year> + <year>2006</year> + <year>2007</year> + <holder>Norman Walsh</holder> +</copyright> +<abstract> + <para>This is reference documentation for all user-configurable + parameters in the DocBook XSL FO stylesheets (for generating + XSL-FO output destined for final print/PDF output).</para> +</abstract> +</info> +<reference xml:id="admons"><title>Admonitions</title> +<refentry version="5.0" xml:id="admon.graphics"> +<refmeta> +<refentrytitle>admon.graphics</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>admon.graphics</refname> +<refpurpose>Use graphics in admonitions?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="admon.graphics.frag"> +<xsl:param name="admon.graphics" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If true (non-zero), admonitions are presented in an alternate style that uses +a graphic. Default graphics are provided in the distribution. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="admon.graphics.extension"> +<refmeta> +<refentrytitle>admon.graphics.extension</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>admon.graphics.extension</refname> +<refpurpose>Filename extension for admonition graphics</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="admon.graphics.extension.frag"> +<xsl:param name="admon.graphics.extension">.png</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets the filename extension to use on admonition graphics.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="admon.graphics.path"> +<refmeta> +<refentrytitle>admon.graphics.path</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>admon.graphics.path</refname> +<refpurpose>Path to admonition graphics</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="admon.graphics.path.frag"><xsl:param name="admon.graphics.path">images/</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets the path to the directory containing the admonition graphics +(caution.png, important.png etc). This location is normally relative +to the output html directory. See <parameter>base.dir</parameter></para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="admon.textlabel"> +<refmeta> +<refentrytitle>admon.textlabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>admon.textlabel</refname> +<refpurpose>Use text label in admonitions?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="admon.textlabel.frag"> +<xsl:param name="admon.textlabel" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If true (non-zero), admonitions are presented with a generated +text label such as Note or Warning in the appropriate language. +If zero, such labels are turned off, but any title child +of the admonition element are still output. +The default value is 1. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="admonition.title.properties"> + +<refmeta> + <refentrytitle>admonition.title.properties</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>admonition.title.properties</refname> +<refpurpose>To set the style for admonitions titles.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="admonition.title.properties.frag"> +<xsl:attribute-set name="admonition.title.properties"> + <xsl:attribute name="font-size">14pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>How do you want admonitions titles styled? </para> +<para>Set the font-size, weight etc to the style required.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="admonition.properties"> +<refmeta> + <refentrytitle>admonition.properties</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>admonition.properties</refname> +<refpurpose>To set the style for admonitions.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="admonition.properties.frag"><xsl:attribute-set name="admonition.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>How do you want admonitions styled? </para> +<para>Set the font-size, weight, etc. to the style required</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="graphical.admonition.properties"> +<refmeta> +<refentrytitle>graphical.admonition.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>graphical.admonition.properties</refname> +<refpurpose>To add properties to the outer block of a graphical admonition.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="graphical.admonition.properties.frag"><xsl:attribute-set name="graphical.admonition.properties"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the outer block containing the +entire graphical admonition, including its title. +It is used when the parameter +<parameter>admon.graphics</parameter> is set to nonzero. +Use this attribute-set to set the space above and below, +and any indent for the whole admonition.</para> + +<para>In addition to these properties, a graphical admonition +also applies the <parameter>admonition.title.properties</parameter> +attribute-set to the title, and applies the +<parameter>admonition.properties</parameter> attribute-set +to the rest of the content.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="nongraphical.admonition.properties"> +<refmeta> +<refentrytitle>nongraphical.admonition.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>nongraphical.admonition.properties</refname> +<refpurpose>To add properties to the outer block of a nongraphical admonition.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="nongraphical.admonition.properties.frag"><xsl:attribute-set name="nongraphical.admonition.properties"> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.start}">0.25in</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}">0.25in</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the outer block containing the +entire nongraphical admonition, including its title. +It is used when the parameter +<parameter>admon.graphics</parameter> is set to zero. +Use this attribute-set to set the space above and below, +and any indent for the whole admonition.</para> + +<para>In addition to these properties, a nongraphical admonition +also applies the <parameter>admonition.title.properties</parameter> +attribute-set to the title, and the +<parameter>admonition.properties</parameter> attribute-set +to the rest of the content.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="callouts"><title>Callouts</title> +<refentry version="5.0" xml:id="callout.defaultcolumn"> +<refmeta> +<refentrytitle>callout.defaultcolumn</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.defaultcolumn</refname> +<refpurpose>Indicates what column callouts appear in by default</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.defaultcolumn.frag"> +<xsl:param name="callout.defaultcolumn">60</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If a callout does not identify a column (for example, if it uses +the <literal>linerange</literal> <tag class="attribute">unit</tag>), +it will appear in the default column. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.graphics"> +<refmeta> +<refentrytitle>callout.graphics</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.graphics</refname> +<refpurpose>Use graphics for callouts?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.graphics.frag"> +<xsl:param name="callout.graphics" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, callouts are presented with graphics (e.g., reverse-video +circled numbers instead of "(1)", "(2)", etc.). +Default graphics are provided in the distribution. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.graphics.extension"> +<refmeta> +<refentrytitle>callout.graphics.extension</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.graphics.extension</refname> +<refpurpose>Filename extension for callout graphics</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.graphics.extension.frag"> + +<xsl:param name="callout.graphics.extension">.svg</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para>Sets the filename extension to use on callout graphics. </para> + +<itemizedlist> +<para>The Docbook XSL distribution provides callout graphics in the following formats:</para> +<listitem><para>SVG (extension: <filename class="extension">.svg</filename>)</para></listitem> +<listitem><para>PNG (extension: <filename class="extension">.png</filename>)</para></listitem> +<listitem><para>GIF (extension: <filename class="extension">.gif</filename>)</para></listitem> +</itemizedlist> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.graphics.number.limit"> +<refmeta> +<refentrytitle>callout.graphics.number.limit</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.graphics.number.limit</refname> +<refpurpose>Number of the largest callout graphic</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.graphics.number.limit.frag"> + +<xsl:param name="callout.graphics.number.limit">30</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>callout.graphics</parameter> is non-zero, graphics +are used to represent callout numbers instead of plain text. The value +of <parameter>callout.graphics.number.limit</parameter> is the largest +number for which a graphic exists. If the callout number exceeds this +limit, the default presentation "(plain text instead of a graphic)" +will be used. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.graphics.path"> +<refmeta> +<refentrytitle>callout.graphics.path</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.graphics.path</refname> +<refpurpose>Path to callout graphics</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.graphics.path.frag"> +<xsl:param name="callout.graphics.path">images/callouts/</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets the path to the directory holding the callout graphics. his +location is normally relative to the output html directory. see +base.dir. Always terminate the directory with / since the graphic file +is appended to this string, hence needs the separator. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.icon.size"> +<refmeta> +<refentrytitle>callout.icon.size</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.icon.size</refname> +<refpurpose>Specifies the size of callout marker icons</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.icon.size.frag"> +<xsl:param name="callout.icon.size">7pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the size of the callout marker icons. +The default size is 7 points.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.unicode"> +<refmeta> +<refentrytitle>callout.unicode</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.unicode</refname> +<refpurpose>Use Unicode characters rather than images for callouts.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.unicode.frag"><xsl:param name="callout.unicode" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The stylesheets can use either an image of the numbers one to ten, or the single Unicode character which represents the numeral, in white on a black background. Use this to select the Unicode character option. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.unicode.font"> +<refmeta> +<refentrytitle>callout.unicode.font</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.unicode.font</refname> +<refpurpose>Specify a font for Unicode glyphs</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.unicode.font.frag"> +<xsl:param name="callout.unicode.font">ZapfDingbats</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The name of the font to specify around Unicode callout glyphs. +If set to the empty string, no font change will occur. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.unicode.number.limit"> +<refmeta> +<refentrytitle>callout.unicode.number.limit</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.unicode.number.limit</refname> +<refpurpose>Number of the largest unicode callout character</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.unicode.number.limit.frag"> +<xsl:param name="callout.unicode.number.limit">10</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>callout.unicode</parameter> +is non-zero, unicode characters are used to represent +callout numbers. The value of +<parameter>callout.unicode.number.limit</parameter> +is +the largest number for which a unicode character exists. If the callout number +exceeds this limit, the default presentation "(nnn)" will always +be used. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callout.unicode.start.character"> +<refmeta> +<refentrytitle>callout.unicode.start.character</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callout.unicode.start.character</refname> +<refpurpose>First Unicode character to use, decimal value.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callout.unicode.start.character.frag"> +<xsl:param name="callout.unicode.start.character">10102</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>callout.graphics</parameter> is zero and <parameter>callout.unicode</parameter> +is non-zero, unicode characters are used to represent +callout numbers. The value of +<parameter>callout.unicode.start.character</parameter> +is the decimal unicode value used for callout number one. Currently, +only 10102 is supported in the stylesheets for this parameter. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="callouts.extension"> +<refmeta> +<refentrytitle>callouts.extension</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>callouts.extension</refname> +<refpurpose>Enable the callout extension</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="callouts.extension.frag"> +<xsl:param name="callouts.extension" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The callouts extension processes <tag>areaset</tag> +elements in <tag>ProgramListingCO</tag> and other text-based +callout elements. +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="toc_index"><title>ToC/LoT/Index Generation</title> +<refentry version="5.0" xml:id="autotoc.label.separator"> +<refmeta> +<refentrytitle>autotoc.label.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>autotoc.label.separator</refname> +<refpurpose>Separator between labels and titles in the ToC</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="autotoc.label.separator.frag"> +<xsl:param name="autotoc.label.separator">. </xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>String used to separate labels and titles in a table of contents.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="process.empty.source.toc"> +<refmeta> +<refentrytitle>process.empty.source.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>process.empty.source.toc</refname> +<refpurpose>Generate automated TOC if <tag>toc</tag> element occurs in a source document?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="process.empty.source.toc.frag"><xsl:param name="process.empty.source.toc" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies that if an empty <tag>toc</tag> element is found in a +source document, an automated TOC is generated at this point in the +document. +<note> + <para>Depending on what the value of the + <parameter>generate.toc</parameter> parameter is, setting this + parameter to <literal>1</literal> could result in generation of + duplicate automated TOCs. So the + <parameter>process.empty.source.toc</parameter> is primarily useful + as an "override": by placing an empty <tag>toc</tag> in your + document and setting this parameter to <literal>1</literal>, you can + force a TOC to be generated even if <tag>generate.toc</tag> + says not to.</para> +</note> +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="process.source.toc"> +<refmeta> +<refentrytitle>process.source.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>process.source.toc</refname> +<refpurpose>Process a non-empty <tag>toc</tag> element if it occurs in a source document?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="process.source.toc.frag"><xsl:param name="process.source.toc" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies that the contents of a non-empty "hard-coded" +<tag>toc</tag> element in a source document are processed to +generate a TOC in output. +<note> + <para>This parameter has no effect on automated generation of + TOCs. An automated TOC may still be generated along with the + "hard-coded" TOC. To suppress automated TOC generation, adjust the + value of the <parameter>generate.toc</parameter> paramameter.</para> + + <para>The <tag>process.source.toc</tag> parameter also has + no effect if the <tag>toc</tag> element is empty; handling + for empty <tag>toc</tag> is controlled by the + <parameter>process.empty.source.toc</parameter> parameter.</para> +</note> +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="generate.toc"> +<refmeta> +<refentrytitle>generate.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">table</refmiscinfo> +</refmeta> +<refnamediv> +<refname>generate.toc</refname> +<refpurpose>Control generation of ToCs and LoTs</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="generate.toc.frag"> + +<xsl:param name="generate.toc"> +/appendix toc,title +article/appendix nop +/article toc,title +book toc,title,figure,table,example,equation +/chapter toc,title +part toc,title +/preface toc,title +reference toc,title +/sect1 toc +/sect2 toc +/sect3 toc +/sect4 toc +/sect5 toc +/section toc +set toc,title +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter has a structured value. It is a table of space-delimited +path/value pairs. Each path identifies some element in the source document +using a restricted subset of XPath (only the implicit child axis, no wildcards, +no predicates). Paths can be either relative or absolute.</para> + +<para>When processing a particular element, the stylesheets consult this table to +determine if a ToC (or LoT(s)) should be generated.</para> + +<para>For example, consider the entry:</para> + +<screen>book toc,figure</screen> + +<para>This indicates that whenever a <tag>book</tag> is formatted, a +Table Of Contents and a List of Figures should be generated. Similarly,</para> + +<screen>/chapter toc</screen> + +<para>indicates that whenever a document <emphasis>that has a root +of</emphasis> <tag>chapter</tag> is formatted, a Table of +Contents should be generated. The entry <literal>chapter</literal> would match +all chapters, but <literal>/chapter</literal> matches only <tag>chapter</tag> +document elements.</para> + +<para>Generally, the longest match wins. So, for example, if you want to distinguish +articles in books from articles in parts, you could use these two entries:</para> + +<screen>book/article toc,figure +part/article toc</screen> + +<para>Note that an article in a part can never match a <literal>book/article</literal>, +so if you want nothing to be generated for articles in parts, you can simply leave +that rule out.</para> + +<para>If you want to leave the rule in, to make it explicit that you're turning +something off, use the value <quote>nop</quote>. For example, the following +entry disables ToCs and LoTs for articles:</para> + +<screen>article nop</screen> + +<para>Do not simply leave the word <quote>article</quote> in the file +without a matching value. That'd be just begging the silly little +path/value parser to get confused.</para> + +<para>Section ToCs are further controlled by the +<parameter>generate.section.toc.level</parameter> parameter. +For a given section level to have a ToC, it must have both an entry in +<parameter>generate.toc</parameter> and be within the range enabled by +<parameter>generate.section.toc.level</parameter>.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="generate.index"> +<refmeta> +<refentrytitle>generate.index</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>generate.index</refname> +<refpurpose>Do you want an index?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="generate.index.frag"><xsl:param name="generate.index" select="1"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specify if an index should be generated. </para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="make.index.markup"> +<refmeta> +<refentrytitle>make.index.markup</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>make.index.markup</refname> +<refpurpose>Generate XML index markup in the index?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="make.index.markup.frag"> +<xsl:param name="make.index.markup" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter enables a very neat trick for getting properly +merged, collated back-of-the-book indexes. G. Ken Holman suggested +this trick at Extreme Markup Languages 2002 and I'm indebted to him +for it.</para> + +<para>Jeni Tennison's excellent code in +<filename>autoidx.xsl</filename> does a great job of merging and +sorting <tag>indexterm</tag>s in the document and building a +back-of-the-book index. However, there's one thing that it cannot +reasonably be expected to do: merge page numbers into ranges. (I would +not have thought that it could collate and suppress duplicate page +numbers, but in fact it appears to manage that task somehow.)</para> + +<para>Ken's trick is to produce a document in which the index at the +back of the book is <quote>displayed</quote> in XML. Because the index +is generated by the FO processor, all of the page numbers have been resolved. +It's a bit hard to explain, but what it boils down to is that instead of having +an index at the back of the book that looks like this:</para> + +<blockquote> +<formalpara><info><title>A</title></info> +<para>ap1, 1, 2, 3</para> +</formalpara> +</blockquote> + +<para>you get one that looks like this:</para> + +<blockquote> +<programlisting><indexdiv>A</indexdiv> +<indexentry> +<primaryie>ap1</primaryie>, +<phrase role="pageno">1</phrase>, +<phrase role="pageno">2</phrase>, +<phrase role="pageno">3</phrase> +</indexentry></programlisting> +</blockquote> + +<para>After building a PDF file with this sort of odd-looking index, you can +extract the text from the PDF file and the result is a proper index expressed in +XML.</para> + +<para>Now you have data that's amenable to processing and a simple Perl script +(such as <filename>fo/pdf2index</filename>) can +merge page ranges and generate a proper index.</para> + +<para>Finally, reformat your original document using this literal index instead of +an automatically generated one and <quote>bingo</quote>!</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.method"> +<refmeta> +<refentrytitle>index.method</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">basic</refmiscinfo> +<refmiscinfo class="other" otherclass="value">kosek</refmiscinfo> +<refmiscinfo class="other" otherclass="value">kimber</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.method</refname> +<refpurpose>Select method used to group index entries in an index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.method.frag"> +<xsl:param name="index.method">basic</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter lets you select which method to use for sorting and grouping + index entries in an index. +Indexes in Latin-based languages that have accented characters typically +sort together accented words and unaccented words. +Thus <quote>Á</quote> (U+00C1 LATIN CAPITAL LETTER A WITH ACUTE) would sort together +with <quote>A</quote> (U+0041 LATIN CAPITAL LETTER A), so both would appear in the <quote>A</quote> +section of the index. +Languages using other alphabets (such as Russian, which is written in the Cyrillic alphabet) +and languages using ideographic chararacters (such as Japanese) +require grouping specific to the languages and alphabets. +</para> + +<para>The default indexing method is limited. +It can group accented characters in Latin-based languages only. +It cannot handle non-Latin alphabets or ideographic languages. +The other indexing methods require extensions of one type or +another, and do not work with +all XSLT processors, which is why they are not used by default.</para> + +<para>The three choices for indexing method are:</para> +<variablelist> +<varlistentry> +<term><literal>basic</literal></term> +<listitem> +<para> +(default) Sort and groups words based only on the Latin alphabet. +Words with accented Latin letters will group and sort with +their respective primary letter, but +words in non-Latin alphabets will be +put in the <quote>Symbols</quote> section of the index. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><literal>kosek</literal></term> +<listitem> +<para> +This method sorts and groups words based on letter groups configured in +the DocBook locale file for the given language. +See, for example, the French locale file <filename>common/fr.xml</filename>. +This method requires that the XSLT processor +supports the EXSLT extensions (most do). +It also requires support for using +user-defined functions in xsl:key (xsltproc does not). +</para> +<para>This method is suitable for any language for which you can +list all the individual characters that should appear +in each letter group in an index. +It is probably not practical to use it for ideographic languages +such as Chinese that have hundreds or thousands of characters. +</para> + +<para>To use the kosek method, you must:</para> + +<orderedlist> +<listitem> +<para>Use a processor that supports its extensions, such as +Saxon 6 or Xalan (xsltproc and Saxon 8 do not). +</para> +</listitem> +<listitem> +<para>Set the index.method parameter's value to <quote>kosek</quote>. +</para> +</listitem> +<listitem> +<para>Import the appropriate index extensions stylesheet module +<filename>fo/autoidx-kosek.xsl</filename> or +<filename>html/autoidx-kosek.xsl</filename> into your +customization. +</para> +</listitem> +</orderedlist> + +</listitem> +</varlistentry> +<varlistentry> +<term><literal>kimber</literal></term> +<listitem> +<para> +This method uses extensions to the Saxon processor to implement +sophisticated indexing processes. It uses its own +configuration file, which can include information for any number of +languages. Each language's configuration can group +words using one of two processes. In the +enumerated process similar to that used in the kosek method, +you indicate the groupings character-by-character. +In the between-key process, you specify the +break-points in the sort order that should start a new group. +The latter configuration is useful for ideographic languages +such as Chinese, Japanese, and Korean. +You can also define your own collation algorithms and how you +want mixed Latin-alphabet words sorted.</para> +<itemizedlist> +<listitem> +<para>For a whitepaper describing the extensions, see: +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.innodata-isogen.com/knowledge_center/white_papers/back_of_book_for_xsl_fo.pdf">http://www.innodata-isogen.com/knowledge_center/white_papers/back_of_book_for_xsl_fo.pdf</link>. +</para> +</listitem> +<listitem> +<para>To download the extension library, see +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.innodata-isogen.com/knowledge_center/tools_downloads/i18nsupport">http://www.innodata-isogen.com/knowledge_center/tools_downloads/i18nsupport</link>. +</para> +</listitem> +</itemizedlist> + +<para>To use the kimber method, you must:</para> + +<orderedlist> +<listitem> +<para>Use Saxon (version 6 or 8) as your XSLT processor. +</para> +</listitem> +<listitem> +<para>Install and configure the Innodata Isogen library, using +the documentation that comes with it. +</para> +</listitem> +<listitem> +<para>Set the index.method parameter's value to <quote>kimber</quote>. +</para> +</listitem> +<listitem> +<para>Import the appropriate index extensions stylesheet module +<filename>fo/autoidx-kimber.xsl</filename> or +<filename>html/autoidx-kimber.xsl</filename> into your +customization. +</para> +</listitem> +</orderedlist> + +</listitem> +</varlistentry> +</variablelist> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.on.type"> +<refmeta> +<refentrytitle>index.on.type</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.on.type</refname> +<refpurpose>Select indexterms based on <tag class="attribute">type</tag> +attribute value</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.on.type.frag"> +<xsl:param name="index.on.type" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para> +If non-zero, +then an <tag>index</tag> element that has a +<tag class="attribute">type</tag> attribute +value will contain only those <tag>indexterm</tag> +elements with a matching <tag class="attribute">type</tag> attribute value. +If an <tag>index</tag> has no <tag class="attribute">type</tag> +attribute or it is blank, then the index will contain +all <tag>indexterm</tag>s in the current scope. +</para> + +<para> +If <literal>index.on.type</literal> is zero, then the +<tag class="attribute">type</tag> attribute has no effect +on selecting indexterms for an index. +</para> + +<para>For those using DocBook version 4.2 or earlier, +the <tag class="attribute">type</tag> attribute is not available +for index terms. However, you can achieve the same +effect by using the <tag class="attribute">role</tag> attribute +in the same manner on <tag>indexterm</tag> +and <tag>index</tag>, and setting the stylesheet parameter +<parameter>index.on.role</parameter> to a nonzero value. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.on.role"> +<refmeta> +<refentrytitle>index.on.role</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.on.role</refname> +<refpurpose>Select indexterms based on <tag class="attribute">role</tag> value</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.on.role.frag"> +<xsl:param name="index.on.role" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para> +If non-zero, +then an <tag>index</tag> element that has a +<tag class="attribute">role</tag> attribute +value will contain only those <tag>indexterm</tag> +elements with a matching role value. +If an <tag>index</tag> has no <tag class="attribute">role</tag> +attribute or it is blank, then the index will contain +all <tag>indexterm</tag>s in the current scope. +</para> +<para> +If <literal>index.on.role</literal> is zero, then the +<tag class="attribute">role</tag> attribute has no effect +on selecting indexterms for an index. +</para> + +<para>If you are using DocBook version 4.3 or later, you should +use the <tag class="attribute">type</tag> attribute instead of <tag class="attribute">role</tag> +on <tag>indexterm</tag> and <tag>index</tag>, +and set the <parameter>index.on.type</parameter> to a nonzero +value. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.preferred.page.properties"> +<refmeta> +<refentrytitle>index.preferred.page.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.preferred.page.properties</refname> +<refpurpose>Properties used to emphasize page number references for +significant index terms</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.preferred.page.properties.frag"> +<xsl:attribute-set name="index.preferred.page.properties"> + <xsl:attribute name="font-weight">bold</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties used to emphasize page number references for +significant index terms (<tag class="attribute">significance</tag>=<tag class="attvalue">preferred</tag>). Currently works only with +XEP.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.entry.properties"> +<refmeta> +<refentrytitle>index.entry.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.entry.properties</refname> +<refpurpose>Properties applied to the formatted entries +in an index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.entry.properties.frag"> +<xsl:attribute-set name="index.entry.properties"> + <xsl:attribute name="start-indent">0pt</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is applied to the block containing +the entries in a letter division in an index. It can be used to set the +font-size, font-family, and other inheritable properties that will be +applied to all index entries.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.div.title.properties"> +<refmeta> +<refentrytitle>index.div.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.div.title.properties</refname> +<refpurpose>Properties associated with the letter headings in an +index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.div.title.properties.frag"> +<xsl:attribute-set name="index.div.title.properties"> + <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute> + <xsl:attribute name="font-size">14.4pt</xsl:attribute> + <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master,'pt')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master,'pt * 0.8')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master,'pt * 1.2')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="start-indent">0pt</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is used on the letter headings that separate +the divisions in an index.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.number.separator"> +<refmeta> +<refentrytitle>index.number.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.number.separator</refname> +<refpurpose>Override for punctuation separating page numbers in index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.number.separator.frag"> +<xsl:param name="index.number.separator"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter permits you to override the text to insert between +page references in a formatted index entry. Typically +that would be a comma and a space. +</para> + +<para>Because this text may be locale dependent, +this parameter's value is normally taken from a gentext +template named 'number-separator' in the +context 'index' in the stylesheet +locale file for the language +of the current document. +This parameter can be used to override the gentext string, +and would typically be used on the command line. +This parameter would apply to all languages. +</para> + +<para>So this text string can be customized in two ways. +You can reset the default gentext string using +the <parameter>local.l10n.xml</parameter> parameter, or you can +override the gentext with the content of this parameter. +The content can be a simple string, or it can be +something more complex such as a call-template. +</para> + +<para>In HTML index output, section title references are used instead of +page number references. This punctuation appears between +such section titles in an HTML index. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.range.separator"> +<refmeta> +<refentrytitle>index.range.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.range.separator</refname> +<refpurpose>Override for punctuation separating the two numbers +in a page range in index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.range.separator.frag"> +<xsl:param name="index.range.separator"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter permits you +to override the text to insert between +the two numbers of a page range in an index. +This parameter is only used by those XSL-FO processors +that support an extension for generating such page ranges +(such as XEP).</para> + +<para>Because this text may be locale dependent, +this parameter's value is normally taken from a gentext +template named 'range-separator' in the +context 'index' in the stylesheet +locale file for the language +of the current document. +This parameter can be used to override the gentext string, +and would typically be used on the command line. +This parameter would apply to all languages. +</para> + +<para>So this text string can be customized in two ways. +You can reset the default gentext string using +the <parameter>local.l10n.xml</parameter> parameter, or you can +override the gentext with the content of this parameter. +The content can be a simple string, or it can be +something more complex such as a call-template. +</para> + +<para>In HTML index output, section title references are used instead of +page number references. So there are no page ranges +and this parameter has no effect. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.term.separator"> +<refmeta> +<refentrytitle>index.term.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.term.separator</refname> +<refpurpose>Override for punctuation separating an index term +from its list of page references in an index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.term.separator.frag"> +<xsl:param name="index.term.separator"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter permits you to override +the text to insert between +the end of an index term and its list of page references. +Typically that might be a comma and a space. +</para> + +<para>Because this text may be locale dependent, +this parameter's value is normally taken from a gentext +template named 'term-separator' in the +context 'index' in the stylesheet +locale file for the language +of the current document. +This parameter can be used to override the gentext string, +and would typically be used on the command line. +This parameter would apply to all languages. +</para> + +<para>So this text string can be customized in two ways. +You can reset the default gentext string using +the <parameter>local.l10n.xml</parameter> parameter, or you can +fill in the content for this normally empty +override parameter. +The content can be a simple string, or it can be +something more complex such as a call-template. +For fo output, it could be an <tag>fo:leader</tag> +element to provide space of a specific length, or a dot leader. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xep.index.item.properties"> +<refmeta> +<refentrytitle>xep.index.item.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xep.index.item.properties</refname> +<refpurpose>Properties associated with XEP index-items</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xep.index.item.properties.frag"> +<xsl:attribute-set name="xep.index.item.properties" use-attribute-sets="index.page.number.properties"> + <xsl:attribute name="merge-subsequent-page-numbers">true</xsl:attribute> + <xsl:attribute name="link-back">true</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties associated with XEP index-items, which generate +page numbers in an index processed by XEP. For more info see +the XEP documentation section "Indexes" in +<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.renderx.com/reference.html#Indexes">http://www.renderx.com/reference.html#Indexes</uri>.</para> + +<para>This attribute-set also adds by default any properties from the +<tag class="attribute">index.page.number.properties</tag> +attribute-set.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="toc.section.depth"> +<refmeta> +<refentrytitle>toc.section.depth</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>toc.section.depth</refname> +<refpurpose>How deep should recursive <tag>section</tag>s appear +in the TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="toc.section.depth.frag"><xsl:param name="toc.section.depth">2</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the depth to which recursive sections should appear in the +TOC. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="toc.max.depth"> +<refmeta> +<refentrytitle>toc.max.depth</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>toc.max.depth</refname> +<refpurpose>How many levels should be created for each TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="toc.max.depth.frag"><xsl:param name="toc.max.depth">8</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the maximal depth of TOC on all levels.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="toc.indent.width"> +<refmeta> +<refentrytitle>toc.indent.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">float</refmiscinfo> +</refmeta> +<refnamediv> +<refname>toc.indent.width</refname> +<refpurpose>Amount of indentation for TOC entries</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="toc.indent.width.frag"> +<xsl:param name="toc.indent.width">24</xsl:param> +<!-- inconsistant point specification? --> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies, in points, the distance by which each level of the +TOC is indented from its parent.</para> + +<para>This value is expressed in points, without +a unit (in other words, it is a bare number). Using a bare number allows the stylesheet +to perform calculations that would otherwise have to be performed by the FO processor +because not all processors support expressions.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="toc.line.properties"> +<refmeta> +<refentrytitle>toc.line.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>toc.line.properties</refname> +<refpurpose>Properties for lines in ToC and LoTs</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="toc.line.properties.frag"> +<xsl:attribute-set name="toc.line.properties"> + <xsl:attribute name="text-align-last">justify</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="end-indent"><xsl:value-of select="concat($toc.indent.width, 'pt')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="last-line-end-indent"><xsl:value-of select="concat('-', $toc.indent.width, 'pt')"></xsl:value-of></xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties which are applied to every line in ToC (or LoT). You can +modify them in order to change appearance of all, or some lines. For +example in order to make lines for chapters in bold specify the +following in your customization layer.</para> + +<programlisting><xsl:attribute-set name="toc.line.properties"> + <xsl:attribute name="font-weight"> + <xsl:when test="self::chapter | self::preface | self::appendix">bold</xsl:when> + <xsl:otherwise>normal</xsl:otherwise> + </xsl:attribute> +</xsl:attribute-set></programlisting> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="toc.margin.properties"> +<refmeta> +<refentrytitle>toc.margin.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>toc.margin.properties</refname> +<refpurpose>Margin properties used on Tables of Contents</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="toc.margin.properties.frag"> +<xsl:attribute-set name="toc.margin.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para>This attribute set is used on Tables of Contents. These attributes are set +on the wrapper that surrounds the ToC block, not on each individual lines.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="bridgehead.in.toc"> +<refmeta> +<refentrytitle>bridgehead.in.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bridgehead.in.toc</refname> +<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="bridgehead.in.toc.frag"><xsl:param name="bridgehead.in.toc" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, <tag>bridgehead</tag>s appear in the TOC. Note that +this option is not fully supported and may be removed in a future +version of the stylesheets. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="simplesect.in.toc"> +<refmeta> +<refentrytitle>simplesect.in.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>simplesect.in.toc</refname> +<refpurpose>Should <tag>simplesect</tag> elements appear in the TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="simplesect.in.toc.frag"><xsl:param name="simplesect.in.toc" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, <tag>simplesect</tag>s will be included in the TOC. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="generate.section.toc.level"> +<refmeta> +<refentrytitle>generate.section.toc.level</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>generate.section.toc.level</refname> +<refpurpose>Control depth of TOC generation in sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="generate.section.toc.level.frag"> +<xsl:param name="generate.section.toc.level" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>generate.section.toc.level</parameter> parameter +controls the depth of <tag>section</tag> in which TOCs will be generated. Note +that this is related to, but not the same as +<parameter>toc.section.depth</parameter>, which controls the depth to +which TOC entries will be generated in a given TOC.</para> +<para>If, for example, <parameter>generate.section.toc.level</parameter> +is <literal>3</literal>, TOCs will be generated in first, second, and third +level sections, but not in fourth level sections. +</para> + +</refsection> +</refentry> + + + + +</reference> +<reference xml:id="fo_ext"><title>Processor Extensions</title> +<refentry version="5.0" xml:id="arbortext.extensions"> +<refmeta> +<refentrytitle>arbortext.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>arbortext.extensions</refname> +<refpurpose>Enable Arbortext extensions?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="arbortext.extensions.frag"><xsl:param name="arbortext.extensions" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.arbortext.com/">Arbortext</link> +extensions will be used. +</para> +<para>This parameter can also affect which graphics file formats +are supported</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="axf.extensions"> +<refmeta> +<refentrytitle>axf.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>axf.extensions</refname> +<refpurpose>Enable XSL Formatter extensions?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="axf.extensions.frag"> +<xsl:param name="axf.extensions" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.antennahouse.com/">XSL Formatter</link> +extensions will be used. XSL Formatter extensions consists of PDF bookmarks, +document information and better index processing.</para> + +<para>This parameter can also affect which graphics file formats +are supported</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="fop.extensions"> +<refmeta> +<refentrytitle>fop.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>fop.extensions</refname> +<refpurpose>Enable extensions for FOP version 0.20.5 and earlier</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="fop.extensions.frag"><xsl:param name="fop.extensions" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, extensions intended for +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://xml.apache.org/fop/">FOP</link> +version 0.20.5 and earlier will be used. +At present, this consists of PDF bookmarks. +</para> + +<para>This parameter can also affect which graphics file formats +are supported.</para> + +<para>If you are using a version of FOP beyond +version 0.20.5, then use the <parameter>fop1.extensions</parameter> parameter +instead. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="fop1.extensions"> +<refmeta> +<refentrytitle>fop1.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>fop1.extensions</refname> +<refpurpose>Enable extensions for FOP version 0.90 and later</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="fop1.extensions.frag"><xsl:param name="fop1.extensions" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, extensions for +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://xml.apache.org/fop/">FOP</link> +version 0.90 and later will be used. +</para> + +<para>This parameter can also affect which graphics file formats +are supported.</para> + +<para>The original <parameter>fop.extensions</parameter> parameter +should still be used for FOP version 0.20.5 and earlier. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="passivetex.extensions"> +<refmeta> +<refentrytitle>passivetex.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>passivetex.extensions</refname> +<refpurpose>Enable PassiveTeX extensions?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="passivetex.extensions.frag"><xsl:param name="passivetex.extensions" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.tei-c.org.uk/Software/passivetex/">PassiveTeX</link> +extensions will be used. At present, this consists of PDF bookmarks +and sorted index terms. +</para> + +<para>This parameter can also affect which graphics file formats +are supported</para> + +<note> + <para>PassiveTeX is incomplete and development has ceased. In most cases, +another XSL-FO engine is probably a better choice.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="tex.math.in.alt"> +<refmeta> +<refentrytitle>tex.math.in.alt</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">plain</refmiscinfo> +<refmiscinfo class="other" otherclass="value">latex</refmiscinfo> +</refmeta> +<refnamediv> +<refname>tex.math.in.alt</refname> +<refpurpose>TeX notation used for equations</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="tex.math.in.alt.frag"> +<xsl:param name="tex.math.in.alt"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If you want type math directly in TeX notation in equations, +this parameter specifies notation used. Currently are supported two +values -- <literal>plain</literal> and <literal>latex</literal>. Empty +value means that you are not using TeX math at all.</para> + +<para>Preferred way for including TeX alternative of math is inside of +<tag>textobject</tag> element. Eg.:</para> + +<programlisting><inlineequation> +<inlinemediaobject> +<imageobject> +<imagedata fileref="eq1.gif"/> +</imageobject> +<textobject><phrase>E=mc squared</phrase></textobject> +<textobject role="tex"><phrase>E=mc^2</phrase></textobject> +</inlinemediaobject> +</inlineequation></programlisting> + +<para>If you are using <tag>graphic</tag> element, you can +store TeX inside <tag>alt</tag> element:</para> + +<programlisting><inlineequation> +<alt role="tex">a^2+b^2=c^2</alt> +<graphic fileref="a2b2c2.gif"/> +</inlineequation></programlisting> + +<para>If you want use this feature, you should process your FO with +PassiveTeX, which only supports TeX math notation. When calling +stylsheet, don't forget to specify also +passivetex.extensions=1.</para> + +<para>If you want equations in HTML, just process generated file +<filename>tex-math-equations.tex</filename> by TeX or LaTeX. Then run +dvi2bitmap program on result DVI file. You will get images for +equations in your document.</para> + +<warning> + <para>This feature is useful for print/PDF output only if you + use the obsolete and now unsupported PassiveTeX XSL-FO + engine.</para> +</warning> + +</refsection> + +<refsection><info><title>Related Parameters</title></info> + <para><parameter>tex.math.delims</parameter>, + <parameter>passivetex.extensions</parameter>, + <parameter>tex.math.file</parameter></para> +</refsection> +<refsection><info><title>More information</title></info> + <para>For how-to documentation on embedding TeX equations and + generating output from them, see + <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="TexMath.html">DBTeXMath</link>.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="tex.math.delims"> +<refmeta> +<refentrytitle>tex.math.delims</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>tex.math.delims</refname> +<refpurpose>Should equations output for processing by TeX be +surrounded by math mode delimiters?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="tex.math.delims.frag"> +<xsl:param name="tex.math.delims" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>For compatibility with DSSSL based DBTeXMath from Allin Cottrell +you should set this parameter to 0.</para> + +</refsection> +<refsection><info><title>Related Parameters</title></info> + <para><parameter>tex.math.in.alt</parameter>, + <parameter>passivetex.extensions</parameter></para> +</refsection> + +<refsection><info><title>See Also</title></info> + <para>You can also use the <tag class="xmlpi">dbtex delims</tag> processing + instruction to control whether delimiters are output.</para> +</refsection> +<refsection><info><title>More information</title></info> + <para>For how-to documentation on embedding TeX equations and + generating output from them, see + <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="TexMath.html">DBTeXMath</link>.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xep.extensions"> +<refmeta> +<refentrytitle>xep.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xep.extensions</refname> +<refpurpose>Enable XEP extensions?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xep.extensions.frag"><xsl:param name="xep.extensions" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.renderx.com/">XEP</link> +extensions will be used. XEP extensions consists of PDF bookmarks, +document information and better index processing. +</para> + +<para>This parameter can also affect which graphics file formats +are supported</para> +</refsection> +</refentry> + +</reference> +<reference xml:id="dbk_ext"><title>Stylesheet Extensions</title> +<refentry version="5.0" xml:id="linenumbering.everyNth"> +<refmeta> +<refentrytitle>linenumbering.everyNth</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>linenumbering.everyNth</refname> +<refpurpose>Indicate which lines should be numbered</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="linenumbering.everyNth.frag"> +<xsl:param name="linenumbering.everyNth">5</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If line numbering is enabled, everyNth line will be +numbered. Note that numbering is one based, not zero based. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="linenumbering.extension"> +<refmeta> +<refentrytitle>linenumbering.extension</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>linenumbering.extension</refname> +<refpurpose>Enable the line numbering extension</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="linenumbering.extension.frag"> +<xsl:param name="linenumbering.extension" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, verbatim environments (<tag>address</tag>, <tag>literallayout</tag>, +<tag>programlisting</tag>, <tag>screen</tag>, <tag>synopsis</tag>) that specify line numbering will +have line numbers. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="linenumbering.separator"> +<refmeta> +<refentrytitle>linenumbering.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>linenumbering.separator</refname> +<refpurpose>Specify a separator between line numbers and lines</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="linenumbering.separator.frag"> +<xsl:param name="linenumbering.separator"><xsl:text> </xsl:text></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The separator is inserted between line numbers and lines in the +verbatim environment. The default value is a single white space. + Note the interaction with <parameter>linenumbering.width</parameter> +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="linenumbering.width"> +<refmeta> +<refentrytitle>linenumbering.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>linenumbering.width</refname> +<refpurpose>Indicates the width of line numbers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="linenumbering.width.frag"> +<xsl:param name="linenumbering.width">3</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If line numbering is enabled, line numbers will appear right +justified in a field "width" characters wide. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="tablecolumns.extension"> +<refmeta> +<refentrytitle>tablecolumns.extension</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>tablecolumns.extension</refname> +<refpurpose>Enable the table columns extension function</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="tablecolumns.extension.frag"> +<xsl:param name="tablecolumns.extension" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The table columns extension function adjusts the widths of table +columns in the HTML result to more accurately reflect the specifications +in the CALS table. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="textinsert.extension"> + <refmeta> + <refentrytitle>textinsert.extension</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> + </refmeta> + <refnamediv> + <refname>textinsert.extension</refname> + <refpurpose>Enables the textinsert extension element</refpurpose> + </refnamediv> + <refsynopsisdiv> + <programlisting xml:id="textinsert.extension.frag"> + <xsl:param name="textinsert.extension" select="1"></xsl:param> +</programlisting> + </refsynopsisdiv> + <refsection><info><title>Description</title></info> + <para>The textinsert extension element inserts the contents of + a file into the result tree (as text).</para> + <note> + <para>To use the textinsert extension element, you must use + either Saxon or Xalan as your XSLT processor (it doesn’t + work with xsltproc), along with either the DocBook Saxon + extensions or DocBook Xalan extensions (for more + information about those extensions, see <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="InstallingAProcessor.html#SaxonExtensions">DocBook Saxon Extensions</link> and <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="InstallingAProcessor.html#XalanExtensions">DocBook Xalan Extensions</link>), and you must set both + the <parameter>use.extensions</parameter> and + <parameter>textinsert.extension</parameter> parameters to + <literal>1</literal>.</para> + <para>As an alternative to using the textinsert element, + consider using an Xinclude element with the + <literal>parse="text"</literal> attribute and value + specified, as detailed in <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="ExternalCode.html#XIncludeCode">Using XInclude for text inclusions</link>.</para> + </note> + </refsection> + <refsection><info><title>See Also</title></info> + <para>You can also use the <tag class="xmlpi">dbhtml-include href</tag> processing + instruction to insert external files — both files containing + plain text and files with markup content (including HTML + content).</para> + </refsection> + <refsection><info><title>More information</title></info> + <para>For how-to documentation on inserting contents of + external code files and other text files into output, see + <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="ExternalCode.html">External code files</link>.</para> + <para>For guidelines on inserting contents of + HTML files into output, see <link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="InsertExtHtml.html">Inserting external HTML code</link>.</para> + </refsection> +</refentry> + +<refentry version="5.0" xml:id="textdata.default.encoding"> +<refmeta> +<refentrytitle>textdata.default.encoding</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>textdata.default.encoding</refname> +<refpurpose>Default encoding of external text files which are included +using textdata element</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="textdata.default.encoding.frag"> +<xsl:param name="textdata.default.encoding"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the encoding of any external text files included using +<tag>textdata</tag> element. This value is used only when you do +not specify encoding by the appropriate attribute +directly on textdata. An empty string is interpreted as the system +default encoding.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="use.extensions"> +<refmeta> +<refentrytitle>use.extensions</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.extensions</refname> +<refpurpose>Enable extensions</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="use.extensions.frag"> +<xsl:param name="use.extensions" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, extensions may be used. Each extension is +further controlled by its own parameter. But if +<parameter>use.extensions</parameter> is zero, no extensions will +be used. +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="labels"><title>Automatic labelling</title> +<refentry version="5.0" xml:id="appendix.autolabel"> +<refmeta> +<refentrytitle>appendix.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">0<alt>none</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>appendix.autolabel</refname> +<refpurpose>Specifies the labeling format for Appendix titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="appendix.autolabel.frag"> +<xsl:param name="appendix.autolabel">A</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, then appendices will be numbered using the +parameter value as the number format if the value matches one of the +following: +</para> + +<variablelist> + <varlistentry> + <term>1 or arabic</term> + <listitem> + <para>Arabic numeration (1, 2, 3 ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>A or upperalpha</term> + <listitem> + <para>Uppercase letter numeration (A, B, C ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>a or loweralpha</term> + <listitem> + <para>Lowercase letter numeration (a, b, c ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I or upperroman</term> + <listitem> + <para>Uppercase roman numeration (I, II, III ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>i or lowerroman</term> + <listitem> + <para>Lowercase roman letter numeration (i, ii, iii ...).</para> + </listitem> + </varlistentry> +</variablelist> + +<para>Any nonzero value other than the above will generate +the default number format (upperalpha). +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="chapter.autolabel"> +<refmeta> +<refentrytitle>chapter.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">0<alt>none</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>chapter.autolabel</refname> +<refpurpose>Specifies the labeling format for Chapter titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="chapter.autolabel.frag"> +<xsl:param name="chapter.autolabel" select="1"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, then chapters will be numbered using the parameter +value as the number format if the value matches one of the following: +</para> + +<variablelist> + <varlistentry> + <term>1 or arabic</term> + <listitem> + <para>Arabic numeration (1, 2, 3 ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>A or upperalpha</term> + <listitem> + <para>Uppercase letter numeration (A, B, C ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>a or loweralpha</term> + <listitem> + <para>Lowercase letter numeration (a, b, c ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I or upperroman</term> + <listitem> + <para>Uppercase roman numeration (I, II, III ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>i or lowerroman</term> + <listitem> + <para>Lowercase roman letter numeration (i, ii, iii ...).</para> + </listitem> + </varlistentry> +</variablelist> + +<para>Any nonzero value other than the above will generate +the default number format (arabic). +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="part.autolabel"> +<refmeta> +<refentrytitle>part.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">0<alt>none</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>part.autolabel</refname> +<refpurpose>Specifies the labeling format for Part titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="part.autolabel.frag"> +<xsl:param name="part.autolabel">I</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, then parts will be numbered using the parameter +value as the number format if the value matches one of the following: +</para> + +<variablelist> + <varlistentry> + <term>1 or arabic</term> + <listitem> + <para>Arabic numeration (1, 2, 3 ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>A or upperalpha</term> + <listitem> + <para>Uppercase letter numeration (A, B, C ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>a or loweralpha</term> + <listitem> + <para>Lowercase letter numeration (a, b, c ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I or upperroman</term> + <listitem> + <para>Uppercase roman numeration (I, II, III ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>i or lowerroman</term> + <listitem> + <para>Lowercase roman letter numeration (i, ii, iii ...).</para> + </listitem> + </varlistentry> +</variablelist> + +<para>Any nonzero value other than the above will generate +the default number format (upperroman). +</para> + + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="reference.autolabel"> +<refmeta> +<refentrytitle>reference.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">0<alt>none</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>reference.autolabel</refname> +<refpurpose>Specifies the labeling format for Reference titles</refpurpose> +</refnamediv> +<refsynopsisdiv> +<programlisting xml:id="reference.autolabel.frag"> + <xsl:param name="reference.autolabel">I</xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>If non-zero, references will be numbered using the parameter + value as the number format if the value matches one of the + following: +</para> +<variablelist> + <varlistentry> + <term>1 or arabic</term> + <listitem> + <para>Arabic numeration (1, 2, 3 ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>A or upperalpha</term> + <listitem> + <para>Uppercase letter numeration (A, B, C ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>a or loweralpha</term> + <listitem> + <para>Lowercase letter numeration (a, b, c ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I or upperroman</term> + <listitem> + <para>Uppercase roman numeration (I, II, III ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>i or lowerroman</term> + <listitem> + <para>Lowercase roman letter numeration (i, ii, iii ...).</para> + </listitem> + </varlistentry> +</variablelist> +<para>Any non-zero value other than the above will generate +the default number format (upperroman). +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="preface.autolabel"> +<refmeta> +<refentrytitle>preface.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">0<alt>none</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>preface.autolabel</refname> +<refpurpose>Specifices the labeling format for Preface titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="preface.autolabel.frag"><xsl:param name="preface.autolabel" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero then prefaces will be numbered using the parameter +value as the number format if the value matches one of the following: +</para> + +<variablelist> + <varlistentry> + <term>1 or arabic</term> + <listitem> + <para>Arabic numeration (1, 2, 3 ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>A or upperalpha</term> + <listitem> + <para>Uppercase letter numeration (A, B, C ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>a or loweralpha</term> + <listitem> + <para>Lowercase letter numeration (a, b, c ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I or upperroman</term> + <listitem> + <para>Uppercase roman numeration (I, II, III ...).</para> + </listitem> + </varlistentry> + <varlistentry> + <term>i or lowerroman</term> + <listitem> + <para>Lowercase roman letter numeration (i, ii, iii ...).</para> + </listitem> + </varlistentry> +</variablelist> + +<para>Any nonzero value other than the above will generate +the default number format (arabic). +</para> + + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.autolabel"> +<refmeta> +<refentrytitle>section.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.autolabel</refname> +<refpurpose>Are sections enumerated?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.autolabel.frag"><xsl:param name="section.autolabel" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If true (non-zero), unlabeled sections will be enumerated. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.autolabel.max.depth"> +<refmeta> +<refentrytitle>section.autolabel.max.depth</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.autolabel.max.depth</refname> +<refpurpose>The deepest level of sections that are numbered.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.autolabel.max.depth.frag"> +<xsl:param name="section.autolabel.max.depth">8</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>When section numbering is turned on by the +<parameter>section.autolabel</parameter> parameter, then this +parameter controls the depth of <tag>section</tag> nesting that is +numbered. Sections nested to a level deeper than this value will not +be numbered. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.label.includes.component.label"> +<refmeta> +<refentrytitle>section.label.includes.component.label</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.label.includes.component.label</refname> +<refpurpose>Do section labels include the component label?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.label.includes.component.label.frag"><xsl:param name="section.label.includes.component.label" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, section labels are prefixed with the label of the +component that contains them. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="label.from.part"> +<refmeta> +<refentrytitle>label.from.part</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>label.from.part</refname> +<refpurpose>Renumber components in each part?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="label.from.part.frag"> +<xsl:param name="label.from.part" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>label.from.part</parameter> is non-zero, then + numbering of components — <tag>preface</tag>, + <tag>chapter</tag>, <tag>appendix</tag>, and + <tag>reference</tag> (when <tag>reference</tag> occurs at the + component level) — is re-started within each + <tag>part</tag>.</para> +<para>If <parameter>label.from.part</parameter> is zero (the + default), numbering of components is <emphasis>not</emphasis> + re-started within each <tag>part</tag>; instead, components are + numbered sequentially throughout each <tag>book</tag>, + regardless of whether or not they occur within <tag>part</tag> + instances.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="component.label.includes.part.label"> +<refmeta> +<refentrytitle>component.label.includes.part.label</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>component.label.includes.part.label</refname> +<refpurpose>Do component labels include the part label?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="component.label.includes.part.label.frag"><xsl:param name="component.label.includes.part.label" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, number labels for <tag>chapter</tag>, +<tag>appendix</tag>, and other component elements are prefixed with +the label of the part element that contains them. So you might see +Chapter II.3 instead of Chapter 3. Also, the labels for formal +elements such as <tag>table</tag> and <tag>figure</tag> will include +the part label. If there is no part element container, then no prefix +is generated. +</para> +<para> +This feature is most useful when the +<parameter>label.from.part</parameter> parameter is turned on. +In that case, there would be more than one <tag>chapter</tag> +<quote>1</quote>, and the extra part label prefix will identify +each chapter unambiguously. +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="xslt"><title>XSLT Processing</title> +<refentry version="5.0" xml:id="rootid"> +<refmeta> +<refentrytitle>rootid</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>rootid</refname> +<refpurpose>Specify the root element to format</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="rootid.frag"> +<xsl:param name="rootid"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>rootid</parameter> is not empty, it must be the +value of an ID that occurs in the document being formatted. The entire +document will be loaded and parsed, but formatting will begin at the +element identified, rather than at the root. For example, this allows +you to process only <tag>chapter</tag> 4 of a <tag>book</tag>.</para> +<para>Because the entire document is available to the processor, automatic +numbering, cross references, and other dependencies are correctly +resolved.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="meta"><title>Meta/*Info</title> +<refentry version="5.0" xml:id="make.single.year.ranges"> +<refmeta> +<refentrytitle>make.single.year.ranges</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>make.single.year.ranges</refname> +<refpurpose>Print single-year ranges (e.g., 1998-1999)</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="make.single.year.ranges.frag"> +<xsl:param name="make.single.year.ranges" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, year ranges that span a single year will be printed +in range notation (1998-1999) instead of discrete notation +(1998, 1999).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="make.year.ranges"> +<refmeta> +<refentrytitle>make.year.ranges</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>make.year.ranges</refname> +<refpurpose>Collate copyright years into ranges?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="make.year.ranges.frag"><xsl:param name="make.year.ranges" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, multiple copyright <tag>year</tag> elements will be +collated into ranges. +This works only if each year number is put into a separate +year element. The copyright element permits multiple +year elements. If a year element contains a dash or +a comma, then that year element will not be merged into +any range. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="author.othername.in.middle"> +<refmeta> +<refentrytitle>author.othername.in.middle</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>author.othername.in.middle</refname> +<refpurpose>Is <tag>othername</tag> in <tag>author</tag> a +middle name?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="author.othername.in.middle.frag"> +<xsl:param name="author.othername.in.middle" select="1"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the <tag>othername</tag> of an <tag>author</tag> +appears between the <tag>firstname</tag> and +<tag>surname</tag>. Otherwise, <tag>othername</tag> +is suppressed. +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="refentry"><title>Reference Pages</title> +<refentry version="5.0" xml:id="funcsynopsis.decoration"> +<refmeta> +<refentrytitle>funcsynopsis.decoration</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>funcsynopsis.decoration</refname> +<refpurpose>Decorate elements of a <tag>funcsynopsis</tag>?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="funcsynopsis.decoration.frag"> +<xsl:param name="funcsynopsis.decoration" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, elements of the <tag>funcsynopsis</tag> will be +decorated (e.g. rendered as bold or italic text). The decoration is controlled by +templates that can be redefined in a customization layer. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="funcsynopsis.style"> +<refmeta> +<refentrytitle>funcsynopsis.style</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">ansi</refmiscinfo> +<refmiscinfo class="other" otherclass="value">kr</refmiscinfo> +</refmeta> +<refnamediv> +<refname>funcsynopsis.style</refname> +<refpurpose>What style of <tag>funcsynopsis</tag> should be generated?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="funcsynopsis.style.frag"><xsl:param name="funcsynopsis.style">kr</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>funcsynopsis.style</parameter> is <literal>ansi</literal>, +ANSI-style function synopses are generated for a +<tag>funcsynopsis</tag>, otherwise K&R-style +function synopses are generated. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="function.parens"> +<refmeta> +<refentrytitle>function.parens</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>function.parens</refname> +<refpurpose>Generate parens after a function?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="function.parens.frag"> +<xsl:param name="function.parens" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the formatting of a <tag>function</tag> element +will include generated parentheses. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="refentry.generate.name"> +<refmeta> +<refentrytitle>refentry.generate.name</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.generate.name</refname> +<refpurpose>Output NAME header before <tag>refname</tag>s?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="refentry.generate.name.frag"> +<xsl:param name="refentry.generate.name" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, a "NAME" section title is output before the list +of <tag>refname</tag>s. This parameter and +<parameter>refentry.generate.title</parameter> are mutually +exclusive. This means that if you change this parameter to zero, you +should set <parameter>refentry.generate.title</parameter> to non-zero unless +you want get quite strange output. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="refentry.generate.title"> +<refmeta> +<refentrytitle>refentry.generate.title</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.generate.title</refname> +<refpurpose>Output title before <tag>refname</tag>s?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="refentry.generate.title.frag"> +<xsl:param name="refentry.generate.title" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the reference page title or first name is +output before the list of <tag>refname</tag>s. This parameter and +<parameter>refentry.generate.name</parameter> are mutually exclusive. +This means that if you change this parameter to non-zero, you +should set <parameter>refentry.generate.name</parameter> to zero unless +you want get quite strange output.</para> + + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="refentry.pagebreak"> +<refmeta> +<refentrytitle>refentry.pagebreak</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.pagebreak</refname> +<refpurpose>Start each refentry on a new page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="refentry.pagebreak.frag"><xsl:param name="refentry.pagebreak" select="1"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero (the default), each <tag>refentry</tag> +element will start on a new page. If zero, a page +break will not be generated between <tag>refentry</tag> elements. +The exception is when the <tag>refentry</tag> elements are children of +a <tag>part</tag> element, in which case the page breaks are always +retained. That is because a <tag>part</tag> element does not generate +a page-sequence for its children, so each <tag>refentry</tag> must +start its own page-sequence. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="refentry.title.properties"> +<refmeta> +<refentrytitle>refentry.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.title.properties</refname> +<refpurpose>Title properties for a refentry title</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="refentry.title.properties.frag"> +<xsl:attribute-set name="refentry.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="space-after">1em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute> + <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"></xsl:value-of></xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Formatting properties applied to the title generated for the +<tag>refnamediv</tag> part of output for +<tag>refentry</tag> when the value of the +<parameter>refentry.generate.title</parameter> parameter is +non-zero. The font size is supplied by the appropriate <parameter>section.level<replaceable>X</replaceable>.title.properties</parameter> +attribute-set, computed from the location of the +<tag>refentry</tag> in the section hierarchy.</para> + +<note> + <para>This parameter has no effect on the the title generated for + the <tag>refnamediv</tag> part of output for + <tag>refentry</tag> when the value of the + <parameter>refentry.generate.name</parameter> parameter is + non-zero. By default, that title is formatted with the same + properties as the titles for all other first-level children of + <tag>refentry</tag>.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="refentry.xref.manvolnum"> +<refmeta> +<refentrytitle>refentry.xref.manvolnum</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.xref.manvolnum</refname> +<refpurpose>Output <tag>manvolnum</tag> as part of +<tag>refentry</tag> cross-reference?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="refentry.xref.manvolnum.frag"> +<xsl:param name="refentry.xref.manvolnum" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>if non-zero, the <tag>manvolnum</tag> is used when cross-referencing +<tag>refentry</tag>s, either with <tag>xref</tag> +or <tag>citerefentry</tag>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="refclass.suppress"> +<refmeta> +<refentrytitle>refclass.suppress</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refclass.suppress</refname> +<refpurpose>Suppress display of refclass contents?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="refclass.suppress.frag"> +<xsl:param name="refclass.suppress" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If the value of <parameter>refclass.suppress</parameter> is +non-zero, then display of <tag>refclass</tag> contents is +suppressed in output.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="tables"><title>Tables</title> +<refentry version="5.0" xml:id="default.table.width"> +<refmeta> +<refentrytitle>default.table.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.table.width</refname> +<refpurpose>The default width of tables</refpurpose> +</refnamediv> +<refsynopsisdiv> +<programlisting xml:id="default.table.width.frag"> +<xsl:param name="default.table.width"></xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>If non-zero, this value will be used for the +<literal>width</literal> attribute on <tag>table</tag>s that do not specify an +alternate width (with the <tag class="xmlpi">dbhtml table-width</tag> or +<tag class="xmlpi">dbfo table-width</tag> processing instruction).</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="nominal.table.width"> +<refmeta> +<refentrytitle>nominal.table.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>nominal.table.width</refname> +<refpurpose>The (absolute) nominal width of tables</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="nominal.table.width.frag"> +<xsl:param name="nominal.table.width">6in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>In order to convert CALS column widths into HTML column widths, it +is sometimes necessary to have an absolute table width to use for conversion +of mixed absolute and relative widths. This value must be an absolute +length (not a percentage).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="default.table.frame"> +<refmeta> +<refentrytitle>default.table.frame</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.table.frame</refname> +<refpurpose>The default framing of tables</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="default.table.frame.frag"> +<xsl:param name="default.table.frame">all</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This value will be used when there is no frame attribute on the +table. </para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="default.table.rules"> +<refmeta> +<refentrytitle>default.table.rules</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.table.rules</refname> +<refpurpose>The default column and row rules for tables using HTML markup</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="default.table.rules.frag"> +<xsl:param name="default.table.rules">none</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Tables using HTML markup elements can use an attribute +named <tag class="attribute">rules</tag> on the <tag>table</tag> or +<tag>informaltable</tag> element +to specify whether column and row border rules should be +displayed. This parameter lets you specify a global default +style for all HTML tables that don't otherwise have +that attribute.</para> +<para>These are the supported values:</para> + +<variablelist> +<varlistentry><term>all</term> +<listitem> +<para>Rules will appear between all rows and columns.</para> +</listitem> +</varlistentry> + +<varlistentry><term>rows</term> +<listitem> +<para>Rules will appear between rows only.</para> +</listitem> +</varlistentry> + +<varlistentry><term>cols</term> +<listitem> +<para>Rules will appear between columns only.</para> +</listitem> +</varlistentry> + +<varlistentry><term>groups</term> +<listitem> +<para>Rules will appear between row groups (thead, tfoot, tbody). +No support for rules between column groups yet. +</para> +</listitem> +</varlistentry> + +<varlistentry><term>none</term> +<listitem> +<para>No rules. This is the default value. +</para> +</listitem> +</varlistentry> + +</variablelist> + +<para>The border after the last row and the border after +the last column are not affected by +this setting. Those borders are controlled by +the <tag class="attribute">frame</tag> attribute on the table element. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.cell.padding"> +<refmeta> +<refentrytitle>table.cell.padding</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.cell.padding</refname> +<refpurpose>Specifies the padding of table cells</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.cell.padding.frag"> +<xsl:attribute-set name="table.cell.padding"> + <xsl:attribute name="padding-start">2pt</xsl:attribute> + <xsl:attribute name="padding-end">2pt</xsl:attribute> + <xsl:attribute name="padding-top">2pt</xsl:attribute> + <xsl:attribute name="padding-bottom">2pt</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the padding of table cells.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.frame.border.thickness"> +<refmeta> +<refentrytitle>table.frame.border.thickness</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.frame.border.thickness</refname> +<refpurpose>Specifies the thickness of the frame border</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.frame.border.thickness.frag"> +<xsl:param name="table.frame.border.thickness">0.5pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the thickness of the border on the table's frame.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.frame.border.style"> +<refmeta> +<refentrytitle>table.frame.border.style</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">none</refmiscinfo> +<refmiscinfo class="other" otherclass="value">solid</refmiscinfo> +<refmiscinfo class="other" otherclass="value">dotted</refmiscinfo> +<refmiscinfo class="other" otherclass="value">dashed</refmiscinfo> +<refmiscinfo class="other" otherclass="value">double</refmiscinfo> +<refmiscinfo class="other" otherclass="value">groove</refmiscinfo> +<refmiscinfo class="other" otherclass="value">ridge</refmiscinfo> +<refmiscinfo class="other" otherclass="value">inset</refmiscinfo> +<refmiscinfo class="other" otherclass="value">outset</refmiscinfo> +<refmiscinfo class="other" otherclass="value">solid</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.frame.border.style</refname> +<refpurpose>Specifies the border style of table frames</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.frame.border.style.frag"> +<xsl:param name="table.frame.border.style">solid</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the border style of table frames.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.frame.border.color"> +<refmeta> +<refentrytitle>table.frame.border.color</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">color</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.frame.border.color</refname> +<refpurpose>Specifies the border color of table frames</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.frame.border.color.frag"> + +<xsl:param name="table.frame.border.color">black</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the border color of table frames.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.cell.border.thickness"> +<refmeta> +<refentrytitle>table.cell.border.thickness</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.cell.border.thickness</refname> +<refpurpose>Specifies the thickness of table cell borders</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.cell.border.thickness.frag"> +<xsl:param name="table.cell.border.thickness">0.5pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, specifies the thickness of borders on table +cells. The units are points. See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/CSS21/box.html#border-width-properties"> +CSS</link></para> + +<note> + <para>To control properties of cell borders in HTML output, you must also turn on the + <parameter>table.borders.with.css</parameter> parameter.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.cell.border.style"> +<refmeta> +<refentrytitle>table.cell.border.style</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">none</refmiscinfo> +<refmiscinfo class="other" otherclass="value">solid</refmiscinfo> +<refmiscinfo class="other" otherclass="value">dotted</refmiscinfo> +<refmiscinfo class="other" otherclass="value">dashed</refmiscinfo> +<refmiscinfo class="other" otherclass="value">double</refmiscinfo> +<refmiscinfo class="other" otherclass="value">groove</refmiscinfo> +<refmiscinfo class="other" otherclass="value">ridge</refmiscinfo> +<refmiscinfo class="other" otherclass="value">inset</refmiscinfo> +<refmiscinfo class="other" otherclass="value">outset</refmiscinfo> +<refmiscinfo class="other" otherclass="value">solid</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.cell.border.style</refname> +<refpurpose>Specifies the border style of table cells</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.cell.border.style.frag"> +<xsl:param name="table.cell.border.style">solid</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the border style of table cells.</para> + +<note> + <para>To control properties of cell borders in HTML output, you must also turn on the + <parameter>table.borders.with.css</parameter> parameter.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.cell.border.color"> +<refmeta> +<refentrytitle>table.cell.border.color</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">color</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.cell.border.color</refname> +<refpurpose>Specifies the border color of table cells</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.cell.border.color.frag"> + +<xsl:param name="table.cell.border.color">black</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Set the color of table cell borders. If non-zero, the value is used +for the border coloration. See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">CSS</link>. A +<literal>color</literal> is either a keyword or a numerical RGB specification. +Keywords are aqua, black, blue, fuchsia, gray, green, lime, maroon, +navy, olive, orange, purple, red, silver, teal, white, and +yellow.</para> + +<note> + <para>To control properties of cell borders in HTML output, you must also turn on the + <parameter>table.borders.with.css</parameter> parameter.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.table.properties"> +<refmeta> +<refentrytitle>table.table.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.table.properties</refname> +<refpurpose>Properties associated with a table</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.table.properties.frag"> +<xsl:attribute-set name="table.table.properties"> + <xsl:attribute name="border-before-width.conditionality">retain</xsl:attribute> + <xsl:attribute name="border-collapse">collapse</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for tables. This parameter should really +have been called <literal>table.properties</literal>, but that parameter +name was inadvertently established for the block-level properties +of the table as a whole. +</para> + +<para>See also <parameter>table.properties</parameter>.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="links"><title>Linking</title> +<refentry version="5.0" xml:id="current.docid"> +<refmeta> +<refentrytitle>current.docid</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>current.docid</refname> +<refpurpose>targetdoc identifier for the document being +processed</refpurpose> +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="current.docid.frag"> +<xsl:param name="current.docid"></xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal>targetdoc</literal> identifiers for both documents, as they appear in the <parameter>target.database.document</parameter> database file. This parameter passes to the stylesheet +the targetdoc identifier of the current document, since that +identifier does not appear in the document itself. </para> +<para>This parameter can also be used for print output. If an olink's <literal>targetdoc</literal> id differs from the <literal>current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter>olink.doctitle</parameter> to enable that feature.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="collect.xref.targets"> +<refmeta> +<refentrytitle>collect.xref.targets</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">only</refmiscinfo> +</refmeta> +<refnamediv> +<refname>collect.xref.targets</refname> +<refpurpose>Controls whether cross reference data is +collected</refpurpose> +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="collect.xref.targets.frag"> +<xsl:param name="collect.xref.targets">no</xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para> +In order to resolve olinks efficiently, the stylesheets can +generate an external data file containing information about +all potential cross reference endpoints in a document. +This parameter determines whether the collection process is run when the document is processed by the stylesheet. The default value is <literal>no</literal>, which means the data file is not generated during processing. The other choices are <literal>yes</literal>, which means the data file is created and the document is processed for output, and <literal>only</literal>, which means the data file is created but the document is not processed for output. +See also <parameter>targets.filename</parameter>. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="insert.olink.page.number"> +<refmeta> +<refentrytitle>insert.olink.page.number</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">maybe</refmiscinfo> +</refmeta> +<refnamediv> +<refname>insert.olink.page.number</refname> +<refpurpose>Turns page numbers in olinks on and off</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="insert.olink.page.number.frag"> +<xsl:param name="insert.olink.page.number">no</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter determines if +cross references made between documents with +<tag>olink</tag> will +include page number citations. +In most cases this is only applicable to references in printed output. +</para> +<para>The parameter has three possible values. +</para> +<variablelist> +<varlistentry> +<term>no</term> +<listitem><para>No page number references will be generated for olinks. +</para></listitem> +</varlistentry> +<varlistentry> +<term>yes</term> +<listitem><para>Page number references will be generated +for all <tag>olink</tag> references. +The style of page reference may be changed +if an <tag class="attribute">xrefstyle</tag> +attribute is used. +</para></listitem> +</varlistentry> +<varlistentry> +<term>maybe</term> +<listitem><para>Page number references will not be generated +for an <tag>olink</tag> element unless +it has an +<tag class="attribute">xrefstyle</tag> +attribute whose value specifies a page reference. +</para></listitem> +</varlistentry> +</variablelist> +<para>Olinks that point to targets within the same document +are treated as <tag>xref</tag>s, and controlled by +the <parameter>insert.xref.page.number</parameter> parameter. +</para> + +<para>Page number references for olinks to +external documents can only be inserted if the +information exists in the olink database. +This means each olink target element +(<tag>div</tag> or <tag>obj</tag>) +must have a <tag class="attribute">page</tag> attribute +whose value is its page number in the target document. +The XSL stylesheets are not able to extract that information +during processing because pages have not yet been created in +XSLT transformation. Only the XSL-FO processor knows what +page each element is placed on. +Therefore some postprocessing must take place to populate +page numbers in the olink database. +</para> + + + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="insert.olink.pdf.frag"> +<refmeta> +<refentrytitle>insert.olink.pdf.frag</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>insert.olink.pdf.frag</refname> +<refpurpose>Add fragment identifiers for links into PDF files</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="insert.olink.pdf.frag.frag"> +<xsl:param name="insert.olink.pdf.frag" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter determines whether +the cross reference URIs to PDF documents made with +<tag>olink</tag> will +include fragment identifiers. +</para> + +<para>When forming a URI to link to a PDF document, +a fragment identifier (typically a '#' followed by an +id value) appended to the PDF filename can be used by +the PDF viewer to open +the PDF file to a location within the document instead of +the first page. +However, not all PDF files have id +values embedded in them, and not all PDF viewers can +handle fragment identifiers. +</para> + +<para>If <parameter>insert.olink.pdf.frag</parameter> is set +to a non-zero value, then any olink targeting a +PDF file will have the fragment identifier appended to the URI. +The URI is formed by concatenating the value of the +<parameter>olink.base.uri</parameter> parameter, the +value of the <tag class="attribute">baseuri</tag> +attribute from the <tag class="element">document</tag> +element in the olink database with the matching +<tag class="attribute">targetdoc</tag> value, +and the value of the <tag class="attribute">href</tag> +attribute for the targeted element in the olink database. +The <tag class="attribute">href</tag> attribute +contains the fragment identifier. +</para> + +<para>If <parameter>insert.olink.pdf.frag</parameter> is set +to zero (the default value), then +the <tag class="attribute">href</tag> attribute +from the olink database +is not appended to PDF olinks, so the fragment identifier is left off. +A PDF olink is any olink for which the +<tag class="attribute">baseuri</tag> attribute +from the matching <tag class="element">document</tag> +element in the olink database ends with '.pdf'. +Any other olinks will still have the fragment identifier added. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="olink.base.uri"> +<refmeta> +<refentrytitle>olink.base.uri</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">uri</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.base.uri</refname> +<refpurpose>Base URI used in olink hrefs</refpurpose> +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="olink.base.uri.frag"> +<xsl:param name="olink.base.uri"></xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para>When cross reference data is collected for resolving olinks, it +may be necessary to prepend a base URI to each target's href. This +parameter lets you set that base URI when cross reference data is +collected. This feature is needed when you want to link to a document +that is processed without chunking. The output filename for such a +document is not known to the XSL stylesheet; the only target +information consists of fragment identifiers such as +<literal>#idref</literal>. To enable the resolution of olinks between +documents, you should pass the name of the HTML output file as the +value of this parameter. Then the hrefs recorded in the cross +reference data collection look like +<literal>outfile.html#idref</literal>, which can be reached as links +from other documents.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="olink.debug"> +<refmeta> +<refentrytitle>olink.debug</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.debug</refname> +<refpurpose>Turn on debugging messages for olinks</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="olink.debug.frag"> +<xsl:param name="olink.debug" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, then each olink will generate several +messages about how it is being resolved during processing. +This is useful when an olink does not resolve properly +and the standard error messages are not sufficient to +find the problem. +</para> + +<para>You may need to read through the olink XSL templates +to understand the context for some of the debug messages. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="olink.doctitle"> +<refmeta> +<refentrytitle>olink.doctitle</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">maybe</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.doctitle</refname> +<refpurpose>show the document title for external olinks?</refpurpose> + +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="olink.doctitle.frag"> +<xsl:param name="olink.doctitle">no</xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para>When olinks between documents are resolved, the generated text +may not make it clear that the reference is to another document. +It is possible for the stylesheets to append the other document's +title to external olinks. For this to happen, two parameters must +be set.</para> +<itemizedlist> +<listitem> +<para>This <parameter>olink.doctitle</parameter> parameter +should be set to either <literal>yes</literal> or <literal>maybe</literal> +to enable this feature. +</para> +</listitem> +<listitem> +<para>And you should also set the <parameter>current.docid</parameter> +parameter to the document id for the document currently +being processed for output. +</para> +</listitem> +</itemizedlist> + +<para> +Then if an olink's <literal>targetdoc</literal> id differs from +the <literal>current.docid</literal> value, the stylesheet knows +that it is a reference to another document and can +append the target document's +title to the generated olink text. </para> + +<para>The text for the target document's title is copied from the +olink database from the <tag>ttl</tag> element +of the top-level <tag>div</tag> for that document. +If that <tag>ttl</tag> element is missing or empty, +no title is output. +</para> + +<para>The supported values for <parameter>olink.doctitle</parameter> are: +</para> +<variablelist> +<varlistentry> +<term><literal>yes</literal></term> +<listitem> +<para> +Always insert the title to the target document if it is not +the current document. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><literal>no</literal></term> +<listitem> +<para> +Never insert the title to the target document, even if requested +in an <tag class="attribute">xrefstyle</tag> attribute. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><literal>maybe</literal></term> +<listitem> +<para> +Only insert the title to the target document, if requested +in an <tag class="attribute">xrefstyle</tag> attribute. +</para> +</listitem> +</varlistentry> +</variablelist> +<para>An <tag class="attribute">xrefstyle</tag> attribute +may override the global setting for individual olinks. +The following values are supported in an +<tag class="attribute">xrefstyle</tag> +attribute using the <literal>select:</literal> syntax: +</para> + +<variablelist> +<varlistentry> +<term><literal>docname</literal></term> +<listitem> +<para> +Insert the target document name for this olink using the +<literal>docname</literal> gentext template, but only +if the value of <parameter>olink.doctitle</parameter> +is not <literal>no</literal>. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><literal>docnamelong</literal></term> +<listitem> +<para> +Insert the target document name for this olink using the +<literal>docnamelong</literal> gentext template, but only +if the value of <parameter>olink.doctitle</parameter> +is not <literal>no</literal>. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><literal>nodocname</literal></term> +<listitem> +<para> +Omit the target document name even if +the value of <parameter>olink.doctitle</parameter> +is <literal>yes</literal>. +</para> +</listitem> +</varlistentry> +</variablelist> +<para>Another way of inserting the target document name +for a single olink is to employ an +<tag class="attribute">xrefstyle</tag> +attribute using the <literal>template:</literal> syntax. +The <literal>%o</literal> placeholder (the letter o, not zero) +in such a template +will be filled in with the target document's title when it is processed. +This will occur regardless of +the value of <parameter>olink.doctitle</parameter>. +</para> +<para>Note that prior to version 1.66 of the XSL stylesheets, +the allowed values for this parameter were 0 and 1. Those +values are still supported and mapped to 'no' and 'yes', respectively. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="olink.lang.fallback.sequence"> +<refmeta> +<refentrytitle>olink.lang.fallback.sequence</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.lang.fallback.sequence</refname> +<refpurpose>look up translated documents if olink not found?</refpurpose> + +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="olink.lang.fallback.sequence.frag"> +<xsl:param name="olink.lang.fallback.sequence"></xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + + +<para>This parameter defines a list of lang values +to search among to resolve olinks. +</para> + +<para>Normally an olink tries to resolve to a document in the same +language as the olink itself. The language of an olink +is determined by its nearest ancestor element with a +<tag class="attribute">lang</tag> attribute, otherwise the +value of the <parameter>l10n.gentext.default.lang</parameter> +parameter. +</para> + +<para>An olink database can contain target data for the same +document in multiple languages. Each set of data has the +same value for the <tag>targetdoc</tag> attribute in +the <tag>document</tag> element in the database, but with a +different <tag>lang</tag> attribute value. +</para> + +<para>When an olink is being resolved, the target is first +sought in the document with the same language as the olink. +If no match is found there, then this parameter is consulted +for additional languages to try.</para> + +<para>The <parameter>olink.lang.fallback.sequence</parameter> +must be a whitespace separated list of lang values to +try. The first one with a match in the olink database is used. +The default value is empty.</para> + +<para>For example, a document might be written in German +and contain an olink with +<literal>targetdoc="adminguide"</literal>. +When the document is processed, the processor +first looks for a target dataset in the +olink database starting with:</para> + +<literallayout><literal><document targetdoc="adminguide" lang="de"></literal>. +</literallayout> + +<para>If there is no such element, then the +<parameter>olink.lang.fallback.sequence</parameter> +parameter is consulted. +If its value is, for example, <quote>fr en</quote>, then the processor next +looks for <literal>targetdoc="adminguide" lang="fr"</literal>, and +then for <literal>targetdoc="adminguide" lang="en"</literal>. +If there is still no match, it looks for +<literal>targetdoc="adminguide"</literal> with no +lang attribute. +</para> + +<para>This parameter is useful when a set of documents is only +partially translated, or is in the process of being translated. +If a target of an olink has not yet been translated, then this +parameter permits the processor to look for the document in +other languages. This assumes the reader would rather have +a link to a document in a different language than to have +a broken link. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="olink.properties"> +<refmeta> +<refentrytitle>olink.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.properties</refname> +<refpurpose>Properties associated with the cross-reference +text of an olink.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="olink.properties.frag"> +<xsl:attribute-set name="olink.properties"> + <xsl:attribute name="show-destination">replace</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This <literal>attribute set</literal> is applied to the +<literal>fo:basic-link</literal> element of an olink. It is not applied to the +optional page number or optional title of the external +document.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="prefer.internal.olink"> +<refmeta> +<refentrytitle>prefer.internal.olink</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>prefer.internal.olink</refname> +<refpurpose>Prefer a local olink reference to an external reference</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="prefer.internal.olink.frag"> +<xsl:param name="prefer.internal.olink" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If you are re-using XML content modules in multiple documents, +you may want to redirect some of your olinks. This parameter +permits you to redirect an olink to the current document. +</para> + +<para>For example: you are writing documentation for a product, +which includes 3 manuals: a little installation +booklet (booklet.xml), a user +guide (user.xml), and a reference manual (reference.xml). +All 3 documents begin with the same introduction section (intro.xml) that +contains a reference to the customization section (custom.xml) which is +included in both user.xml and reference.xml documents. +</para> + +<para>How do you write the link to custom.xml in intro.xml +so that it is interpreted correctly in all 3 documents?</para> +<itemizedlist> +<listitem><para>If you use xref, it will fail in user.xml.</para> +</listitem> +<listitem><para>If you use olink (pointing to reference.xml), +the reference in user.xml +will point to the customization section of the reference manual, while it is +actually available in user.xml.</para> +</listitem> +</itemizedlist> + +<para>If you set the <parameter>prefer.internal.olink</parameter> +parameter to a non-zero value, then the processor will +first look in the olink database +for the olink's <tag>targetptr</tag> attribute value +in document matching the <parameter>current.docid</parameter> +parameter value. If it isn't found there, then +it tries the document in the database +with the <tag>targetdoc</tag> +value that matches the olink's <tag>targetdoc</tag> +attribute. +</para> + +<para>This feature permits an olink reference to resolve to +the current document if there is an element +with an id matching the olink's <tag>targetptr</tag> +value. The current document's olink data must be +included in the target database for this to work.</para> + +<caution> +<para>There is a potential for incorrect links if +the same <tag>id</tag> attribute value is used for different +content in different documents. +Some of your olinks may be redirected to the current document +when they shouldn't be. It is not possible to control +individual olink instances.</para> +</caution> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="target.database.document"> +<refmeta> +<refentrytitle>target.database.document</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">uri</refmiscinfo> +</refmeta> +<refnamediv> +<refname>target.database.document</refname> +<refpurpose>Name of master database file for resolving +olinks</refpurpose> +</refnamediv> +<refsynopsisdiv> +<programlisting xml:id="target.database.document.frag"> + <xsl:param name="target.database.document">olinkdb.xml</xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para> +To resolve olinks between documents, the stylesheets use a master +database document that identifies the target datafiles for all the +documents within the scope of the olinks. This parameter value is the +URI of the master document to be read during processing to resolve +olinks. The default value is <filename>olinkdb.xml</filename>.</para> + +<para>The data structure of the file is defined in the +<filename>targetdatabase.dtd</filename> DTD. The database file +provides the high level elements to record the identifiers, locations, +and relationships of documents. The cross reference data for +individual documents is generally pulled into the database using +system entity references or XIncludes. See also +<parameter>targets.filename</parameter>. </para> </refsection> +</refentry> + +<refentry version="5.0" xml:id="targets.filename"> +<refmeta> +<refentrytitle>targets.filename</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>targets.filename</refname> +<refpurpose>Name of cross reference targets data file</refpurpose> +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="targets.filename.frag"> +<xsl:param name="targets.filename">target.db</xsl:param> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para> +In order to resolve olinks efficiently, the stylesheets can +generate an external data file containing information about +all potential cross reference endpoints in a document. +This parameter lets you change the name of the generated +file from the default name <filename>target.db</filename>. +The name must agree with that used in the target database +used to resolve olinks during processing. +See also <parameter>target.database.document</parameter>. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="use.local.olink.style"> +<refmeta> +<refentrytitle>use.local.olink.style</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.local.olink.style</refname> +<refpurpose>Process olinks using xref style of current +document</refpurpose> +</refnamediv> +<refsynopsisdiv> <programlisting xml:id="use.local.olink.style.frag"> +<xsl:param name="use.local.olink.style" select="0"></xsl:param> </programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> + +<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter>use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross +reference string is formed again from the target title, number, and +element name, using the stylesheet processing the targeting document. +Then olinks will match the xref style in the targeting document +rather than in the target document. If both documents are processed +with the same stylesheet, then the results will be the same.</para> +</refsection> +</refentry> + +</reference> +<reference xml:id="xrefs"><title>Cross References</title> +<refentry version="5.0" xml:id="insert.xref.page.number"> +<refmeta> +<refentrytitle>insert.xref.page.number</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">maybe</refmiscinfo> +</refmeta> +<refnamediv> +<refname>insert.xref.page.number</refname> +<refpurpose>Turns page numbers in xrefs on and off</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="insert.xref.page.number.frag"> +<xsl:param name="insert.xref.page.number">no</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter determines if +cross references (<tag>xref</tag>s) in +printed output will +include page number citations. +It has three possible values. +</para> +<variablelist> +<varlistentry> +<term>no</term> +<listitem><para>No page number references will be generated. +</para></listitem> +</varlistentry> +<varlistentry> +<term>yes</term> +<listitem><para>Page number references will be generated +for all <tag>xref</tag> elements. +The style of page reference may be changed +if an <tag class="attribute">xrefstyle</tag> +attribute is used. +</para></listitem> +</varlistentry> +<varlistentry> +<term>maybe</term> +<listitem><para>Page number references will not be generated +for an <tag>xref</tag> element unless +it has an +<tag class="attribute">xrefstyle</tag> +attribute whose value specifies a page reference. +</para></listitem> +</varlistentry> +</variablelist> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xref.properties"> +<refmeta> +<refentrytitle>xref.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xref.properties</refname> +<refpurpose>Properties associated with cross-reference text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xref.properties.frag"> +<xsl:attribute-set name="xref.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is used to set properties +on cross reference text.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xref.label-title.separator"> +<refmeta> +<refentrytitle>xref.label-title.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xref.label-title.separator</refname> +<refpurpose>Punctuation or space separating label from title in xref</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xref.label-title.separator.frag"><xsl:param name="xref.label-title.separator">: </xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para> +This parameter allows you to control the punctuation of certain +types of generated cross reference text. +When cross reference text is generated for an +<tag class="element">xref</tag> or +<tag class="element">olink</tag> element +using an <tag class="attribute">xrefstyle</tag> attribute +that makes use of the <literal>select:</literal> feature, +and the selected components include both label and title, +then the value of this parameter is inserted between +label and title in the output. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xref.label-page.separator"> +<refmeta> +<refentrytitle>xref.label-page.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xref.label-page.separator</refname> +<refpurpose>Punctuation or space separating label from page number in xref</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xref.label-page.separator.frag"><xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para> +This parameter allows you to control the punctuation of certain +types of generated cross reference text. +When cross reference text is generated for an +<tag class="element">xref</tag> or +<tag class="element">olink</tag> element +using an <tag class="attribute">xrefstyle</tag> attribute +that makes use of the <literal>select:</literal> feature, +and the selected components include both label and page +but no title, +then the value of this parameter is inserted between +label and page number in the output. +If a title is included, then other separators are used. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xref.title-page.separator"> +<refmeta> +<refentrytitle>xref.title-page.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xref.title-page.separator</refname> +<refpurpose>Punctuation or space separating title from page number in xref</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xref.title-page.separator.frag"><xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para> +This parameter allows you to control the punctuation of certain +types of generated cross reference text. +When cross reference text is generated for an +<tag class="element">xref</tag> or +<tag class="element">olink</tag> element +using an <tag class="attribute">xrefstyle</tag> attribute +that makes use of the <literal>select:</literal> feature, +and the selected components include both title and page number, +then the value of this parameter is inserted between +title and page number in the output. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="insert.link.page.number"> +<refmeta> +<refentrytitle>insert.link.page.number</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">maybe</refmiscinfo> +</refmeta> +<refnamediv> +<refname>insert.link.page.number</refname> +<refpurpose>Turns page numbers in link elements on and off</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="insert.link.page.number.frag"> +<xsl:param name="insert.link.page.number">no</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter determines if +cross references using the <tag>link</tag> element in +printed output will +include standard page number citations. +It has three possible values. +</para> +<variablelist> +<varlistentry> +<term>no</term> +<listitem><para>No page number references will be generated. +</para></listitem> +</varlistentry> +<varlistentry> +<term>yes</term> +<listitem><para>Page number references will be generated +for all <tag>link</tag> elements. +The style of page reference may be changed +if an <tag class="attribute">xrefstyle</tag> +attribute is used. +</para></listitem> +</varlistentry> +<varlistentry> +<term>maybe</term> +<listitem><para>Page number references will not be generated +for a <tag>link</tag> element unless +it has an +<tag class="attribute">xrefstyle</tag> +attribute whose value specifies a page reference. +</para></listitem> +</varlistentry> +</variablelist> + +<para>Although the <tag>xrefstyle</tag> attribute +can be used to turn the page reference on or off, it cannot be +used to control the formatting of the page number as it +can in <tag>xref</tag>. +In <tag>link</tag> it will always format with +the style established by the +gentext template with <literal>name="page.citation"</literal> +in the <literal>l:context name="xref"</literal>. +</para> +</refsection> +</refentry> + +</reference> +<reference xml:id="lists"><title>Lists</title> +<refentry version="5.0" xml:id="compact.list.item.spacing"> +<refmeta> +<refentrytitle>compact.list.item.spacing</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>compact.list.item.spacing</refname> +<refpurpose>What space do you want between list items (when spacing="compact")?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="compact.list.item.spacing.frag"><xsl:attribute-set name="compact.list.item.spacing"> + <xsl:attribute name="space-before.optimum">0em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Specify what spacing you want between each list item when +<tag class="attribute">spacing</tag> is +<quote><literal>compact</literal></quote>.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="itemizedlist.properties"> +<refmeta> +<refentrytitle>itemizedlist.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>itemizedlist.properties</refname> +<refpurpose>Properties that apply to each list-block generated by itemizedlist.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="itemizedlist.properties.frag"><xsl:attribute-set name="itemizedlist.properties" use-attribute-sets="list.block.properties"> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Properties that apply to each fo:list-block generated by itemizedlist.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="itemizedlist.label.properties"> +<refmeta> +<refentrytitle>itemizedlist.label.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>itemizedlist.label.properties</refname> +<refpurpose>Properties that apply to each label inside itemized list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="itemizedlist.label.properties.frag"><xsl:attribute-set name="itemizedlist.label.properties"> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Properties that apply to each label inside itemized list. E.g.:</para> +<programlisting><xsl:attribute-set name="itemizedlist.label.properties"> + <xsl:attribute name="text-align">right</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="itemizedlist.label.width"> +<refmeta> +<refentrytitle>itemizedlist.label.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> + <refname>itemizedlist.label.width</refname> +<refpurpose>The default width of the label (bullet) in an itemized list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> + <programlisting xml:id="itemizedlist.label.width.frag"> + <xsl:param name="itemizedlist.label.width">1.0em</xsl:param> + </programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para>Specifies the default width of the label (usually a bullet or other +symbol) in an itemized list. You can override the default value on any +particular list with the “dbfo” processing instruction using the +“label-width” pseudoattribute.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="list.block.properties"> +<refmeta> +<refentrytitle>list.block.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>list.block.properties</refname> +<refpurpose>Properties that apply to each list-block generated by list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="list.block.properties.frag"><xsl:attribute-set name="list.block.properties"> + <xsl:attribute name="provisional-label-separation">0.2em</xsl:attribute> + <xsl:attribute name="provisional-distance-between-starts">1.5em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Properties that apply to each fo:list-block generated by itemizedlist/orderedlist.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="list.block.spacing"> +<refmeta> +<refentrytitle>list.block.spacing</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>list.block.spacing</refname> +<refpurpose>What spacing do you want before and after lists?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="list.block.spacing.frag"><xsl:attribute-set name="list.block.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Specify the spacing required before and after a list. It is necessary to specify the space after a list block because lists can come inside of paras. </para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="list.item.spacing"> +<refmeta> +<refentrytitle>list.item.spacing</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>list.item.spacing</refname> +<refpurpose>What space do you want between list items?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="list.item.spacing.frag"><xsl:attribute-set name="list.item.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Specify what spacing you want between each list item.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="orderedlist.properties"> +<refmeta> +<refentrytitle>orderedlist.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>orderedlist.properties</refname> +<refpurpose>Properties that apply to each list-block generated by orderedlist.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="orderedlist.properties.frag"><xsl:attribute-set name="orderedlist.properties" use-attribute-sets="list.block.properties"> + <xsl:attribute name="provisional-distance-between-starts">2em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Properties that apply to each fo:list-block generated by orderedlist.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="orderedlist.label.properties"> +<refmeta> +<refentrytitle>orderedlist.label.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>orderedlist.label.properties</refname> +<refpurpose>Properties that apply to each label inside ordered list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="orderedlist.label.properties.frag"><xsl:attribute-set name="orderedlist.label.properties"> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Properties that apply to each label inside ordered list. E.g.:</para> +<programlisting><xsl:attribute-set name="orderedlist.label.properties"> + <xsl:attribute name="text-align">right</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="orderedlist.label.width"> +<refmeta> +<refentrytitle>orderedlist.label.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>orderedlist.label.width</refname> +<refpurpose>The default width of the label (number) in an ordered list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="orderedlist.label.width.frag"> +<xsl:param name="orderedlist.label.width">1.2em</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para>Specifies the default width of the label (usually a number or +sequence of numbers) in an ordered list. You can override the default +value on any particular list with the “dbfo” processing instruction +using the “label-width” pseudoattribute.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="variablelist.max.termlength"> +<refmeta> +<refentrytitle>variablelist.max.termlength</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">number</refmiscinfo> +</refmeta> +<refnamediv> +<refname>variablelist.max.termlength</refname> +<refpurpose>Specifies the longest term in variablelists</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="variablelist.max.termlength.frag"> +<xsl:param name="variablelist.max.termlength">24</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>In variablelists, the <tag>listitem</tag> +is indented to leave room for the +<tag>term</tag> elements. That indent may be computed +if it is not specified with a <tag class="attribute">termlength</tag> +attribute on the <tag>variablelist</tag> element. +</para> +<para> +The computation counts characters in the +<tag>term</tag> elements in the list +to find the longest term. However, some terms are very long +and would produce extreme indents. This parameter lets you +set a maximum character count. Any terms longer than the maximum +would line wrap. The default value is 24. +</para> +<para> +The character counts are converted to physical widths +by multiplying by 0.50em. There will be some variability +in how many actual characters fit in the space +since some characters are wider than others. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="variablelist.term.separator"> +<refmeta> +<refentrytitle>variablelist.term.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>variablelist.term.separator</refname> +<refpurpose>Text to separate <tag>term</tag>s within a multi-term +<tag>varlistentry</tag></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="variablelist.term.separator.frag"> +<xsl:param name="variablelist.term.separator">, </xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>When a <tag>varlistentry</tag> contains multiple <tag>term</tag> +elements, the string specified in the value of the +<parameter>variablelist.term.separator</parameter> parameter is placed +after each <tag>term</tag> except the last.</para> + +<note> + <para>To generate a line break between multiple <tag>term</tag>s in + a <tag>varlistentry</tag>, set a non-zero value for the + <parameter>variablelist.term.break.after</parameter> parameter. If + you do so, you may also want to set the value of the + <parameter>variablelist.term.separator</parameter> parameter to an + empty string (to suppress rendering of the default comma and space + after each <tag>term</tag>).</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="variablelist.term.properties"> +<refmeta> +<refentrytitle>variablelist.term.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>variablelist.term.properties</refname> +<refpurpose>To add properties to the term elements in a variablelist.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="variablelist.term.properties.frag"> +<xsl:attribute-set name="variablelist.term.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the block containing a +term in a variablelist. +Use this attribute-set to set +font properties or alignment, for example.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="variablelist.term.break.after"> +<refmeta> +<refentrytitle>variablelist.term.break.after</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>variablelist.term.break.after</refname> +<refpurpose>Generate line break after each <tag>term</tag> within a +multi-term <tag>varlistentry</tag>?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="variablelist.term.break.after.frag"> +<xsl:param name="variablelist.term.break.after">0</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Set a non-zero value for the +<parameter>variablelist.term.break.after</parameter> parameter to +generate a line break between <tag>term</tag>s in a +multi-term <tag>varlistentry</tag>.</para> + +<note> +<para>If you set a non-zero value for +<parameter>variablelist.term.break.after</parameter>, you may also +want to set the value of the +<parameter>variablelist.term.separator</parameter> parameter to an +empty string (to suppress rendering of the default comma and space +after each <tag>term</tag>).</para> +</note> + +</refsection> +</refentry> + +</reference> +<reference xml:id="qa"><title>QAndASet</title> +<refentry version="5.0" xml:id="qandadiv.autolabel"> +<refmeta> +<refentrytitle>qandadiv.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qandadiv.autolabel</refname> +<refpurpose>Are divisions in QAndASets enumerated?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qandadiv.autolabel.frag"><xsl:param name="qandadiv.autolabel" select="1"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, unlabeled qandadivs will be enumerated. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.inherit.numeration"> +<refmeta> +<refentrytitle>qanda.inherit.numeration</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.inherit.numeration</refname> +<refpurpose>Does enumeration of QandASet components inherit the numeration of parent elements?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.inherit.numeration.frag"> +<xsl:param name="qanda.inherit.numeration" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, numbered <tag>qandadiv</tag> elements and +<tag>question</tag> and <tag>answer</tag> inherit the enumeration of +the ancestors of the <tag>qandaset</tag>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.defaultlabel"> +<refmeta> +<refentrytitle>qanda.defaultlabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">number</refmiscinfo> +<refmiscinfo class="other" otherclass="value">qanda</refmiscinfo> +<refmiscinfo class="other" otherclass="value">none</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.defaultlabel</refname> +<refpurpose>Sets the default for defaultlabel on QandASet.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.defaultlabel.frag"> +<xsl:param name="qanda.defaultlabel">number</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If no <literal>defaultlabel</literal> attribute is specified on +a <tag>qandaset</tag>, this value is used. It is generally one of the legal +values for the defaultlabel attribute (<literal>none</literal>, +<literal>number</literal> or +<literal>qanda</literal>), or one of the additional stylesheet-specific values +(<literal>qnumber</literal> or <literal>qnumberanda</literal>). +The default value is 'number'. +</para> +<para>The values are rendered as follows:</para> +<variablelist> +<varlistentry><term><literal>qanda</literal></term> +<listitem> +<para><tag>question</tag>s are labeled "Q:" and +<tag>answer</tag>s are labeled "A:". </para> +</listitem> +</varlistentry> + +<varlistentry><term><literal>number</literal></term> +<listitem> +<para>The questions are enumerated and the answers +are not labeled. </para> +</listitem> +</varlistentry> + +<varlistentry><term><literal>qnumber</literal></term> +<listitem> +<para>The questions are labeled "Q:" followed by a number, and answers are not +labeled. +When sections are numbered, adding a label +to the number distinguishes the question numbers +from the section numbers. +This value is not allowed in the +<tag class="attribute">defaultlabel</tag> attribute +of a <tag>qandaset</tag> element.</para> +</listitem> +</varlistentry> + +<varlistentry><term><literal>qnumberanda</literal></term> +<listitem> +<para>The questions are labeled "Q:" followed by a number, and +the answers are labeled "A:". +When sections are numbered, adding a label +to the number distinguishes the question numbers +from the section numbers. +This value is not allowed in the +<tag class="attribute">defaultlabel</tag> attribute +of a <tag>qandaset</tag> element.</para> +</listitem> +</varlistentry> + +<varlistentry><term><literal>none</literal></term> +<listitem> +<para>No distinguishing label precedes Questions or Answers. +</para> +</listitem> +</varlistentry> +</variablelist> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.in.toc"> +<refmeta> +<refentrytitle>qanda.in.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.in.toc</refname> +<refpurpose>Should qandaentry questions appear in +the document table of contents?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.in.toc.frag"><xsl:param name="qanda.in.toc" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If true (non-zero), then the generated table of contents +for a document will include <tag>qandaset</tag> titles, +<tag>qandadiv</tag> titles, +and <tag>question</tag> elements. The default value (zero) excludes +them from the TOC. +</para> +<para>This parameter does not affect any tables of contents +that may be generated inside a qandaset or qandadiv. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.nested.in.toc"> +<refmeta> +<refentrytitle>qanda.nested.in.toc</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.nested.in.toc</refname> +<refpurpose>Should nested answer/qandaentry instances appear in TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.nested.in.toc.frag"> +<xsl:param name="qanda.nested.in.toc" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, instances of <tag>qandaentry</tag> +that are children of <tag>answer</tag> elements are shown in +the TOC.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="biblio"><title>Bibliography</title> +<refentry version="5.0" xml:id="bibliography.style"> +<refmeta> +<refentrytitle>bibliography.style</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">normal</refmiscinfo> +<refmiscinfo class="other" otherclass="value">iso690</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bibliography.style</refname> +<refpurpose>Style used for formatting of biblioentries.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="bibliography.style.frag"> +<xsl:param name="bibliography.style">normal</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Currently only <literal>normal</literal> and +<literal>iso690</literal> styles are supported.</para> + +<para>In order to use ISO690 style to the full extent you might need +to use additional markup described on <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://wiki.docbook.org/topic/ISO690Bibliography">the +following WiKi page</link>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="biblioentry.item.separator"> +<refmeta> +<refentrytitle>biblioentry.item.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>biblioentry.item.separator</refname> +<refpurpose>Text to separate bibliography entries</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="biblioentry.item.separator.frag"><xsl:param name="biblioentry.item.separator">. </xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Text to separate bibliography entries +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="bibliography.collection"> +<refmeta> +<refentrytitle>bibliography.collection</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bibliography.collection</refname> +<refpurpose>Name of the bibliography collection file</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="bibliography.collection.frag"> +<xsl:param name="bibliography.collection">http://docbook.sourceforge.net/release/bibliography/bibliography.xml</xsl:param> + +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Maintaining bibliography entries across a set of documents is tedious, time +consuming, and error prone. It makes much more sense, usually, to store all of +the bibliography entries in a single place and simply <quote>extract</quote> +the ones you need in each document.</para> + +<para>That's the purpose of the +<parameter>bibliography.collection</parameter> parameter. To setup a global +bibliography <quote>database</quote>, follow these steps:</para> + +<para>First, create a stand-alone bibliography document that contains all of +the documents that you wish to reference. Make sure that each bibliography +entry (whether you use <tag>biblioentry</tag> or <tag>bibliomixed</tag>) +has an ID.</para> + +<para>My global bibliography, <filename>~/bibliography.xml</filename> begins +like this:</para> + +<informalexample> +<programlisting><!DOCTYPE bibliography + PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<bibliography><title>References</title> + +<bibliomixed id="xml-rec"><abbrev>XML 1.0</abbrev>Tim Bray, +Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, editors. +<citetitle><ulink url="http://www.w3.org/TR/REC-xml">Extensible Markup +Language (XML) 1.0 Second Edition</ulink></citetitle>. +World Wide Web Consortium, 2000. +</bibliomixed> + +<bibliomixed id="xml-names"><abbrev>Namespaces</abbrev>Tim Bray, +Dave Hollander, +and Andrew Layman, editors. +<citetitle><ulink url="http://www.w3.org/TR/REC-xml-names/">Namespaces in +XML</ulink></citetitle>. +World Wide Web Consortium, 1999. +</bibliomixed> + +<!-- ... --> +</bibliography> +</programlisting> +</informalexample> + +<para>When you create a bibliography in your document, simply +provide <emphasis>empty</emphasis> <tag>bibliomixed</tag> +entries for each document that you wish to cite. Make sure that these +elements have the same ID as the corresponding <quote>real</quote> +entry in your global bibliography.</para> + +<para>For example:</para> + +<informalexample> +<programlisting><bibliography><title>Bibliography</title> + +<bibliomixed id="xml-rec"/> +<bibliomixed id="xml-names"/> +<bibliomixed id="DKnuth86">Donald E. Knuth. <citetitle>Computers and +Typesetting: Volume B, TeX: The Program</citetitle>. Addison-Wesley, +1986. ISBN 0-201-13437-3. +</bibliomixed> +<bibliomixed id="relaxng"/> + +</bibliography></programlisting> +</informalexample> + +<para>Note that it's perfectly acceptable to mix entries from your +global bibliography with <quote>normal</quote> entries. You can use +<tag>xref</tag> or other elements to cross-reference your +bibliography entries in exactly the same way you do now.</para> + +<para>Finally, when you are ready to format your document, simply set the +<parameter>bibliography.collection</parameter> parameter (in either a +customization layer or directly through your processor's interface) to +point to your global bibliography.</para> + +<para>The stylesheets will format the bibliography in your document as if +all of the entries referenced appeared there literally.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="bibliography.numbered"> +<refmeta> +<refentrytitle>bibliography.numbered</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bibliography.numbered</refname> +<refpurpose>Should bibliography entries be numbered?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="bibliography.numbered.frag"> +<xsl:param name="bibliography.numbered" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero bibliography entries will be numbered</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="biblioentry.properties"> +<refmeta> + <refentrytitle>biblioentry.properties</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>biblioentry.properties</refname> +<refpurpose>To set the style for biblioentry.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="biblioentry.properties.frag"><xsl:attribute-set name="biblioentry.properties" use-attribute-sets="normal.para.spacing"> + <xsl:attribute name="start-indent">0.5in</xsl:attribute> + <xsl:attribute name="text-indent">-0.5in</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>How do you want biblioentry styled? </para> +<para>Set the font-size, weight, space-above and space-below, indents, etc. to the style required</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="glossary"><title>Glossary</title> +<refentry version="5.0" xml:id="glossterm.auto.link"> +<refmeta> +<refentrytitle>glossterm.auto.link</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossterm.auto.link</refname> +<refpurpose>Generate links from glossterm to glossentry automatically?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossterm.auto.link.frag"> +<xsl:param name="glossterm.auto.link" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, links from inline <tag>glossterm</tag>s to the corresponding +<tag>glossentry</tag> elements in a <tag>glossary</tag> or <tag>glosslist</tag> +will be automatically generated. This is useful when your glossterms are consistent +and you don't want to add links manually.</para> + +<para>The automatic link generation feature is not used on <tag>glossterm</tag> elements +that have a <tag class="attribute">linkend</tag> attribute.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="firstterm.only.link"> +<refmeta> +<refentrytitle>firstterm.only.link</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>firstterm.only.link</refname> +<refpurpose>Does automatic glossterm linking only apply to firstterms?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="firstterm.only.link.frag"> +<xsl:param name="firstterm.only.link" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, only <tag>firstterm</tag>s will be automatically linked +to the glossary. If glossary linking is not enabled, this parameter +has no effect.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossary.collection"> +<refmeta> +<refentrytitle>glossary.collection</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossary.collection</refname> +<refpurpose>Name of the glossary collection file</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossary.collection.frag"> +<xsl:param name="glossary.collection"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Glossaries maintained independently across a set of documents +are likely to become inconsistent unless considerable effort is +expended to keep them in sync. It makes much more sense, usually, to +store all of the glossary entries in a single place and simply +<quote>extract</quote> the ones you need in each document.</para> + +<para>That's the purpose of the +<parameter>glossary.collection</parameter> parameter. To setup a global +glossary <quote>database</quote>, follow these steps:</para> + +<refsection><info><title>Setting Up the Glossary Database</title></info> + +<para>First, create a stand-alone glossary document that contains all of +the entries that you wish to reference. Make sure that each glossary +entry has an ID.</para> + +<para>Here's an example glossary:</para> + +<informalexample> +<programlisting> +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE glossary + PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<glossary> +<glossaryinfo> +<editor><firstname>Eric</firstname><surname>Raymond</surname></editor> +<title>Jargon File 4.2.3 (abridged)</title> +<releaseinfo>Just some test data</releaseinfo> +</glossaryinfo> + +<glossdiv><title>0</title> + +<glossentry> +<glossterm>0</glossterm> +<glossdef> +<para>Numeric zero, as opposed to the letter `O' (the 15th letter of +the English alphabet). In their unmodified forms they look a lot +alike, and various kluges invented to make them visually distinct have +compounded the confusion. If your zero is center-dotted and letter-O +is not, or if letter-O looks almost rectangular but zero looks more +like an American football stood on end (or the reverse), you're +probably looking at a modern character display (though the dotted zero +seems to have originated as an option on IBM 3270 controllers). If +your zero is slashed but letter-O is not, you're probably looking at +an old-style ASCII graphic set descended from the default typewheel on +the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter, +curse this arrangement). (Interestingly, the slashed zero long +predates computers; Florian Cajori's monumental "A History of +Mathematical Notations" notes that it was used in the twelfth and +thirteenth centuries.) If letter-O has a slash across it and the zero +does not, your display is tuned for a very old convention used at IBM +and a few other early mainframe makers (Scandinavians curse <emphasis>this</emphasis> +arrangement even more, because it means two of their letters collide). +Some Burroughs/Unisys equipment displays a zero with a <emphasis>reversed</emphasis> +slash. Old CDC computers rendered letter O as an unbroken oval and 0 +as an oval broken at upper right and lower left. And yet another +convention common on early line printers left zero unornamented but +added a tail or hook to the letter-O so that it resembled an inverted +Q or cursive capital letter-O (this was endorsed by a draft ANSI +standard for how to draw ASCII characters, but the final standard +changed the distinguisher to a tick-mark in the upper-left corner). +Are we sufficiently confused yet?</para> +</glossdef> +</glossentry> + +<glossentry> +<glossterm>1TBS</glossterm> +<glossdef> +<para role="accidence"> +<phrase role="pronounce"></phrase> +<phrase role="partsofspeach">n</phrase> +</para> +<para>The "One True Brace Style"</para> +<glossseealso>indent style</glossseealso> +</glossdef> +</glossentry> + +<!-- ... --> + +</glossdiv> + +<!-- ... --> + +</glossary></programlisting> +</informalexample> + +</refsection> + +<refsection><info><title>Marking Up Glossary Terms</title></info> + +<para>That takes care of the glossary database, now you have to get the entries +into your document. Unlike bibliography entries, which can be empty, creating +<quote>placeholder</quote> glossary entries would be very tedious. So instead, +support for <parameter>glossary.collection</parameter> relies on implicit linking.</para> + +<para>In your source document, simply use <tag>firstterm</tag> and +<tag>glossterm</tag> to identify the terms you wish to have included +in the glossary. The stylesheets assume that you will either set the +<tag class="attribute">baseform</tag> attribute correctly, or that the +content of the element exactly matches a term in your glossary.</para> + +<para>If you're using a <parameter>glossary.collection</parameter>, don't +make explicit links on the terms in your document.</para> + +<para>So, in your document, you might write things like this:</para> + +<informalexample> +<programlisting><para>This is dummy text, without any real meaning. +The point is simply to reference glossary terms like <glossterm>0</glossterm> +and the <firstterm baseform="1TBS">One True Brace Style (1TBS)</firstterm>. +The <glossterm>1TBS</glossterm>, as you can probably imagine, is a nearly +religious issue.</para></programlisting> +</informalexample> + +<para>If you set the <parameter>firstterm.only.link</parameter> parameter, +only the terms marked with <tag>firstterm</tag> will be links. +Otherwise, all the terms will be linked.</para> + +</refsection> + +<refsection><info><title>Marking Up the Glossary</title></info> + +<para>The glossary itself has to be identified for the stylesheets. For lack +of a better choice, the <tag class="attribute">role</tag> is used. +To identify the glossary as the target for automatic processing, set +the role to <quote><literal>auto</literal></quote>. The title of this +glossary (and any other information from the <tag>glossaryinfo</tag> +that's rendered by your stylesheet) will be displayed, but the entries will +come from the database. +</para> + +<para>Unfortunately, the glossary can't be empty, so you must put in +at least one <tag>glossentry</tag>. The content of this entry +is irrelevant, it will not be rendered:</para> + +<informalexample> +<programlisting><glossary role="auto"> +<glossentry> +<glossterm>Irrelevant</glossterm> +<glossdef> +<para>If you can see this, the document was processed incorrectly. Use +the <parameter>glossary.collection</parameter> parameter.</para> +</glossdef> +</glossentry> +</glossary></programlisting> +</informalexample> + +<para>What about glossary divisions? If your glossary database has glossary +divisions <emphasis>and</emphasis> your automatic glossary contains at least +one <tag>glossdiv</tag>, the automic glossary will have divisions. +If the <tag>glossdiv</tag> is missing from either location, no divisions +will be rendered.</para> + +<para>Glossary entries (and divisions, if appropriate) in the glossary will +occur in precisely the order they occur in your database.</para> + +</refsection> + +<refsection><info><title>Formatting the Document</title></info> + +<para>Finally, when you are ready to format your document, simply set the +<parameter>glossary.collection</parameter> parameter (in either a +customization layer or directly through your processor's interface) to +point to your global glossary.</para> + +<para>The stylesheets will format the glossary in your document as if +all of the entries implicilty referenced appeared there literally.</para> +</refsection> + +<refsection><info><title>Limitations</title></info> + +<para>Glossary cross-references <emphasis>within the glossary</emphasis> are +not supported. For example, this <emphasis>will not</emphasis> work:</para> + +<informalexample> +<programlisting><glossentry> +<glossterm>gloss-1</glossterm> +<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para> +<glossseealso>gloss-2</glossseealso> +</glossdef> +</glossentry></programlisting> +</informalexample> + +<para>If you put glossary cross-references in your glossary that way, +you'll get the cryptic error: <computeroutput>Warning: +glossary.collection specified, but there are 0 automatic +glossaries</computeroutput>.</para> + +<para>Instead, you must do two things:</para> + +<orderedlist> +<listitem> +<para>Markup your glossary using <tag>glossseealso</tag>:</para> + +<informalexample> +<programlisting><glossentry> +<glossterm>gloss-1</glossterm> +<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para> +<glossseealso>gloss-2</glossseealso> +</glossdef> +</glossentry></programlisting> +</informalexample> +</listitem> + +<listitem> +<para>Make sure there is at least one <tag>glossterm</tag> reference to +<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The +easiest way to do that is probably within a <tag>remark</tag> in your +automatic glossary:</para> + +<informalexample> +<programlisting><glossary role="auto"> +<remark>Make sure there's a reference to <glossterm>gloss-2</glossterm>.</remark> +<glossentry> +<glossterm>Irrelevant</glossterm> +<glossdef> +<para>If you can see this, the document was processed incorrectly. Use +the <parameter>glossary.collection</parameter> parameter.</para> +</glossdef> +</glossentry> +</glossary></programlisting> +</informalexample> +</listitem> +</orderedlist> +</refsection> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossary.as.blocks"> +<refmeta> +<refentrytitle>glossary.as.blocks</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossary.as.blocks</refname> +<refpurpose>Present glossarys using blocks instead of lists?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossary.as.blocks.frag"> +<xsl:param name="glossary.as.blocks" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, <tag>glossary</tag>s will be formatted as +blocks.</para> + +<para>If you have long <tag>glossterm</tag>s, proper list +markup in the FO case may produce unattractive lists. By setting this +parameter, you can force the stylesheets to produce block markup +instead of proper lists.</para> + +<para>You can override this setting with a processing instruction as the +child of <tag>glossary</tag>: <tag class="xmlpi">dbfo +glossary-presentation="blocks"</tag> or <tag class="xmlpi">dbfo +glossary-presentation="list"</tag></para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glosslist.as.blocks"> +<refmeta> +<refentrytitle>glosslist.as.blocks</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glosslist.as.blocks</refname> +<refpurpose>Use blocks for glosslists?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glosslist.as.blocks.frag"> +<xsl:param name="glosslist.as.blocks" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>See <parameter>glossary.as.blocks</parameter>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossentry.list.item.properties"> +<refmeta> +<refentrytitle>glossentry.list.item.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossentry.list.item.properties</refname> +<refpurpose>To add properties to each glossentry in a list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossentry.list.item.properties.frag"><xsl:attribute-set name="glossentry.list.item.properties"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the fo:list-item containing a +glossentry in a glossary when the <parameter>glossary.as.blocks</parameter> parameter +is zero. +Use this attribute-set to set +spacing between entries, for example.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossterm.block.properties"> +<refmeta> +<refentrytitle>glossterm.block.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossterm.block.properties</refname> +<refpurpose>To add properties to the block of a glossentry's glossterm.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossterm.block.properties.frag"><xsl:attribute-set name="glossterm.block.properties"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the block containing a +glossary term in a glossary when the <parameter>glossary.as.blocks</parameter> parameter +is non-zero. +Use this attribute-set to set the space above and below, +font properties, +and any indent for the glossary term.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossdef.block.properties"> +<refmeta> +<refentrytitle>glossdef.block.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossdef.block.properties</refname> +<refpurpose>To add properties to the block of a glossary definition.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossdef.block.properties.frag"><xsl:attribute-set name="glossdef.block.properties"> + <xsl:attribute name="margin-{$direction.align.start}">.25in</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the block containing a +glossary definition in a glossary when +the <parameter>glossary.as.blocks</parameter> parameter +is non-zero. +Use this attribute-set to set the space above and below, +any font properties, +and any indent for the glossary definition.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossterm.list.properties"> +<refmeta> +<refentrytitle>glossterm.list.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossterm.list.properties</refname> +<refpurpose>To add properties to the glossterm in a list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossterm.list.properties.frag"> +<xsl:attribute-set name="glossterm.list.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the block containing a +glossary term in a glossary when the <parameter>glossary.as.blocks</parameter> parameter +is zero. +Use this attribute-set to set +font properties, for example.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossdef.list.properties"> +<refmeta> +<refentrytitle>glossdef.list.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossdef.list.properties</refname> +<refpurpose>To add properties to the glossary definition in a list.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossdef.list.properties.frag"> +<xsl:attribute-set name="glossdef.list.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>These properties are added to the block containing a +glossary definition in a glossary when +the <parameter>glossary.as.blocks</parameter> parameter +is zero. +Use this attribute-set to set font properties, for example.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossterm.width"> +<refmeta> +<refentrytitle>glossterm.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossterm.width</refname> +<refpurpose>Width of glossterm in list presentation mode</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossterm.width.frag"> +<xsl:param name="glossterm.width">2in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter specifies the width reserved for glossary terms when +a list presentation is used.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossterm.separation"> +<refmeta> +<refentrytitle>glossterm.separation</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossterm.separation</refname> +<refpurpose>Separation between glossary terms and descriptions in list mode</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossterm.separation.frag"> +<xsl:param name="glossterm.separation">0.25in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the miminum horizontal +separation between glossary terms and descriptions when +they are presented side-by-side using lists +when the <parameter>glossary.as.blocks</parameter> +is zero.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossentry.show.acronym"> +<refmeta> +<refentrytitle>glossentry.show.acronym</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">primary</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossentry.show.acronym</refname> +<refpurpose>Display <tag>glossentry</tag> acronyms?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossentry.show.acronym.frag"> +<xsl:param name="glossentry.show.acronym">no</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>A setting of <quote>yes</quote> means they should be displayed; +<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used, +then they are shown as the primary text for the entry.</para> + +<note> +<para>This setting controls both <tag>acronym</tag> and +<tag>abbrev</tag> elements in the <tag>glossentry</tag>.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="glossary.sort"> +<refmeta> +<refentrytitle>glossary.sort</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>glossary.sort</refname> +<refpurpose>Sort glossentry elements?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="glossary.sort.frag"> +<xsl:param name="glossary.sort" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, then the glossentry elements within a +glossary, glossdiv, or glosslist are sorted on the glossterm, using +the current lang setting. If zero (the default), then +glossentry elements are not sorted and are presented +in document order. +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="misc"><title>Miscellaneous</title> +<refentry version="5.0" xml:id="formal.procedures"> +<refmeta> +<refentrytitle>formal.procedures</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>formal.procedures</refname> +<refpurpose>Selects formal or informal procedures</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="formal.procedures.frag"> +<xsl:param name="formal.procedures" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Formal procedures are numbered and always have a title. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="formal.title.placement"> +<refmeta> +<refentrytitle>formal.title.placement</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">table</refmiscinfo> +</refmeta> +<refnamediv> +<refname>formal.title.placement</refname> +<refpurpose>Specifies where formal object titles should occur</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="formal.title.placement.frag"> +<xsl:param name="formal.title.placement"> +figure before +example before +equation before +table before +procedure before +task before +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies where formal object titles should occur. For each formal object +type (<tag>figure</tag>, +<tag>example</tag>, +<tag>equation</tag>, +<tag>table</tag>, and <tag>procedure</tag>) +you can specify either the keyword +<quote><literal>before</literal></quote> or +<quote><literal>after</literal></quote>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="runinhead.default.title.end.punct"> +<refmeta> +<refentrytitle>runinhead.default.title.end.punct</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>runinhead.default.title.end.punct</refname> +<refpurpose>Default punctuation character on a run-in-head</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="runinhead.default.title.end.punct.frag"><xsl:param name="runinhead.default.title.end.punct">.</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, For a <tag>formalpara</tag>, use the specified +string as the separator between the title and following text. The period is the default value.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="runinhead.title.end.punct"> +<refmeta> +<refentrytitle>runinhead.title.end.punct</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>runinhead.title.end.punct</refname> +<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="runinhead.title.end.punct.frag"> +<xsl:param name="runinhead.title.end.punct">.!?:</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specify which characters are to be counted as punctuation. These +characters are checked for a match with the last character of the +title. If no match is found, the +<parameter>runinhead.default.title.end.punct</parameter> contents are +inserted. This is to avoid duplicated punctuation in the output. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="show.comments"> +<refmeta> +<refentrytitle>show.comments</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>show.comments</refname> +<refpurpose>Display <tag>remark</tag> elements?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="show.comments.frag"> +<xsl:param name="show.comments" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, comments will be displayed, otherwise they +are suppressed. Comments here refers to the <tag>remark</tag> element +(which was called <literal>comment</literal> prior to DocBook +4.0), not XML comments (<-- like this -->) which are +unavailable. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="punct.honorific"> +<refmeta> +<refentrytitle>punct.honorific</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>punct.honorific</refname> +<refpurpose>Punctuation after an honorific in a personal name.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="punct.honorific.frag"> +<xsl:param name="punct.honorific">.</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter specifies the punctuation that should be added after an +honorific in a personal name.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="segmentedlist.as.table"> +<refmeta> +<refentrytitle>segmentedlist.as.table</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>segmentedlist.as.table</refname> +<refpurpose>Format segmented lists as tables?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="segmentedlist.as.table.frag"> +<xsl:param name="segmentedlist.as.table" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, <tag>segmentedlist</tag>s will be formatted as +tables.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="variablelist.as.blocks"> +<refmeta> +<refentrytitle>variablelist.as.blocks</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>variablelist.as.blocks</refname> +<refpurpose>Format <tag>variablelist</tag>s lists as blocks?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="variablelist.as.blocks.frag"> +<xsl:param name="variablelist.as.blocks" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, <tag>variablelist</tag>s will be formatted as +blocks.</para> + +<para>If you have long terms, proper list markup in the FO case may produce +unattractive lists. By setting this parameter, you can force the stylesheets +to produce block markup instead of proper lists.</para> + +<para>You can override this setting with a processing instruction as the +child of <tag>variablelist</tag>: <tag class="xmlpi">dbfo +list-presentation="blocks"</tag> or <tag class="xmlpi">dbfo +list-presentation="list"</tag>.</para> + +<para>When using <literal>list-presentation="list"</literal>, +you can also control the amount of space used for the <tag>term</tag>s with +the <tag class="xmlpi">dbfo term-width=".25in"</tag> processing instruction, +the <tag class="attribute">termlength</tag> attribute on <tag>variablelist</tag>, +or allow the stylesheets to attempt to calculate the amount of space to leave based on the +number of letters in the longest term. +</para> + +<programlisting> <variablelist> + <?dbfo list-presentation="list"?> + <?dbfo term-width="1.5in"?> + <?dbhtml list-presentation="table"?> + <?dbhtml term-width="1.5in"?> + <varlistentry> + <term>list</term> + <listitem> + <para> + Formatted as a list even if variablelist.as.blocks is set to 1. + </para> + </listitem> + </varlistentry> + </variablelist></programlisting> + + +</refsection> + +</refentry> + +<refentry version="5.0" xml:id="blockquote.properties"> +<refmeta> + <refentrytitle>blockquote.properties</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>blockquote.properties</refname> +<refpurpose>To set the style for block quotations.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="blockquote.properties.frag"> +<xsl:attribute-set name="blockquote.properties"> +<xsl:attribute name="margin-{$direction.align.start}">0.5in</xsl:attribute> +<xsl:attribute name="margin-{$direction.align.end}">0.5in</xsl:attribute> +<xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> +<xsl:attribute name="space-after.optimum">1em</xsl:attribute> +<xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>blockquote.properties</parameter> attribute set specifies +the formating properties of block quotations.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="ulink.show"> +<refmeta> +<refentrytitle>ulink.show</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ulink.show</refname> +<refpurpose>Display URLs after <tag>ulink</tag>s?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ulink.show.frag"> +<xsl:param name="ulink.show" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the URL of each <tag>ulink</tag> will +appear after the text of the link. If the text of the link and the URL +are identical, the URL is suppressed. </para> + +<para>See also <parameter>ulink.footnotes</parameter>.</para> + +<note><para>DocBook 5 does not have an <tag>ulink</tag> element. When processing +DocBoook 5 documents, <parameter>ulink.show</parameter> applies to all inline +elements that are marked up with <tag class="attribute">xlink:href</tag> attributes +that point to external resources.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="ulink.footnotes"> +<refmeta> +<refentrytitle>ulink.footnotes</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ulink.footnotes</refname> +<refpurpose>Generate footnotes for <tag>ulink</tag>s?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ulink.footnotes.frag"> +<xsl:param name="ulink.footnotes" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, and if <parameter>ulink.show</parameter> also is non-zero, +the URL of each <tag>ulink</tag> will appear as a footnote.</para> + +<note><para>DocBook 5 does not have an <tag>ulink</tag> element. When processing +DocBoook 5 documents, <parameter>ulink.footnotes</parameter> applies to all inline +elements that are marked up with <tag class="attribute">xlink:href</tag> attributes +that point to external resources.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="ulink.hyphenate"> +<refmeta> +<refentrytitle>ulink.hyphenate</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ulink.hyphenate</refname> +<refpurpose>Allow URLs to be automatically hyphenated</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ulink.hyphenate.frag"> +<xsl:param name="ulink.hyphenate"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If not empty, the specified character (or more generally, content) is +added to URLs after every character included in the string +in the <parameter>ulink.hyphenate.chars</parameter> parameter (default +is <quote>/</quote>). If the character in this parameter is a +Unicode soft hyphen (0x00AD) or Unicode zero-width space (0x200B), some FO +processors will be able to reasonably hyphenate long URLs.</para> + +<para>As of 28 Jan 2002, discretionary hyphens are more widely and correctly +supported than zero-width spaces for this purpose.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="ulink.hyphenate.chars"> +<refmeta> +<refentrytitle>ulink.hyphenate.chars</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ulink.hyphenate.chars</refname> +<refpurpose>List of characters to allow ulink URLs to be automatically hyphenated on</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ulink.hyphenate.chars.frag"> +<xsl:param name="ulink.hyphenate.chars">/</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If the <parameter>ulink.hyphenate</parameter> is not empty, then +hyphenation of ulinks is turned on, and any +character contained in this parameter is treated as an allowable +hyphenation point.</para> + +<para>The default value is <quote>/</quote>, but the parameter +could be customized +to contain other URL characters, as for example:</para> +<programlisting> +<xsl:param name="ulink.hyphenate.chars">:/@&?.#</xsl:param> +</programlisting> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="shade.verbatim"> +<refmeta> +<refentrytitle>shade.verbatim</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>shade.verbatim</refname> +<refpurpose>Should verbatim environments be shaded?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="shade.verbatim.frag"><xsl:param name="shade.verbatim" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>In the FO stylesheet, if this parameter is non-zero then the +<property>shade.verbatim.style</property> properties will be applied +to verbatim environments.</para> + +<para>In the HTML stylesheet, this parameter is now deprecated. Use +CSS instead.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="shade.verbatim.style"> +<refmeta> +<refentrytitle>shade.verbatim.style</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>shade.verbatim.style</refname> +<refpurpose>Properties that specify the style of shaded verbatim listings</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="shade.verbatim.style.frag"> + +<xsl:attribute-set name="shade.verbatim.style"> + <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties that specify the style of shaded verbatim listings. The +parameters specified (the border and background color) are added to +the styling of the xsl-fo output. A border might be specified as "thin +black solid" for example. See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/2004/WD-xsl11-20041216/#border">xsl-fo</link></para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="hyphenate.verbatim"> +<refmeta> +<refentrytitle>hyphenate.verbatim</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>hyphenate.verbatim</refname> +<refpurpose>Should verbatim environments be hyphenated on space characters?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="hyphenate.verbatim.frag"><xsl:param name="hyphenate.verbatim" select="0"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If the lines of program listing are too long to fit into one +line it is quite common to split them at space and indicite by hook +arrow that code continues on the next line. You can turn on this +behaviour for <tag>programlisting</tag>, +<tag>screen</tag> and <tag>synopsis</tag> elements by +using this parameter.</para> + +<para>Note that you must also enable line wrapping for verbatim environments and +select appropriate hyphenation character (e.g. hook arrow). This can +be done using <parameter>monospace.verbatim.properties</parameter> +attribute set:</para> + +<programlisting><xsl:attribute-set name="monospace.verbatim.properties" + use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="wrap-option">wrap</xsl:attribute> + <xsl:attribute name="hyphenation-character">&#x25BA;</xsl:attribute> +</xsl:attribute-set></programlisting> + +<para>For a list of arrows available in Unicode see <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.unicode.org/charts/PDF/U2190.pdf">http://www.unicode.org/charts/PDF/U2190.pdf</uri> and <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.unicode.org/charts/PDF/U2900.pdf">http://www.unicode.org/charts/PDF/U2900.pdf</uri> and make sure that +selected character is available in the font you are using for verbatim +environments.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="hyphenate.verbatim.characters"> +<refmeta> +<refentrytitle>hyphenate.verbatim.characters</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>hyphenate.verbatim.characters</refname> +<refpurpose>List of characters after which a line break can occur in listings</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="hyphenate.verbatim.characters.frag"> +<xsl:param name="hyphenate.verbatim.characters"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If you enable <parameter>hyphenate.verbatim</parameter> line +breaks are allowed only on space characters. If this is not enough for +your document, you can specify list of additional characters after +which line break is allowed in this parameter.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="use.svg"> +<refmeta> +<refentrytitle>use.svg</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.svg</refname> +<refpurpose>Allow SVG in the result tree?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="use.svg.frag"> +<xsl:param name="use.svg" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, SVG will be considered an acceptable image format. SVG +is passed through to the result tree, so correct rendering of the resulting +diagram depends on the formatter (FO processor or web browser) that is used +to process the output from the stylesheet.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="use.role.as.xrefstyle"> +<refmeta> +<refentrytitle>use.role.as.xrefstyle</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.role.as.xrefstyle</refname> +<refpurpose>Use <tag class="attribute">role</tag> attribute for +<tag class="attribute">xrefstyle</tag> on <tag>xref</tag>?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="use.role.as.xrefstyle.frag"> +<xsl:param name="use.role.as.xrefstyle" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>In DocBook documents that conform to a schema older than V4.3, this parameter allows +<tag class="attribute">role</tag> to serve the purpose of specifying the cross reference style.</para> + +<para>If non-zero, the <tag class="attribute">role</tag> attribute on +<tag>xref</tag> will be used to select the cross reference style. +In DocBook V4.3, the <tag class="attribute">xrefstyle</tag> attribute was added for this purpose. +If the <tag class="attribute">xrefstyle</tag> attribute is present, +<tag class="attribute">role</tag> will be ignored, regardless of the setting +of this parameter.</para> + +</refsection> + +<refsection><info><title>Example</title></info> + +<para>The following small stylesheet shows how to configure the +stylesheets to make use of the cross reference style:</para> + +<programlisting><?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<xsl:import href="../xsl/html/docbook.xsl"/> + +<xsl:output method="html"/> + +<xsl:param name="local.l10n.xml" select="document('')"/> +<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> + <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"> + <l:context name="xref"> + <l:template name="chapter" style="title" text="Chapter %n, %t"/> + <l:template name="chapter" text="Chapter %n"/> + </l:context> + </l:l10n> +</l:i18n> + +</xsl:stylesheet></programlisting> + +<para>With this stylesheet, the cross references in the following document:</para> + +<programlisting><?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<book id="book"><title>Book</title> + +<preface> +<title>Preface</title> + +<para>Normal: <xref linkend="ch1"/>.</para> +<para>Title: <xref xrefstyle="title" linkend="ch1"/>.</para> + +</preface> + +<chapter id="ch1"> +<title>First Chapter</title> + +<para>Irrelevant.</para> + +</chapter> +</book></programlisting> + +<para>will appear as:</para> + +<informalexample> +<para>Normal: Chapter 1.</para> +<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para> +</informalexample> +</refsection> + +</refentry> + +<refentry version="5.0" xml:id="menuchoice.separator"> +<refmeta> +<refentrytitle>menuchoice.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>menuchoice.separator</refname> +<refpurpose>Separator between items of a <tag>menuchoice</tag> +other than <tag>guimenuitem</tag> and +<tag>guisubmenu</tag></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="menuchoice.separator.frag"> +<xsl:param name="menuchoice.separator">+</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Separator used to connect items of a <tag>menuchoice</tag> other +than <tag>guimenuitem</tag> and <tag>guisubmenu</tag>. The latter +elements are linked with <parameter>menuchoice.menu.separator</parameter>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="menuchoice.menu.separator"> +<refmeta> +<refentrytitle>menuchoice.menu.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>menuchoice.menu.separator</refname> +<refpurpose>Separator between items of a <tag>menuchoice</tag> +with <tag>guimenuitem</tag> or +<tag>guisubmenu</tag></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="menuchoice.menu.separator.frag"> +<xsl:param name="menuchoice.menu.separator"> → </xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Separator used to connect items of a <tag>menuchoice</tag> with +<tag>guimenuitem</tag> or <tag>guisubmenu</tag>. Other elements +are linked with <parameter>menuchoice.separator</parameter>. +</para> +<para>The default value is &#x2192;, which is the +&rarr; (right arrow) character entity. +The current FOP (0.20.5) requires setting the font-family +explicitly. +</para> +<para>The default value also includes spaces around the arrow, +which will allow a line to break. Replace the spaces with +&#xA0; (nonbreaking space) if you don't want those +spaces to break. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="default.float.class"> +<refmeta> +<refentrytitle>default.float.class</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.float.class</refname> +<refpurpose>Specifies the default float class</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="default.float.class.frag"> +<xsl:param name="default.float.class"> + <xsl:choose> + <xsl:when test="contains($stylesheet.result.type,'html')">left</xsl:when> + <xsl:otherwise>before</xsl:otherwise> + </xsl:choose> +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Selects the direction in which a float should be placed. for +xsl-fo this is before, for html it is left. For Western texts, the +before direction is the top of the page.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footnote.number.format"> +<refmeta> +<refentrytitle>footnote.number.format</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>footnote.number.format</refname> +<refpurpose>Identifies the format used for footnote numbers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footnote.number.format.frag"> +<xsl:param name="footnote.number.format">1</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.footnote.number.format"> +<refmeta> +<refentrytitle>table.footnote.number.format</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">1<alt>1,2,3...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A<alt>A,B,C...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">a<alt>a,b,c...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">i<alt>i,ii,iii...</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">I<alt>I,II,III...</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.footnote.number.format</refname> +<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.footnote.number.format.frag"> +<xsl:param name="table.footnote.number.format">a</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>table.footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A) in tables.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footnote.number.symbols"> +<refmeta> +<refentrytitle>footnote.number.symbols</refentrytitle> +<refmiscinfo class="other" otherclass="datatype"/> +</refmeta> +<refnamediv> +<refname>footnote.number.symbols</refname> +<refpurpose>Special characters to use as footnote markers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footnote.number.symbols.frag"> +<xsl:param name="footnote.number.symbols"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>footnote.number.symbols</parameter> is not the empty string, +footnotes will use the characters it contains as footnote symbols. For example, +<quote>*&#x2020;&#x2021;&#x25CA;&#x2720;</quote> will identify +footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>, +<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes +than symbols, the stylesheets will fall back to numbered footnotes using +<parameter>footnote.number.format</parameter>.</para> + +<para>The use of symbols for footnotes depends on the ability of your +processor (or browser) to render the symbols you select. Not all systems are +capable of displaying the full range of Unicode characters. If the quoted characters +in the preceding paragraph are not displayed properly, that's a good indicator +that you may have trouble using those symbols for footnotes.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.footnote.number.symbols"> +<refmeta> +<refentrytitle>table.footnote.number.symbols</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.footnote.number.symbols</refname> +<refpurpose>Special characters to use a footnote markers in tables</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.footnote.number.symbols.frag"> +<xsl:param name="table.footnote.number.symbols"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If <parameter>table.footnote.number.symbols</parameter> is not the empty string, +table footnotes will use the characters it contains as footnote symbols. For example, +<quote>*&#x2020;&#x2021;&#x25CA;&#x2720;</quote> will identify +footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>, +<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes +than symbols, the stylesheets will fall back to numbered footnotes using +<parameter>table.footnote.number.format</parameter>.</para> + +<para>The use of symbols for footnotes depends on the ability of your +processor (or browser) to render the symbols you select. Not all systems are +capable of displaying the full range of Unicode characters. If the quoted characters +in the preceding paragraph are not displayed properly, that's a good indicator +that you may have trouble using those symbols for footnotes.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footnote.properties"> +<refmeta> +<refentrytitle>footnote.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footnote.properties</refname> +<refpurpose>Properties applied to each footnote body +</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footnote.properties.frag"> +<xsl:attribute-set name="footnote.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-weight">normal</xsl:attribute> + <xsl:attribute name="font-style">normal</xsl:attribute> + <xsl:attribute name="text-align"><xsl:value-of select="$alignment"></xsl:value-of></xsl:attribute> + <xsl:attribute name="start-indent">0pt</xsl:attribute> + <xsl:attribute name="text-indent">0pt</xsl:attribute> + <xsl:attribute name="hyphenate"><xsl:value-of select="$hyphenate"></xsl:value-of></xsl:attribute> + <xsl:attribute name="wrap-option">wrap</xsl:attribute> + <xsl:attribute name="linefeed-treatment">treat-as-space</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is applied to the footnote-block +for each footnote. +It can be used to set the +font-size, font-family, and other inheritable properties that will be +applied to all footnotes.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.footnote.properties"> +<refmeta> +<refentrytitle>table.footnote.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.footnote.properties</refname> +<refpurpose>Properties applied to each table footnote body +</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.footnote.properties.frag"> +<xsl:attribute-set name="table.footnote.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-weight">normal</xsl:attribute> + <xsl:attribute name="font-style">normal</xsl:attribute> + <xsl:attribute name="space-before">2pt</xsl:attribute> + <xsl:attribute name="text-align"><xsl:value-of select="$alignment"></xsl:value-of></xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is applied to the footnote-block +for each table footnote. +It can be used to set the +font-size, font-family, and other inheritable properties that will be +applied to all table footnotes.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footnote.mark.properties"> +<refmeta> +<refentrytitle>footnote.mark.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footnote.mark.properties</refname> +<refpurpose>Properties applied to each footnote mark +</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footnote.mark.properties.frag"> +<xsl:attribute-set name="footnote.mark.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-size">75%</xsl:attribute> + <xsl:attribute name="font-weight">normal</xsl:attribute> + <xsl:attribute name="font-style">normal</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is applied to the footnote mark used +for each footnote. +It should contain only inline properties. +</para> + +<para>The property to make the mark a superscript is contained in the +footnote template itself, because the current version of FOP reports +an error if baseline-shift is used. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footnote.sep.leader.properties"> +<refmeta> +<refentrytitle>footnote.sep.leader.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footnote.sep.leader.properties</refname> +<refpurpose>Properties associated with footnote separators</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footnote.sep.leader.properties.frag"> +<xsl:attribute-set name="footnote.sep.leader.properties"> + <xsl:attribute name="color">black</xsl:attribute> + <xsl:attribute name="leader-pattern">rule</xsl:attribute> + <xsl:attribute name="leader-length">1in</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for the rule line that separates the +footnotes from the body text. +These are properties applied to the fo:leader used as +the separator. +</para> +<para>If you want to do more than just set properties on +the leader element, then you can customize the template +named <literal>footnote.separator</literal> in +<filename>fo/pagesetup.xsl</filename>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="xref.with.number.and.title"> +<refmeta> +<refentrytitle>xref.with.number.and.title</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>xref.with.number.and.title</refname> +<refpurpose>Use number and title in cross references</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="xref.with.number.and.title.frag"> +<xsl:param name="xref.with.number.and.title" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>A cross reference may include the number (for example, the number of +an example or figure) and the <tag>title</tag> which is a required child of some +targets. This parameter inserts both the relevant number as well as +the title into the link. </para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="superscript.properties"> +<refmeta> +<refentrytitle>superscript.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>superscript.properties</refname> +<refpurpose>Properties associated with superscripts</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="superscript.properties.frag"> +<xsl:attribute-set name="superscript.properties"> + <xsl:attribute name="font-size">75%</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies styling properties for superscripts.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="subscript.properties"> +<refmeta> +<refentrytitle>subscript.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>subscript.properties</refname> +<refpurpose>Properties associated with subscripts</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="subscript.properties.frag"> +<xsl:attribute-set name="subscript.properties"> + <xsl:attribute name="font-size">75%</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies styling properties for subscripts.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="pgwide.properties"> +<refmeta> +<refentrytitle>pgwide.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>pgwide.properties</refname> +<refpurpose>Properties to make a figure or table page wide. +</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="pgwide.properties.frag"> +<xsl:attribute-set name="pgwide.properties"> + <xsl:attribute name="start-indent">0pt</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This attribute set is used to set the properties +that make a figure or table "page wide" in fo output. +It comes into effect when an attribute <literal>pgwide="1"</literal> +is used. +</para> + +<para> +By default, it sets <parameter>start-indent</parameter> +to <literal>0pt</literal>. +In a stylesheet that sets the parameter +<parameter>body.start.indent</parameter> +to a non-zero value in order to indent body text, +this attribute set can be used to outdent pgwide +figures to the start margin. +</para> + +<para>If a document uses a multi-column page layout, +then this attribute set could try setting <parameter>span</parameter> +to a value of <literal>all</literal>. However, this may +not work with some processors because a span property must be on an +fo:block that is a direct child of fo:flow. It may work in +some processors anyway. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="highlight.source"> +<refmeta> +<refentrytitle>highlight.source</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>highlight.source</refname> +<refpurpose>Should the content of <tag>programlisting</tag> +be syntactically highlighted?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="highlight.source.frag"> +<xsl:param name="highlight.source" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>When this parameter is non-zero, the stylesheets will try to do syntax highlighting of the +content of <tag>programlisting</tag> elements. You specify the language for each programlisting +by using the <tag class="attribute">language</tag> attribute. The <parameter>highlight.default.language</parameter> +parameter can be used to specify the language for programlistings without a <tag class="attribute">language</tag> +attribute. Syntax highlighting also works for <tag>screen</tag> and <tag>synopsis</tag> elements.</para> + +<para>The actual highlighting work is done by the XSLTHL extension module. This is an external Java library that has to be +downloaded separately (see below).</para> + +<itemizedlist> +<para>In order to use this extension, you must</para> + +<listitem><para>add <filename>xslthl-2.x.x.jar</filename> to your Java classpath. The latest version is available +from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sourceforge.net/projects/xslthl">the XSLT syntax highlighting project</link> +at SourceForge.</para> +</listitem> +<listitem> +<para>use a customization layer in which you import one of the following stylesheet modules: +<itemizedlist> + <listitem> + <para><filename>html/highlight.xsl</filename> + </para> + </listitem> +<listitem> + <para><filename>xhtml/highlight.xsl</filename> + </para> + </listitem> +<listitem> + <para><filename>html-1_1/highlight.xsl</filename> + </para> + </listitem> +<listitem> + <para><filename>fo/highlight.xsl</filename> + </para> +</listitem> +</itemizedlist> +</para> +</listitem> +<listitem><para>let either the <literal>xslthl.config</literal> Java system property or the +<parameter>highlight.xslthl.config</parameter> parameter point to the configuration file for syntax +highlighting (using URL syntax). DocBook XSL comes with a ready-to-use configuration file, +<filename>highlighting/xslthl-config.xml</filename>.</para> +</listitem> +</itemizedlist> + +<para>The extension works with Saxon 6.5.x and Xalan-J. (Saxon 8.5 or later is also supported, but since it is +an XSLT 2.0 processor it is not guaranteed to work with DocBook XSL in all circumstances.)</para> + +<para>The following is an example of a Saxon 6 command adapted for syntax highlighting, to be used on Windows:</para> + +<informalexample> +<para><command>java -cp c:/Java/saxon.jar;c:/Java/xslthl-2.0.1.jar +-Dxslthl.config=file:///c:/docbook-xsl/highlighting/xslthl-config.xml com.icl.saxon.StyleSheet +-o test.html test.xml myhtml.xsl</command></para> +</informalexample> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="highlight.xslthl.config"> +<refmeta> +<refentrytitle>highlight.xslthl.config</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">uri</refmiscinfo> +</refmeta> +<refnamediv> +<refname>highlight.xslthl.config</refname> +<refpurpose>Location of XSLTHL configuration file</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="highlight.xslthl.config.frag"> +<xsl:param name="highlight.xslthl.config"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This location has precedence over the corresponding Java property.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="highlight.default.language"> +<refmeta> +<refentrytitle>highlight.default.language</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>highlight.default.language</refname> +<refpurpose>Default language of programlisting</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="highlight.default.language.frag"> +<xsl:param name="highlight.default.language"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This language is used when there is no language attribute on programlisting.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="email.delimiters.enabled"> +<refmeta> +<refentrytitle>email.delimiters.enabled</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>email.delimiters.enabled</refname> +<refpurpose>Generate delimiters around email addresses?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="email.delimiters.enabled.frag"> +<xsl:param name="email.delimiters.enabled" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, delimiters + +<footnote><para>For delimiters, the +stylesheets are currently hard-coded to output angle +brackets.</para></footnote> + +are generated around e-mail addresses +(the output of the <tag>email</tag> element).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="email.mailto.enabled"> +<refmeta> +<refentrytitle>email.mailto.enabled</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>email.mailto.enabled</refname> +<refpurpose>Generate mailto: links for email addresses?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="email.mailto.enabled.frag"> +<xsl:param name="email.mailto.enabled" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero the generated output for the <tag>email</tag> element +will be a clickable mailto: link that brings up the default mail client +on the system.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.container.element"> +<refmeta> +<refentrytitle>section.container.element</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">block</refmiscinfo> +<refmiscinfo class="other" otherclass="value">wrapper</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.container.element</refname> +<refpurpose>Select XSL-FO element name to contain sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.container.element.frag"> +<xsl:param name="section.container.element">block</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Selects the element name for outer container of +each section. The choices are <literal>block</literal> (default) +or <literal>wrapper</literal>. +The <literal>fo:</literal> namespace prefix is added +by the stylesheet to form the full element name. +</para> + +<para>This element receives the section <literal>id</literal> +attribute and the appropriate section level attribute-set. +</para> + +<para>Changing this parameter to <literal>wrapper</literal> +is only necessary when producing multi-column output +that contains page-wide spans. Using <literal>fo:wrapper</literal> +avoids the nesting of <literal>fo:block</literal> +elements that prevents spans from working (the standard says +a span must be on a block that is a direct child of +<literal>fo:flow</literal>). +</para> + +<para>If set to <literal>wrapper</literal>, the +section attribute-sets only support properties +that are inheritable. That's because there is no +block to apply them to. Properties such as +font-family are inheritable, but properties such as +border are not. +</para> + +<para>Only some XSL-FO processors need to use this parameter. +The Antenna House processor, for example, will handle +spans in nested blocks without changing the element name. +The RenderX XEP product and FOP follow the XSL-FO standard +and need to use <literal>wrapper</literal>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="monospace.verbatim.font.width"> +<refmeta> +<refentrytitle>monospace.verbatim.font.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>monospace.verbatim.font.width</refname> +<refpurpose>Width of a single monospace font character</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="monospace.verbatim.font.width.frag"> +<xsl:param name="monospace.verbatim.font.width">0.60em</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies with em units the width of a single character +of the monospace font. The default value is <literal>0.6em</literal>.</para> + +<para>This parameter is only used when a <tag>screen</tag> +or <tag>programlisting</tag> element has a +<tag class="attribute">width</tag> attribute, which is +expressed as a plain integer to indicate the maximum character count +of each line. +To convert this character count to an actual maximum width +measurement, the width of the font characters must be provided. +Different monospace fonts have different character width, +so this parameter should be adjusted to fit the +monospace font being used. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="exsl.node.set.available"> +<refmeta> +<refentrytitle>exsl.node.set.available</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>exsl.node.set.available</refname> +<refpurpose>Is the test function-available('exsl:node-set') true?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="exsl.node.set.available.frag"><xsl:param name="exsl.node.set.available"> + <xsl:choose> + <xsl:when exsl:foo="" test="function-available('exsl:node-set') or contains(system-property('xsl:vendor'), 'Apache Software Foundation')">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, +then the exsl:node-set() function is available to be used in +the stylesheet. +If zero, then the function is not available. +This param automatically detects the presence of +the function and does not normally need to be set manually.</para> + +<para>This param was created to handle a long-standing +bug in the Xalan processor that fails to detect the +function even though it is available.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="bookmarks.collapse"> +<refmeta> +<refentrytitle>bookmarks.collapse</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bookmarks.collapse</refname> +<refpurpose>Specifies the initial state of bookmarks</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="bookmarks.collapse.frag"> +<xsl:param name="bookmarks.collapse" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the bookmark tree is collapsed so that only the +top-level bookmarks are displayed initially. Otherwise, the whole tree +of bookmarks is displayed.</para> + +<para>This parameter currently works with FOP 0.93 or later.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="graphics"><title>Graphics</title> +<refentry version="5.0" xml:id="graphic.default.extension"> +<refmeta> +<refentrytitle>graphic.default.extension</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>graphic.default.extension</refname> +<refpurpose>Default extension for graphic filenames</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="graphic.default.extension.frag"><xsl:param name="graphic.default.extension"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If a <tag>graphic</tag> or <tag>mediaobject</tag> +includes a reference to a filename that does not include an extension, +and the <tag class="attribute">format</tag> attribute is +<emphasis>unspecified</emphasis>, the default extension will be used. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="default.image.width"> +<refmeta> +<refentrytitle>default.image.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.image.width</refname> +<refpurpose>The default width of images</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="default.image.width.frag"> +<xsl:param name="default.image.width"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If specified, this value will be used for the +<tag class="attribute">width</tag> attribute on +images that do not specify any +<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport +dimensions</link>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="preferred.mediaobject.role"> +<refmeta> +<refentrytitle>preferred.mediaobject.role</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>preferred.mediaobject.role</refname> +<refpurpose>Select which mediaobject to use based on +this value of an object's <tag class="attribute">role</tag> attribute. +</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="preferred.mediaobject.role.frag"> +<xsl:param name="preferred.mediaobject.role"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>A mediaobject may contain several objects such as imageobjects. +If the parameter <parameter>use.role.for.mediaobject</parameter> is +non-zero, then the <literal>role</literal> attribute on +<tag>imageobject</tag>s and other objects within a +<tag>mediaobject</tag> container will be used to select which object +will be used. If one of the objects has a role value that matches the +<parameter>preferred.mediaobject.role</parameter> parameter, then it +has first priority for selection. If more than one has such a role +value, the first one is used. +</para> +<para> +See the <parameter>use.role.for.mediaobject</parameter> parameter +for the sequence of selection.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="use.role.for.mediaobject"> +<refmeta> +<refentrytitle>use.role.for.mediaobject</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.role.for.mediaobject</refname> +<refpurpose>Use <tag class="attribute">role</tag> attribute +value for selecting which of several objects within a mediaobject to use. +</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="use.role.for.mediaobject.frag"> +<xsl:param name="use.role.for.mediaobject" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the <tag class="attribute">role</tag> attribute on +<tag>imageobject</tag>s or other objects within a <tag>mediaobject</tag> container will be used to select which object will be +used. +</para> +<para> +The order of selection when then parameter is non-zero is: +</para> +<orderedlist> +<listitem> + <para>If the stylesheet parameter <parameter>preferred.mediaobject.role</parameter> has a value, then the object whose role equals that value is selected.</para> +</listitem> +<listitem> +<para>Else if an object's role attribute has a value of +<literal>html</literal> for HTML processing or +<literal>fo</literal> for FO output, then the first +of such objects is selected. +</para> +</listitem> +<listitem> +<para>Else the first suitable object is selected.</para> +</listitem> +</orderedlist> +<para> +If the value of +<parameter>use.role.for.mediaobject</parameter> +is zero, then role attributes are not considered +and the first suitable object +with or without a role value is used. +</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="ignore.image.scaling"> +<refmeta> +<refentrytitle>ignore.image.scaling</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ignore.image.scaling</refname> +<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ignore.image.scaling.frag"> +<xsl:param name="ignore.image.scaling" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the scaling attributes on graphics and media objects are +ignored.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="img.src.path"> +<refmeta> +<refentrytitle>img.src.path</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>img.src.path</refname> +<refpurpose>Path to HTML/FO image files</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="img.src.path.frag"><xsl:param name="img.src.path"></xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Add a path prefix to the value of the <tag class="attribute">fileref</tag> +attribute of <tag>graphic</tag>, <tag>inlinegraphic</tag>, and <tag>imagedata</tag> elements. The resulting +compound path is used in the output as the value of the <tag class="attribute">src</tag> +attribute of <tag class="element">img</tag> (HTML) or <tag class="element">external-graphic</tag> (FO). +</para> + +<para> +The path given by <literal>img.src.path</literal> could be relative to the directory where the HTML/FO +files are created, or it could be an absolute URI. +The default value is empty. +Be sure to include a trailing slash if needed. +</para> + +<para>This prefix is not applied to any filerefs that start +with "/" or contain "//:". +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="keep.relative.image.uris"> +<refmeta> +<refentrytitle>keep.relative.image.uris</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>keep.relative.image.uris</refname> +<refpurpose>Should image URIs be resolved against xml:base?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="keep.relative.image.uris.frag"> + +<xsl:param name="keep.relative.image.uris" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, relative URIs (in, for example +<literal>fileref</literal> attributes) will be used in the generated +output. Otherwise, the URIs will be made absolute with respect to the +base URI.</para> + +<para>Note that the stylesheets calculate (and use) the absolute form +for some purposes, this only applies to the resulting output.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="general"><title>Pagination and General Styles</title> +<partintro xml:id="margins_partintro"> +<section xml:id="margins_intro"><title>Understanding XSL FO Margins</title> + +<para>To make sense of the parameters in this section, it's useful to +consider <xref linkend="fig.pagemodel"/>.</para> + +<figure xml:id="fig.pagemodel"> + <title>Page Model</title> + <mediaobject xml:id="fo-pageregions-image"> + <imageobject role="html"> + <imagedata fileref="page.png"/> + </imageobject> + <imageobject role="fo"> + <imagedata fileref="fo/page.png"/> + </imageobject> + <textobject><phrase>Figure showing page margins</phrase></textobject> + <textobject> + <para>This figure shows the physical page with the various FO page regions + identified.</para> + </textobject> + </mediaobject> +</figure> + +<para>First, let's consider the regions on the page.</para> + +<para>The white region is the physical page. Its dimensions are determined by +the <parameter>page.height</parameter> and <parameter>page.width</parameter> +parameters.</para> + +<para>The yellow region is the region-body. The size and placement of +the region body is constrained by the dimensions labelled in the +figure.</para> + +<para>The pink region at the top of the page is the region-before. The +darker area inside the region-before is the header text. In XSL, the default +display alignment for a region is <literal>before</literal>, but the +DocBook stylesheets still explicitly make it <literal>before</literal>. That's +why the darker area is at the top.</para> + +<para>The pink region at the bottom of the page is the region-after. +The darker area is the footer text. In XSL, the default display +alignment for a region is <literal>before</literal>, +but the DocBook stylesheets explicitly make it +<literal>after</literal>. That's why the darker area is at the bottom.</para> + +<para>The dimensions in the figure are:</para> + +<orderedlist numeration="upperalpha"> +<listitem><para>The page-master margin-top. +</para></listitem> +<listitem><para>The region-before extent. +</para></listitem> +<listitem><para>The region-body margin-top. +</para></listitem> +<listitem><para>The region-after extent. +</para></listitem> +<listitem><para>The page-master margin-bottom. +</para></listitem> +<listitem><para>The region-body margin-bottom. +</para></listitem> +<listitem><para>The sum of the page-master margin-left and the +region-body margin-left. In DocBook, the region-body margin-left is +zero by default, so this is simply the page-master margin-left. +</para></listitem> +<listitem><para>The sum of the page-master margin-right and the +region-body margin-right. In DocBook, the region-body margin-right is +zero by default, so this is simply the page-master margin-right. +</para></listitem> +</orderedlist> + +</section> +</partintro> + +<refentry version="5.0" xml:id="page.height"> +<refmeta> +<refentrytitle>page.height</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.height</refname> +<refpurpose>The height of the physical page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.height.frag"><xsl:param name="page.height"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.height.portrait"></xsl:value-of> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.width.portrait"></xsl:value-of> + </xsl:otherwise> + </xsl:choose> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The page height is generally calculated from the +<parameter>paper.type</parameter> and +<parameter>page.orientation</parameter> parameters. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.height.portrait"> +<refmeta> +<refentrytitle>page.height.portrait</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.height.portrait</refname> +<refpurpose>Specify the physical size of the long edge of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.height.portrait.frag"><xsl:param name="page.height.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when> + <xsl:when test="$paper.type = 'USletter'">11in</xsl:when> + <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">37mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">44mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">40mm</xsl:when> + <xsl:otherwise>11in</xsl:otherwise> + </xsl:choose> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The portrait page height is the length of the long +edge of the physical page. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.margin.bottom"> +<refmeta> +<refentrytitle>page.margin.bottom</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.margin.bottom</refname> +<refpurpose>The bottom margin of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.margin.bottom.frag"> +<xsl:param name="page.margin.bottom">0.5in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The bottom page margin is the distance from the bottom of the region-after +to the physical bottom of the page. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.margin.inner"> +<refmeta> +<refentrytitle>page.margin.inner</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.margin.inner</refname> +<refpurpose>The inner page margin</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.margin.inner.frag"><xsl:param name="page.margin.inner"> + <xsl:choose> + <xsl:when test="$double.sided != 0">1.25in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The inner page margin is the distance from bound edge of the +page to the first column of text. </para> + +<para>The inner page margin is the distance from bound edge of the +page to the outer edge of the first column of text.</para> + +<para>In left-to-right text direction, +this is the left margin of recto (front side) pages. +For single-sided output, it is the left margin +of all pages.</para> + +<para>In right-to-left text direction, +this is the right margin of recto pages. +For single-sided output, this is the +right margin of all pages.</para> + +<note> +<para>Current versions (at least as of version 4.13) +of the XEP XSL-FO processor do not +correctly handle these margin settings for documents +with right-to-left text direction. +The workaround in that situation is to reverse +the values for <parameter>page.margin.inner</parameter> +and <parameter>page.margin.outer</parameter>, until +this bug is fixed by RenderX. It does not affect documents +with left-to-right text direction.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.margin.outer"> +<refmeta> +<refentrytitle>page.margin.outer</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.margin.outer</refname> +<refpurpose>The outer page margin</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.margin.outer.frag"><xsl:param name="page.margin.outer"> + <xsl:choose> + <xsl:when test="$double.sided != 0">0.75in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The outer page margin is the distance from non-bound edge of the +page to the outer edge of the last column of text.</para> + +<para>In left-to-right text direction, +this is the right margin of recto (front side) pages. +For single-sided output, it is the right margin +of all pages.</para> + +<para>In right-to-left text direction, +this is the left margin of recto pages. +For single-sided output, this is the +left margin of all pages.</para> + +<note> +<para>Current versions (at least as of version 4.13) +of the XEP XSL-FO processor do not +correctly handle these margin settings for documents +with right-to-left text direction. +The workaround in that situation is to reverse +the values for <parameter>page.margin.inner</parameter> +and <parameter>page.margin.outer</parameter>, until +this bug is fixed by RenderX. It does not affect documents +with left-to-right text direction.</para> +</note> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.margin.top"> +<refmeta> +<refentrytitle>page.margin.top</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.margin.top</refname> +<refpurpose>The top margin of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.margin.top.frag"> +<xsl:param name="page.margin.top">0.5in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The top page margin is the distance from the physical top of the +page to the top of the region-before.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.orientation"> +<refmeta> +<refentrytitle>page.orientation</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">portrait</refmiscinfo> +<refmiscinfo class="other" otherclass="value">landscape</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.orientation</refname> +<refpurpose>Select the page orientation</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.orientation.frag"> +<xsl:param name="page.orientation">portrait</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para> Select one from portrait or landscape. +In portrait orientation, the short edge is horizontal; in +landscape orientation, it is vertical. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.width"> +<refmeta> +<refentrytitle>page.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.width</refname> +<refpurpose>The width of the physical page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.width.frag"><xsl:param name="page.width"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.width.portrait"></xsl:value-of> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.height.portrait"></xsl:value-of> + </xsl:otherwise> + </xsl:choose> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The page width is generally calculated from the +<parameter>paper.type</parameter> and +<parameter>page.orientation</parameter> parameters.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="page.width.portrait"> +<refmeta> +<refentrytitle>page.width.portrait</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>page.width.portrait</refname> +<refpurpose>Specify the physical size of the short edge of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="page.width.portrait.frag"><xsl:param name="page.width.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">37mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">26mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">44mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">31mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">40mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">28mm</xsl:when> + <xsl:otherwise>8.5in</xsl:otherwise> + </xsl:choose> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The portrait page width is the length of the short +edge of the physical page. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="paper.type"> +<refmeta> +<refentrytitle>paper.type</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> +<refmiscinfo class="other" otherclass="value">USletter<alt>8.5x11in</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">USlandscape<alt>11x8.5in</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">4A0<alt>2378x1682mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">2A0<alt>1682x1189mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A0<alt>1189x841mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A1<alt>841x594mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A2<alt>594x420mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A3<alt>420x297mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A4<alt>297x210mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A5<alt>210x148mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A6<alt>148x105mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A7<alt>105x74mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A8<alt>74x52mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A9<alt>52x37mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">A10<alt>37x26mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B0<alt>1414x1000mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B1<alt>1000x707mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B2<alt>707x500mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B3<alt>500x353mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B4<alt>353x250mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B5<alt>250x176mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B6<alt>176x125mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B7<alt>125x88mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B8<alt>88x62mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B9<alt>62x44mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">B10<alt>44x31mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C0<alt>1297x917mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C1<alt>917x648mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C2<alt>648x458mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C3<alt>458x324mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C4<alt>324x229mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C5<alt>229x162mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C6<alt>162x114mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C7<alt>114x81mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C8<alt>81x57mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C9<alt>57x40mm</alt></refmiscinfo> +<refmiscinfo class="other" otherclass="value">C10<alt>40x28mm</alt></refmiscinfo> +</refmeta> +<refnamediv> +<refname>paper.type</refname> +<refpurpose>Select the paper type</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="paper.type.frag"> +<xsl:param name="paper.type">USletter</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The paper type is a convenient way to specify the paper size. +The list of known paper sizes includes USletter and most of the A, +B, and C sizes. See <parameter>page.width.portrait</parameter>, for example. + + +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="double.sided"> +<refmeta> +<refentrytitle>double.sided</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>double.sided</refname> +<refpurpose>Is the document to be printed double sided?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="double.sided.frag"> +<xsl:param name="double.sided" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Double-sided documents are printed with a slightly wider margin +on the binding edge of the page. +</para> +<para>FIXME: The current set of parameters does not take writing direction +into account.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="body.margin.bottom"> +<refmeta> +<refentrytitle>body.margin.bottom</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.margin.bottom</refname> +<refpurpose>The bottom margin of the body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.margin.bottom.frag"> +<xsl:param name="body.margin.bottom">0.5in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The body bottom margin is the distance from the last line of text +in the page body to the bottom of the region-after. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="body.margin.top"> +<refmeta> +<refentrytitle>body.margin.top</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.margin.top</refname> +<refpurpose>To specify the size of the top margin of a page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.margin.top.frag"> +<xsl:param name="body.margin.top">0.5in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The body top margin is the distance from the top of the +region-before to the first line of text in the page body.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="body.start.indent"> +<refmeta> +<refentrytitle>body.start.indent</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.start.indent</refname> +<refpurpose>The start-indent for the body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.start.indent.frag"> +<xsl:param name="body.start.indent"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0">0pt</xsl:when> + <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when> + <xsl:otherwise>4pc</xsl:otherwise> + </xsl:choose> +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter provides +the means of indenting the body text relative to +section titles. +For left-to-right text direction, it indents the left side. +For right-to-left text direction, it indents the right side. +It is used in place of the +<parameter>title.margin.left</parameter> for +all XSL-FO processors except FOP 0.25. +It enables support for side floats to appear +in the indented margin area. +</para> +<para>This start-indent property is added to the fo:flow +for certain page sequences. Which page-sequences it is +applied to is determined by the template named +<literal>set.flow.properties</literal>. +By default, that template adds it to the flow +for page-sequences using the <quote>body</quote> +master-reference, as well as appendixes and prefaces. +</para> +<para>If this parameter is used, section titles should have +a start-indent value of 0pt if they are to be +outdented relative to the body text. +</para> + +<para>If you are using FOP, then set this parameter to a zero +width value and set the <parameter>title.margin.left</parameter> +parameter to the negative value of the desired indent. +</para> + +<para>See also <parameter>body.end.indent</parameter> and +<parameter>title.margin.left</parameter>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="body.end.indent"> +<refmeta> +<refentrytitle>body.end.indent</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.end.indent</refname> +<refpurpose>The end-indent for the body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.end.indent.frag"> +<xsl:param name="body.end.indent">0pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This end-indent property is added to the fo:flow +for certain page sequences. Which page-sequences it is +applied to is determined by the template named +<literal>set.flow.properties</literal>. +By default, that template adds it to the flow +for page-sequences using the <quote>body</quote> +master-reference, as well as appendixes and prefaces. +</para> + +<para>See also <parameter>body.start.indent</parameter>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="alignment"> +<refmeta> +<refentrytitle>alignment</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> + <refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> + <refmiscinfo class="other" otherclass="value">left</refmiscinfo> + <refmiscinfo class="other" otherclass="value">start</refmiscinfo> + <refmiscinfo class="other" otherclass="value">right</refmiscinfo> + <refmiscinfo class="other" otherclass="value">end</refmiscinfo> + <refmiscinfo class="other" otherclass="value">center</refmiscinfo> + <refmiscinfo class="other" otherclass="value">justify</refmiscinfo> +</refmeta> +<refnamediv> +<refname>alignment</refname> +<refpurpose>Specify the default text alignment</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="alignment.frag"><xsl:param name="alignment">justify</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The default text alignment is used for most body text. +Allowed values are +<literal>left</literal>, +<literal>right</literal>, +<literal>start</literal>, +<literal>end</literal>, +<literal>center</literal>, +<literal>justify</literal>. +The default value is <literal>justify</literal>. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="hyphenate"> +<refmeta> +<refentrytitle>hyphenate</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">closed</refmiscinfo> +<refmiscinfo class="other" otherclass="value">true</refmiscinfo> +<refmiscinfo class="other" otherclass="value">false</refmiscinfo> +</refmeta> +<refnamediv> +<refname>hyphenate</refname> +<refpurpose>Specify hyphenation behavior</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="hyphenate.frag"><xsl:param name="hyphenate">true</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If true, words may be hyphenated. Otherwise, they may not. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="line-height"> +<refmeta> +<refentrytitle>line-height</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>line-height</refname> +<refpurpose>Specify the line-height property</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="line-height.frag"> +<xsl:param name="line-height">normal</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets the line-height property.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.count.back"> +<refmeta> +<refentrytitle>column.count.back</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.back</refname> +<refpurpose>Number of columns on back matter pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.count.back.frag"> +<xsl:param name="column.count.back" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Number of columns on back matter (appendix, glossary, etc.) pages.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.count.body"> +<refmeta> +<refentrytitle>column.count.body</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.body</refname> +<refpurpose>Number of columns on body pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.count.body.frag"> +<xsl:param name="column.count.body" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Number of columns on body pages.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.count.front"> +<refmeta> +<refentrytitle>column.count.front</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.front</refname> +<refpurpose>Number of columns on front matter pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.count.front.frag"> +<xsl:param name="column.count.front" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Number of columns on front matter (dedication, preface, etc.) pages.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.count.index"> +<refmeta> +<refentrytitle>column.count.index</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.index</refname> +<refpurpose>Number of columns on index pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.count.index.frag"> +<xsl:param name="column.count.index">2</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Number of columns on index pages.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.count.lot"> +<refmeta> +<refentrytitle>column.count.lot</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.lot</refname> +<refpurpose>Number of columns on a 'List-of-Titles' page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.count.lot.frag"> +<xsl:param name="column.count.lot" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Number of columns on a page sequence containing the Table of Contents, +List of Figures, etc.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.count.titlepage"> +<refmeta> +<refentrytitle>column.count.titlepage</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.titlepage</refname> +<refpurpose>Number of columns on a title page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.count.titlepage.frag"> +<xsl:param name="column.count.titlepage" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Number of columns on a title page</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.gap.back"> +<refmeta> +<refentrytitle>column.gap.back</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.gap.back</refname> +<refpurpose>Gap between columns in back matter</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.gap.back.frag"> +<xsl:param name="column.gap.back">12pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the gap between columns in back matter (if +<parameter>column.count.back</parameter> is greater than one).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.gap.body"> +<refmeta> +<refentrytitle>column.gap.body</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.gap.body</refname> +<refpurpose>Gap between columns in the body</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.gap.body.frag"> +<xsl:param name="column.gap.body">12pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the gap between columns in body matter (if +<parameter>column.count.body</parameter> is greater than one).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.gap.front"> +<refmeta> +<refentrytitle>column.gap.front</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.gap.front</refname> +<refpurpose>Gap between columns in the front matter</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.gap.front.frag"> +<xsl:param name="column.gap.front">12pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the gap between columns in front matter (if +<parameter>column.count.front</parameter> is greater than one).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.gap.index"> +<refmeta> +<refentrytitle>column.gap.index</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.gap.index</refname> +<refpurpose>Gap between columns in the index</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.gap.index.frag"> +<xsl:param name="column.gap.index">12pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the gap between columns in indexes (if +<parameter>column.count.index</parameter> is greater than one).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.gap.lot"> +<refmeta> +<refentrytitle>column.gap.lot</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.gap.lot</refname> +<refpurpose>Gap between columns on a 'List-of-Titles' page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.gap.lot.frag"> +<xsl:param name="column.gap.lot">12pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the gap between columns on 'List-of-Titles' pages (if +<parameter>column.count.lot</parameter> is greater than one).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="column.gap.titlepage"> +<refmeta> +<refentrytitle>column.gap.titlepage</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.gap.titlepage</refname> +<refpurpose>Gap between columns on title pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="column.gap.titlepage.frag"> +<xsl:param name="column.gap.titlepage">12pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the gap between columns on title pages (if +<parameter>column.count.titlepage</parameter> is greater than one).</para> + + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="region.after.extent"> +<refmeta> +<refentrytitle>region.after.extent</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>region.after.extent</refname> +<refpurpose>Specifies the height of the footer.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="region.after.extent.frag"> +<xsl:param name="region.after.extent">0.4in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The region after extent is the height of the area where footers +are printed. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="region.before.extent"> +<refmeta> +<refentrytitle>region.before.extent</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>region.before.extent</refname> +<refpurpose>Specifies the height of the header</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="region.before.extent.frag"> +<xsl:param name="region.before.extent">0.4in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The region before extent is the height of the area where headers +are printed. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="default.units"> +<refmeta> +<refentrytitle>default.units</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">cm</refmiscinfo> +<refmiscinfo class="other" otherclass="value">mm</refmiscinfo> +<refmiscinfo class="other" otherclass="value">in</refmiscinfo> +<refmiscinfo class="other" otherclass="value">pt</refmiscinfo> +<refmiscinfo class="other" otherclass="value">pc</refmiscinfo> +<refmiscinfo class="other" otherclass="value">px</refmiscinfo> +<refmiscinfo class="other" otherclass="value">em</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.units</refname> +<refpurpose>Default units for an unqualified dimension</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="default.units.frag"> +<xsl:param name="default.units">pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If an unqualified dimension is encountered (for example, in a +graphic width), the <parameter>default.units</parameter> will be used for the +units. Unqualified dimensions are not allowed in XSL Formatting Objects. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="normal.para.spacing"> +<refmeta> +<refentrytitle>normal.para.spacing</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>normal.para.spacing</refname> +<refpurpose>What space do you want between normal paragraphs</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="normal.para.spacing.frag"><xsl:attribute-set name="normal.para.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Specify the spacing required between normal paragraphs</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="body.font.master"> +<refmeta> +<refentrytitle>body.font.master</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">number</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.font.master</refname> +<refpurpose>Specifies the default point size for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.font.master.frag"> +<xsl:param name="body.font.master">10</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The body font size is specified in two parameters +(<parameter>body.font.master</parameter> and <parameter>body.font.size</parameter>) +so that math can be performed on the font size by XSLT. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="body.font.size"> +<refmeta> +<refentrytitle>body.font.size</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.font.size</refname> +<refpurpose>Specifies the default font size for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.font.size.frag"> +<xsl:param name="body.font.size"> + <xsl:value-of select="$body.font.master"></xsl:value-of><xsl:text>pt</xsl:text> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The body font size is specified in two parameters +(<parameter>body.font.master</parameter> and <parameter>body.font.size</parameter>) +so that math can be performed on the font size by XSLT. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footnote.font.size"> +<refmeta> +<refentrytitle>footnote.font.size</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footnote.font.size</refname> +<refpurpose>The font size for footnotes</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footnote.font.size.frag"><xsl:param name="footnote.font.size"> + <xsl:value-of select="$body.font.master * 0.8"></xsl:value-of><xsl:text>pt</xsl:text> +</xsl:param></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The footnote font size is used for...footnotes! +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="title.margin.left"> +<refmeta> +<refentrytitle>title.margin.left</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>title.margin.left</refname> +<refpurpose>Adjust the left margin for titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="title.margin.left.frag"> +<xsl:param name="title.margin.left"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0">-4pc</xsl:when> + <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter provides +the means of adjusting the left margin for titles +when the XSL-FO processor being used is +an old version of FOP (0.25 and earlier). +It is only useful when the <parameter>fop.extensions</parameter> +is nonzero.</para> + +<para>The left margin of the body region +is calculated to include this space, +and titles are outdented to the left outside +the body region by this amount, +effectively leaving titles at the intended left margin +and the body text indented. +Currently this method is only used for old FOP because +it cannot properly use the <parameter>body.start.indent</parameter> +parameter. +</para> +<para> +The default value when the <parameter>fop.extensions</parameter> +parameter is nonzero is -4pc, which means the +body text is indented 4 picas relative to +the titles. +The default value when the <parameter>fop.extensions</parameter> +parameter equals zero is 0pt, and +the body indent should instead be specified +using the <parameter>body.start.indent</parameter> +parameter. +</para> +<para> +If you set the value to zero, be sure to still include +a unit indicator such as <literal>0pt</literal>, or +the FO processor will report errors. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="draft.mode"> +<refmeta> +<refentrytitle>draft.mode</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">no</refmiscinfo> +<refmiscinfo class="other" otherclass="value">yes</refmiscinfo> +<refmiscinfo class="other" otherclass="value">maybe</refmiscinfo> +</refmeta> +<refnamediv> +<refname>draft.mode</refname> +<refpurpose>Select draft mode</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="draft.mode.frag"> +<xsl:param name="draft.mode">maybe</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Selects draft mode. If <parameter>draft.mode</parameter> is +<quote><literal>yes</literal></quote>, the entire document will be treated +as a draft. If it is <quote><literal>no</literal></quote>, the entire document +will be treated as a final copy. If it is <quote><literal>maybe</literal></quote>, +individual sections will be treated as draft or final independently, depending +on how their <literal>status</literal> attribute is set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="draft.watermark.image"> +<refmeta> +<refentrytitle>draft.watermark.image</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">uri</refmiscinfo> +</refmeta> +<refnamediv> +<refname>draft.watermark.image</refname> +<refpurpose>The URI of the image to be used for draft watermarks</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="draft.watermark.image.frag"> +<xsl:param name="draft.watermark.image">http://docbook.sourceforge.net/release/images/draft.png</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The image to be used for draft watermarks.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="headers.on.blank.pages"> +<refmeta> +<refentrytitle>headers.on.blank.pages</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>headers.on.blank.pages</refname> +<refpurpose>Put headers on blank pages?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="headers.on.blank.pages.frag"> +<xsl:param name="headers.on.blank.pages" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, headers will be placed on blank pages.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footers.on.blank.pages"> +<refmeta> +<refentrytitle>footers.on.blank.pages</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footers.on.blank.pages</refname> +<refpurpose>Put footers on blank pages?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footers.on.blank.pages.frag"> +<xsl:param name="footers.on.blank.pages" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, footers will be placed on blank pages.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="header.rule"> +<refmeta> +<refentrytitle>header.rule</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.rule</refname> +<refpurpose>Rule under headers?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="header.rule.frag"> +<xsl:param name="header.rule" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, a rule will be drawn below the page headers.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footer.rule"> +<refmeta> +<refentrytitle>footer.rule</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.rule</refname> +<refpurpose>Rule over footers?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footer.rule.frag"> +<xsl:param name="footer.rule" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, a rule will be drawn above the page footers.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="header.column.widths"> +<refmeta> +<refentrytitle>header.column.widths</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.column.widths</refname> +<refpurpose>Specify relative widths of header areas</refpurpose> +</refnamediv> + +<refsynopsisdiv><programlisting xml:id="header.column.widths.frag"> +<xsl:param name="header.column.widths">1 1 1</xsl:param> +</programlisting></refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Page headers in print output use a three column table +to position text at the left, center, and right side of +the header on the page. +This parameter lets you specify the relative sizes of the +three columns. The default value is +"1 1 1".</para> + +<para>The parameter value must be three numbers, separated +by white space. The first number represents the relative +width of the inside header for +double-sided output. The second number is the relative +width of the center header. The third number is the +relative width of the outside header for +double-sided output. +</para> +<para>For single-sided output, the first number is the +relative width of left header for left-to-right +text direction, or the right header for right-to-left +text direction. +The third number is the +relative width of right header for left-to-right +text direction, or the left header for right-to-left +text direction.</para> + +<para>The numbers are used to specify the column widths +for the table that makes up the header area. +In the FO output, this looks like: +</para> + +<programlisting> +<fo:table-column column-number="1" + column-width="proportional-column-width(1)"/> +</programlisting> + +<para> +The <literal>proportional-column-width()</literal> +function computes a column width by dividing its +argument by the total of the arguments for all the columns, and +then multiplying the result by the width of the whole table +(assuming all the column specs use the function). +Its argument can be any positive integer or floating point number. +Zero is an acceptable value, although some FO processors +may warn about it, in which case using a very small number might +be more satisfactory. +</para> + +<para>For example, the value "1 2 1" means the center +header should have twice the width of the other areas. +A value of "0 0 1" means the entire header area +is reserved for the right (or outside) header text. +Note that to keep the center area centered on +the page, the left and right values must be +the same. A specification like "1 2 3" means the +center area is no longer centered on the page +since the right area is three times the width of the left area. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footer.column.widths"> +<refmeta> +<refentrytitle>footer.column.widths</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.column.widths</refname> +<refpurpose>Specify relative widths of footer areas</refpurpose> +</refnamediv> + +<refsynopsisdiv><programlisting xml:id="footer.column.widths.frag"> +<xsl:param name="footer.column.widths">1 1 1</xsl:param> +</programlisting></refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Page footers in print output use a three column table +to position text at the left, center, and right side of +the footer on the page. +This parameter lets you specify the relative sizes of the +three columns. The default value is +"1 1 1".</para> + +<para>The parameter value must be three numbers, separated +by white space. The first number represents the relative +width of the inside footer for +double-sided output. The second number is the relative +width of the center footer. The third number is the +relative width of the outside footer for +double-sided output. +</para> +<para>For single-sided output, the first number is the +relative width of left footer for left-to-right +text direction, or the right footer for right-to-left +text direction. +The third number is the +relative width of right footer for left-to-right +text direction, or the left footer for right-to-left +text direction.</para> + +<para>The numbers are used to specify the column widths +for the table that makes up the footer area. +In the FO output, this looks like: +</para> + +<programlisting> +<fo:table-column column-number="1" + column-width="proportional-column-width(1)"/> +</programlisting> + +<para> +The <literal>proportional-column-width()</literal> +function computes a column width by dividing its +argument by the total of the arguments for all the columns, and +then multiplying the result by the width of the whole table +(assuming all the column specs use the function). +Its argument can be any positive integer or floating point number. +Zero is an acceptable value, although some FO processors +may warn about it, in which case using a very small number might +be more satisfactory. +</para> + +<para>For example, the value "1 2 1" means the center +footer should have twice the width of the other areas. +A value of "0 0 1" means the entire footer area +is reserved for the right (or outside) footer text. +Note that to keep the center area centered on +the page, the left and right values must be +the same. A specification like "1 2 3" means the +center area is no longer centered on the page +since the right area is three times the width of the left area. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="header.table.properties"> +<refmeta> +<refentrytitle>header.table.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.table.properties</refname> +<refpurpose>Apply properties to the header layout table</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="header.table.properties.frag"> +<xsl:attribute-set name="header.table.properties"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + <xsl:attribute name="width">100%</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties applied to the table that lays out the page header.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="header.table.height"> +<refmeta> +<refentrytitle>header.table.height</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.table.height</refname> +<refpurpose>Specify the minimum height of the table containing the running page headers</refpurpose> +</refnamediv> + +<refsynopsisdiv><programlisting xml:id="header.table.height.frag"> +<xsl:param name="header.table.height">14pt</xsl:param> +</programlisting></refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Page headers in print output use a three column table +to position text at the left, center, and right side of +the header on the page. +This parameter lets you specify the minimum height +of the single row in the table. +Since this specifies only the minimum height, +the table should automatically grow to fit taller content. +The default value is "14pt".</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footer.table.properties"> +<refmeta> +<refentrytitle>footer.table.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.table.properties</refname> +<refpurpose>Apply properties to the footer layout table</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footer.table.properties.frag"> +<xsl:attribute-set name="footer.table.properties"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + <xsl:attribute name="width">100%</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties applied to the table that lays out the page footer.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footer.table.height"> +<refmeta> +<refentrytitle>footer.table.height</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.table.height</refname> +<refpurpose>Specify the minimum height of the table containing the running page footers</refpurpose> +</refnamediv> + +<refsynopsisdiv><programlisting xml:id="footer.table.height.frag"> +<xsl:param name="footer.table.height">14pt</xsl:param> +</programlisting></refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Page footers in print output use a three column table +to position text at the left, center, and right side of +the footer on the page. +This parameter lets you specify the minimum height +of the single row in the table. +Since this specifies only the minimum height, +the table should automatically grow to fit taller content. +The default value is "14pt".</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="header.content.properties"> +<refmeta> +<refentrytitle>header.content.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.content.properties</refname> +<refpurpose>Properties of page header content</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="header.content.properties.frag"> +<xsl:attribute-set name="header.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.fontset"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"></xsl:value-of> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties of page header content.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="footer.content.properties"> +<refmeta> +<refentrytitle>footer.content.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.content.properties</refname> +<refpurpose>Properties of page footer content</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="footer.content.properties.frag"> +<xsl:attribute-set name="footer.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.fontset"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"></xsl:value-of> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties of page footer content.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="marker.section.level"> +<refmeta> +<refentrytitle>marker.section.level</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>marker.section.level</refname> +<refpurpose>Control depth of sections shown in running headers or footers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="marker.section.level.frag"> +<xsl:param name="marker.section.level">2</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>marker.section.level</parameter> parameter +controls the depth of section levels that may be displayed +in running headers and footers. For example, if the value +is 2 (the default), then titles from <tag>sect1</tag> and +<tag>sect2</tag> or equivalent <tag>section</tag> +elements are candidates for use in running headers and +footers. +</para> +<para>Each candidate title is marked in the FO output with a +<tag><fo:marker marker-class-name="section.head.marker"></tag> +element. +</para> +<para>In order for such titles to appear in headers +or footers, the <literal>header.content</literal> +or <literal>footer.content</literal> template +must be customized to retrieve the marker using +an output element such as: +</para> +<programlisting> +<fo:retrieve-marker retrieve-class-name="section.head.marker" + retrieve-position="first-including-carryover" + retrieve-boundary="page-sequence"/> +</programlisting> + + +</refsection> +</refentry> + +</reference> +<reference xml:id="fonts"><title>Font Families</title> +<refentry version="5.0" xml:id="body.font.family"> +<refmeta> +<refentrytitle>body.font.family</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> +<refmiscinfo class="other" otherclass="value">serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">sans-serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">monospace</refmiscinfo> +</refmeta> +<refnamediv> +<refname>body.font.family</refname> +<refpurpose>The default font family for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="body.font.family.frag"> +<xsl:param name="body.font.family">serif</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The body font family is the default font used for text in the page body. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="dingbat.font.family"> +<refmeta> +<refentrytitle>dingbat.font.family</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> +<refmiscinfo class="other" otherclass="value">serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">sans-serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">monospace</refmiscinfo> +</refmeta> +<refnamediv> +<refname>dingbat.font.family</refname> +<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="dingbat.font.family.frag"> +<xsl:param name="dingbat.font.family">serif</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The dingbat font family is used for dingbats. If it is defined +as the empty string, no font change is effected around dingbats. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="monospace.font.family"> +<refmeta> +<refentrytitle>monospace.font.family</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>monospace.font.family</refname> +<refpurpose>The default font family for monospace environments</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="monospace.font.family.frag"> +<xsl:param name="monospace.font.family">monospace</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The monospace font family is used for verbatim environments +(program listings, screens, etc.). +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="sans.font.family"> +<refmeta> +<refentrytitle>sans.font.family</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>sans.font.family</refname> +<refpurpose>The default sans-serif font family</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="sans.font.family.frag"> +<xsl:param name="sans.font.family">sans-serif</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The default sans-serif font family. At the present, this isn't +actually used by the stylesheets. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="title.font.family"> +<refmeta> +<refentrytitle>title.font.family</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> +<refmiscinfo class="other" otherclass="value">serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">sans-serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">monospace</refmiscinfo> +</refmeta> +<refnamediv> +<refname>title.font.family</refname> +<refpurpose>The default font family for titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="title.font.family.frag"> +<xsl:param name="title.font.family">sans-serif</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The title font family is used for titles (chapter, section, figure, +etc.) +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="symbol.font.family"> +<refmeta> +<refentrytitle>symbol.font.family</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="list-type">open</refmiscinfo> +<refmiscinfo class="other" otherclass="value">serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">sans-serif</refmiscinfo> +<refmiscinfo class="other" otherclass="value">monospace</refmiscinfo> +</refmeta> +<refnamediv> +<refname>symbol.font.family</refname> +<refpurpose>The font families to be searched for symbols outside + of the body font</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="symbol.font.family.frag"> +<xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>A typical body or title font does not contain all +the character glyphs that DocBook supports. This parameter +specifies additional fonts that should be searched for +special characters not in the normal font. +These symbol font names are automatically appended +to the body or title font family name when fonts +are specified in a +<tag class="attribute">font-family</tag> +property in the FO output. +</para> +<para>The symbol font names should be entered as a +comma-separated list. The default value is +<literal>Symbol,ZapfDingbats</literal>. +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="propsets"><title>Property Sets</title> +<refentry version="5.0" xml:id="formal.object.properties"> +<refmeta> +<refentrytitle>formal.object.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>formal.object.properties</refname> +<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="formal.object.properties.frag"> +<xsl:attribute-set name="formal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for formal objects in docbook. Specify the spacing +before and after the object.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="formal.title.properties"> +<refmeta> +<refentrytitle>formal.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>formal.title.properties</refname> +<refpurpose>Style the title element of formal object such as a figure.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="formal.title.properties.frag"> +<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="informal.object.properties"> +<refmeta> +<refentrytitle>informal.object.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>informal.object.properties</refname> +<refpurpose>Properties associated with an informal (untitled) object, such as an informalfigure</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="informal.object.properties.frag"><xsl:attribute-set name="informal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="monospace.properties"> +<refmeta> +<refentrytitle>monospace.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>monospace.properties</refname> +<refpurpose>Properties of monospaced content</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="monospace.properties.frag"> +<xsl:attribute-set name="monospace.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$monospace.font.family"></xsl:value-of> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Specifies the font name for monospaced output. This property set +used to set the font-size as well, but that doesn't work very well +when different fonts are used (as they are in titles and paragraphs, +for example).</para> + +<para>If you want to set the font-size in a customization layer, it's +probably going to be more appropriate to set font-size-adjust, if your +formatter supports it.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="verbatim.properties"> +<refmeta> +<refentrytitle>verbatim.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>verbatim.properties</refname> +<refpurpose>Properties associated with verbatim text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="verbatim.properties.frag"> +<xsl:attribute-set name="verbatim.properties"> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> + <xsl:attribute name="white-space-collapse">false</xsl:attribute> + <xsl:attribute name="white-space-treatment">preserve</xsl:attribute> + <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> +</xsl:attribute-set></programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para>This attribute set is used on all verbatim environments.</para> +</refsection> + +</refentry> + +<refentry version="5.0" xml:id="monospace.verbatim.properties"> +<refmeta> +<refentrytitle>monospace.verbatim.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>monospace.verbatim.properties</refname> +<refpurpose>What font and size do you want for monospaced content?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="monospace.verbatim.properties.frag"> +<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> +<refsection><info><title>Description</title></info> +<para>Specify the font name and size you want for monospaced output</para> +</refsection> +</refentry> + +<refentry version="5.0" xml:id="sidebar.properties"> +<refmeta> +<refentrytitle>sidebar.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>sidebar.properties</refname> +<refpurpose>Attribute set for sidebar properties</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="sidebar.properties.frag"> +<xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="border-width">1pt</xsl:attribute> + <xsl:attribute name="border-color">black</xsl:attribute> + <xsl:attribute name="background-color">#DDDDDD</xsl:attribute> + <xsl:attribute name="padding-start">12pt</xsl:attribute> + <xsl:attribute name="padding-end">12pt</xsl:attribute> + <xsl:attribute name="padding-top">6pt</xsl:attribute> + <xsl:attribute name="padding-bottom">6pt</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}">0pt</xsl:attribute> +<!-- + <xsl:attribute name="margin-top">6pt</xsl:attribute> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> +--> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for sidebars.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="sidebar.title.properties"> +<refmeta> +<refentrytitle>sidebar.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>sidebar.title.properties</refname> +<refpurpose>Attribute set for sidebar titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="sidebar.title.properties.frag"> +<xsl:attribute-set name="sidebar.title.properties"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for sidebars titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="sidebar.float.type"> +<refmeta> +<refentrytitle>sidebar.float.type</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">none</refmiscinfo> +<refmiscinfo class="other" otherclass="value">before</refmiscinfo> +<refmiscinfo class="other" otherclass="value">left</refmiscinfo> +<refmiscinfo class="other" otherclass="value">start</refmiscinfo> +<refmiscinfo class="other" otherclass="value">right</refmiscinfo> +<refmiscinfo class="other" otherclass="value">end</refmiscinfo> +<refmiscinfo class="other" otherclass="value">inside</refmiscinfo> +<refmiscinfo class="other" otherclass="value">outside</refmiscinfo> +</refmeta> +<refnamediv> +<refname>sidebar.float.type</refname> +<refpurpose>Select type of float for sidebar elements</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="sidebar.float.type.frag"> +<xsl:param name="sidebar.float.type">none</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Selects the type of float for sidebar elements. +</para> +<itemizedlist> +<listitem> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>none</literal></quote>, then +no float is used. +</para> +</listitem> +<listitem> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>before</literal></quote>, then +the float appears at the top of the page. On some processors, +that may be the next page rather than the current page. +</para> +</listitem> + +<listitem> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>left</literal></quote>, +then a left side float is used. +</para> +</listitem> + +<listitem> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>start</literal></quote>, +then when the text direction is left-to-right a left side float is used. +When the text direction is right-to-left, a right side float is used. +</para> +</listitem> + +<listitem> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>right</literal></quote>, +then a right side float is used. +</para> +</listitem> + +<listitem> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>end</literal></quote>, +then when the text direction is left-to-right a right side float is used. +When the text direction is right-to-left, a left side float is used. +</para> +</listitem> + +<listitem> +<para>If your XSL-FO processor supports floats positioned on the +<quote><literal>inside</literal></quote> or +<quote><literal>outside</literal></quote> +of double-sided pages, then you have those two +options for side floats as well. +</para> +</listitem> +</itemizedlist> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="sidebar.float.width"> +<refmeta> +<refentrytitle>sidebar.float.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>sidebar.float.width</refname> +<refpurpose>Set the default width for sidebars</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="sidebar.float.width.frag"> +<xsl:param name="sidebar.float.width">1in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets the default width for sidebars when used as a side float. +The width determines the degree to which the sidebar block intrudes into +the text area. +</para> +<para>If <parameter>sidebar.float.type</parameter> is +<quote><literal>before</literal></quote> or +<quote><literal>none</literal></quote>, then +this parameter is ignored. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="margin.note.properties"> +<refmeta> +<refentrytitle>margin.note.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>margin.note.properties</refname> +<refpurpose>Attribute set for margin.note properties</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="margin.note.properties.frag"> +<xsl:attribute-set name="margin.note.properties"> + <xsl:attribute name="font-size">90%</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for margin notes. +By default, margin notes are not implemented for any +element. A stylesheet customization is needed to make +use of this attribute-set.</para> + +<para>You can use a template named <quote>floater</quote> +to create the customization. +That template can create side floats by specifying the +content and characteristics as template parameters. +</para> + +<para>For example:</para> +<programlisting><xsl:template match="para[@role='marginnote']"> + <xsl:call-template name="floater"> + <xsl:with-param name="position"> + <xsl:value-of select="$margin.note.float.type"/> + </xsl:with-param> + <xsl:with-param name="width"> + <xsl:value-of select="$margin.note.width"/> + </xsl:with-param> + <xsl:with-param name="content"> + <xsl:apply-imports/> + </xsl:with-param> + </xsl:call-template> +</xsl:template></programlisting> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="margin.note.title.properties"> +<refmeta> +<refentrytitle>margin.note.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>margin.note.title.properties</refname> +<refpurpose>Attribute set for margin note titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="margin.note.title.properties.frag"> +<xsl:attribute-set name="margin.note.title.properties"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for margin note titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="margin.note.float.type"> +<refmeta> +<refentrytitle>margin.note.float.type</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo> +<refmiscinfo class="other" otherclass="value">none</refmiscinfo> +<refmiscinfo class="other" otherclass="value">before</refmiscinfo> +<refmiscinfo class="other" otherclass="value">left</refmiscinfo> +<refmiscinfo class="other" otherclass="value">start</refmiscinfo> +<refmiscinfo class="other" otherclass="value">right</refmiscinfo> +<refmiscinfo class="other" otherclass="value">end</refmiscinfo> +<refmiscinfo class="other" otherclass="value">inside</refmiscinfo> +<refmiscinfo class="other" otherclass="value">outside</refmiscinfo> +</refmeta> +<refnamediv> +<refname>margin.note.float.type</refname> +<refpurpose>Select type of float for margin note customizations</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="margin.note.float.type.frag"> +<xsl:param name="margin.note.float.type">none</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Selects the type of float for margin notes. +DocBook does not define a margin note element, so this +feature must be implemented as a customization of the stylesheet. +See <parameter>margin.note.properties</parameter> for +an example. +</para> +<itemizedlist> +<listitem> +<para>If <parameter>margin.note.float.type</parameter> is +<quote><literal>none</literal></quote>, then +no float is used. +</para> +</listitem> +<listitem> +<para>If <parameter>margin.note.float.type</parameter> is +<quote><literal>before</literal></quote>, then +the float appears at the top of the page. On some processors, +that may be the next page rather than the current page. +</para> +</listitem> +<listitem> +<para>If <parameter>margin.note.float.type</parameter> is +<quote><literal>left</literal></quote> or +<quote><literal>start</literal></quote>, then +a left side float is used. +</para> +</listitem> +<listitem> +<para>If <parameter>margin.note.float.type</parameter> is +<quote><literal>right</literal></quote> or +<quote><literal>end</literal></quote>, then +a right side float is used. +</para> +</listitem> +<listitem> +<para>If your XSL-FO processor supports floats positioned on the +<quote><literal>inside</literal></quote> or +<quote><literal>outside</literal></quote> +of double-sided pages, then you have those two +options for side floats as well. +</para> +</listitem> +</itemizedlist> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="margin.note.width"> +<refmeta> +<refentrytitle>margin.note.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>margin.note.width</refname> +<refpurpose>Set the default width for margin notes</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="margin.note.width.frag"> +<xsl:param name="margin.note.width">1in</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets the default width for margin notes when used as a side +float. The width determines the degree to which the margin note block +intrudes into the text area. +</para> +<para>If <parameter>margin.note.float.type</parameter> is +<quote><literal>before</literal></quote> or +<quote><literal>none</literal></quote>, then +this parameter is ignored. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="component.title.properties"> +<refmeta> +<refentrytitle>component.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>component.title.properties</refname> +<refpurpose>Properties for component titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="component.title.properties.frag"> +<xsl:attribute-set name="component.title.properties"> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt * 0.8')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt * 1.2')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align"> + <xsl:choose> + <xsl:when test="((parent::article | parent::articleinfo | parent::info/parent::article) and not(ancestor::book) and not(self::bibliography)) or (parent::slides | parent::slidesinfo)">center</xsl:when> + <xsl:otherwise>start</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"></xsl:value-of></xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties common to all component titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="component.titlepage.properties"> +<refmeta> +<refentrytitle>component.titlepage.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>component.titlepage.properties</refname> +<refpurpose>Properties for component titlepages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="component.titlepage.properties.frag"> +<xsl:attribute-set name="component.titlepage.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that are applied to the outer block containing +all the component title page information. +Its main use is to set a <literal>span="all"</literal> +property on the block that is a direct child of the flow.</para> + +<para>This attribute-set also applies to index titlepages. It is empty by default.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.title.properties"> +<refmeta> +<refentrytitle>section.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.properties</refname> +<refpurpose>Properties for section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.properties.frag"> +<xsl:attribute-set name="section.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by section.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"></xsl:value-of></xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties common to all section titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.title.level1.properties"> +<refmeta> +<refentrytitle>section.title.level1.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.level1.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.level1.properties.frag"> +<xsl:attribute-set name="section.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-1 section titles.</para> + +</refsection> +</refentry> + + +<refentry version="5.0" xml:id="section.title.level2.properties"> +<refmeta> +<refentrytitle>section.title.level2.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.level2.properties</refname> +<refpurpose>Properties for level-2 section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.level2.properties.frag"> +<xsl:attribute-set name="section.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-2 section titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.title.level3.properties"> +<refmeta> +<refentrytitle>section.title.level3.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.level3.properties</refname> +<refpurpose>Properties for level-3 section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.level3.properties.frag"> +<xsl:attribute-set name="section.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-3 section titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.title.level4.properties"> +<refmeta> +<refentrytitle>section.title.level4.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.level4.properties</refname> +<refpurpose>Properties for level-4 section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.level4.properties.frag"> +<xsl:attribute-set name="section.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-4 section titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.title.level5.properties"> +<refmeta> +<refentrytitle>section.title.level5.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.level5.properties</refname> +<refpurpose>Properties for level-5 section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.level5.properties.frag"> +<xsl:attribute-set name="section.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-5 section titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.title.level6.properties"> +<refmeta> +<refentrytitle>section.title.level6.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.title.level6.properties</refname> +<refpurpose>Properties for level-6 section titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.title.level6.properties.frag"> +<xsl:attribute-set name="section.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-6 section titles. This property set is actually +used for all titles below level 5.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.properties"> +<refmeta> +<refentrytitle>section.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.properties</refname> +<refpurpose>Properties for all section levels</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.properties.frag"> +<xsl:attribute-set name="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of all section levels, and therefore apply to +the whole section. +This attribute set is inherited by the +more specific attribute sets such as +<tag>section.level1.properties</tag>. +The default is empty. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.level1.properties"> +<refmeta> +<refentrytitle>section.level1.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.level1.properties</refname> +<refpurpose>Properties for level-1 sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.level1.properties.frag"> +<xsl:attribute-set name="section.level1.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of a level-1 section, and therefore apply to +the whole section. This includes <tag>sect1</tag> +elements and <tag>section</tag> elements at level 1. +</para> + +<para>For example, you could start each level-1 section on +a new page by using:</para> +<programlisting><xsl:attribute-set name="section.level1.properties"> + <xsl:attribute name="break-before">page</xsl:attribute> +</xsl:attribute-set> +</programlisting> + +<para>This attribute set inherits attributes from the +general <tag>section.properties</tag> attribute set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.level2.properties"> +<refmeta> +<refentrytitle>section.level2.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.level2.properties</refname> +<refpurpose>Properties for level-2 sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.level2.properties.frag"> +<xsl:attribute-set name="section.level2.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of a level-2 section, and therefore apply to +the whole section. This includes <tag>sect2</tag> +elements and <tag>section</tag> elements at level 2. +</para> + +<para>For example, you could start each level-2 section on +a new page by using:</para> +<programlisting><xsl:attribute-set name="section.level2.properties"> + <xsl:attribute name="break-before">page</xsl:attribute> +</xsl:attribute-set> +</programlisting> + +<para>This attribute set inherits attributes from the +general <tag>section.properties</tag> attribute set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.level3.properties"> +<refmeta> +<refentrytitle>section.level3.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.level3.properties</refname> +<refpurpose>Properties for level-3 sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.level3.properties.frag"> +<xsl:attribute-set name="section.level3.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of a level-3 section, and therefore apply to +the whole section. This includes <tag>sect3</tag> +elements and <tag>section</tag> elements at level 3. +</para> + +<para>For example, you could start each level-3 section on +a new page by using:</para> +<programlisting><xsl:attribute-set name="section.level3.properties"> + <xsl:attribute name="break-before">page</xsl:attribute> +</xsl:attribute-set> +</programlisting> + +<para>This attribute set inherits attributes from the +general <tag>section.properties</tag> attribute set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.level4.properties"> +<refmeta> +<refentrytitle>section.level4.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.level4.properties</refname> +<refpurpose>Properties for level-4 sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.level4.properties.frag"> +<xsl:attribute-set name="section.level4.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of a level-4 section, and therefore apply to +the whole section. This includes <tag>sect4</tag> +elements and <tag>section</tag> elements at level 4. +</para> + +<para>For example, you could start each level-4 section on +a new page by using:</para> +<programlisting><xsl:attribute-set name="section.level4.properties"> + <xsl:attribute name="break-before">page</xsl:attribute> +</xsl:attribute-set> +</programlisting> + +<para>This attribute set inherits attributes from the +general <tag>section.properties</tag> attribute set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.level5.properties"> +<refmeta> +<refentrytitle>section.level5.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.level5.properties</refname> +<refpurpose>Properties for level-5 sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.level5.properties.frag"> +<xsl:attribute-set name="section.level5.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of a level-5 section, and therefore apply to +the whole section. This includes <tag>sect5</tag> +elements and <tag>section</tag> elements at level 5. +</para> + +<para>For example, you could start each level-5 section on +a new page by using:</para> +<programlisting><xsl:attribute-set name="section.level5.properties"> + <xsl:attribute name="break-before">page</xsl:attribute> +</xsl:attribute-set> +</programlisting> + +<para>This attribute set inherits attributes from the +general <tag>section.properties</tag> attribute set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="section.level6.properties"> +<refmeta> +<refentrytitle>section.level6.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>section.level6.properties</refname> +<refpurpose>Properties for level-6 sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="section.level6.properties.frag"> +<xsl:attribute-set name="section.level6.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties that apply to the containing +block of a level 6 or lower section, and therefore apply to +the whole section. This includes +<tag>section</tag> elements at level 6 and lower. +</para> + +<para>For example, you could start each level-6 section on +a new page by using:</para> +<programlisting><xsl:attribute-set name="section.level6.properties"> + <xsl:attribute name="break-before">page</xsl:attribute> +</xsl:attribute-set> +</programlisting> + +<para>This attribute set inherits attributes from the +general <tag>section.properties</tag> attribute set. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="figure.properties"> +<refmeta> +<refentrytitle>figure.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>figure.properties</refname> +<refpurpose>Properties associated with a figure</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="figure.properties.frag"> +<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for figures.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="example.properties"> +<refmeta> +<refentrytitle>example.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>example.properties</refname> +<refpurpose>Properties associated with a example</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="example.properties.frag"> +<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for examples.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="equation.properties"> +<refmeta> +<refentrytitle>equation.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>equation.properties</refname> +<refpurpose>Properties associated with a equation</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="equation.properties.frag"> +<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for equations.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="table.properties"> +<refmeta> +<refentrytitle>table.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>table.properties</refname> +<refpurpose>Properties associated with the block surrounding a table</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="table.properties.frag"> +<xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="keep-together.within-column">auto</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Block styling properties for tables. This parameter should really +have been called <literal>table.block.properties</literal> or something +like that, but we’re leaving it to avoid backwards-compatibility +problems.</para> + +<para>See also <parameter>table.table.properties</parameter>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="informalfigure.properties"> +<refmeta> +<refentrytitle>informalfigure.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>informalfigure.properties</refname> +<refpurpose>Properties associated with an informalfigure</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="informalfigure.properties.frag"> +<xsl:attribute-set name="informalfigure.properties" use-attribute-sets="informal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for informalfigures.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="informalexample.properties"> +<refmeta> +<refentrytitle>informalexample.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>informalexample.properties</refname> +<refpurpose>Properties associated with an informalexample</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="informalexample.properties.frag"> +<xsl:attribute-set name="informalexample.properties" use-attribute-sets="informal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for informalexamples.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="informalequation.properties"> +<refmeta> +<refentrytitle>informalequation.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>informalequation.properties</refname> +<refpurpose>Properties associated with an informalequation</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="informalequation.properties.frag"> +<xsl:attribute-set name="informalequation.properties" use-attribute-sets="informal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for informalequations.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="informaltable.properties"> +<refmeta> +<refentrytitle>informaltable.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>informaltable.properties</refname> +<refpurpose>Properties associated with the block surrounding an informaltable</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="informaltable.properties.frag"> +<xsl:attribute-set name="informaltable.properties" use-attribute-sets="informal.object.properties"></xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Block styling properties for informaltables. This parameter should really +have been called <literal>informaltable.block.properties</literal> or something +like that, but we’re leaving it to avoid backwards-compatibility +problems.</para> + +<para>See also <parameter>table.table.properties</parameter>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="procedure.properties"> +<refmeta> +<refentrytitle>procedure.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>procedure.properties</refname> +<refpurpose>Properties associated with a procedure</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="procedure.properties.frag"> +<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="keep-together.within-column">auto</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The styling for procedures.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="root.properties"> +<refmeta> +<refentrytitle>root.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>root.properties</refname> +<refpurpose>The properties of the fo:root element</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="root.properties.frag"> +<xsl:attribute-set name="root.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.fontset"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.size"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="text-align"> + <xsl:value-of select="$alignment"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="line-height"> + <xsl:value-of select="$line-height"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="font-selection-strategy">character-by-character</xsl:attribute> + <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute> + <xsl:attribute name="writing-mode"> + <xsl:value-of select="$direction.mode"></xsl:value-of> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This property set is used on the <tag>fo:root</tag> element of +an FO file. It defines a set of default, global parameters.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.properties"> +<refmeta> +<refentrytitle>qanda.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.properties</refname> +<refpurpose>Properties for qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.properties.frag"> +<xsl:attribute-set name="qanda.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"></xsl:value-of> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by qanda.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties common to all qanda set titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.level1.properties"> +<refmeta> +<refentrytitle>qanda.title.level1.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.level1.properties</refname> +<refpurpose>Properties for level-1 qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.level1.properties.frag"> +<xsl:attribute-set name="qanda.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-1 qanda set titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.level2.properties"> +<refmeta> +<refentrytitle>qanda.title.level2.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.level2.properties</refname> +<refpurpose>Properties for level-2 qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.level2.properties.frag"> +<xsl:attribute-set name="qanda.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-2 qanda set titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.level3.properties"> +<refmeta> +<refentrytitle>qanda.title.level3.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.level3.properties</refname> +<refpurpose>Properties for level-3 qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.level3.properties.frag"> +<xsl:attribute-set name="qanda.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-3 qanda set titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.level4.properties"> +<refmeta> +<refentrytitle>qanda.title.level4.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.level4.properties</refname> +<refpurpose>Properties for level-4 qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.level4.properties.frag"> +<xsl:attribute-set name="qanda.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-4 qanda set titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.level5.properties"> +<refmeta> +<refentrytitle>qanda.title.level5.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.level5.properties</refname> +<refpurpose>Properties for level-5 qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.level5.properties.frag"> +<xsl:attribute-set name="qanda.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-5 qanda set titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="qanda.title.level6.properties"> +<refmeta> +<refentrytitle>qanda.title.level6.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>qanda.title.level6.properties</refname> +<refpurpose>Properties for level-6 qanda set titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="qanda.title.level6.properties.frag"> +<xsl:attribute-set name="qanda.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"></xsl:value-of> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties of level-6 qanda set titles. +This property set is actually +used for all titles below level 5.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="article.appendix.title.properties"> +<refmeta> +<refentrytitle>article.appendix.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>article.appendix.title.properties</refname> +<refpurpose>Properties for appendix titles that appear in an article</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="article.appendix.title.properties.frag"> +<xsl:attribute-set name="article.appendix.title.properties" use-attribute-sets="section.title.properties section.title.level1.properties"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$title.margin.left"></xsl:value-of> + </xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties for the title of an appendix that +appears inside an article. The default is to use +the properties of sect1 titles.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="abstract.properties"> +<refmeta> +<refentrytitle>abstract.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>abstract.properties</refname> +<refpurpose>Properties associated with the block surrounding an abstract</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="abstract.properties.frag"> +<xsl:attribute-set name="abstract.properties"> + <xsl:attribute name="start-indent">0.0in</xsl:attribute> + <xsl:attribute name="end-indent">0.0in</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Block styling properties for abstract.</para> + +<para>See also <parameter>abstract.title.properties</parameter>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="abstract.title.properties"> +<refmeta> +<refentrytitle>abstract.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>abstract.title.properties</refname> +<refpurpose>Properties for abstract titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="abstract.title.properties.frag"> +<xsl:attribute-set name="abstract.title.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"></xsl:value-of></xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt * 0.8')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt * 1.2')"></xsl:value-of></xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align">center</xsl:attribute> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The properties for abstract titles.</para> + +<para>See also <parameter>abstract.properties</parameter>.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="index.page.number.properties"> +<refmeta> +<refentrytitle>index.page.number.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>index.page.number.properties</refname> +<refpurpose>Properties associated with index page numbers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="index.page.number.properties.frag"> +<xsl:attribute-set name="index.page.number.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Properties associated with page numbers in indexes. +Changing color to indicate the page number is a link is +one possibility. +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="revhistory.table.properties"> +<refmeta> +<refentrytitle>revhistory.table.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>revhistory.table.properties</refname> +<refpurpose>The properties of table used for formatting revhistory</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="revhistory.table.properties.frag"> +<xsl:attribute-set name="revhistory.table.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This property set defines appearance of revhistory table.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="revhistory.table.cell.properties"> +<refmeta> +<refentrytitle>revhistory.table.cell.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>revhistory.table.cell.properties</refname> +<refpurpose>The properties of table cells used for formatting revhistory</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="revhistory.table.cell.properties.frag"> +<xsl:attribute-set name="revhistory.table.cell.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This property set defines appearance of individual cells in revhistory table.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="revhistory.title.properties"> +<refmeta> +<refentrytitle>revhistory.title.properties</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>revhistory.title.properties</refname> +<refpurpose>The properties of revhistory title</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="revhistory.title.properties.frag"> +<xsl:attribute-set name="revhistory.title.properties"> +</xsl:attribute-set> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This property set defines appearance of revhistory title.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="profiling"><title>Profiling</title> +<partintro xml:id="profiling_partintro"> +<para>The following parameters can be used for attribute-based +profiling of your document. For more information about profiling, see +<link xmlns:xlink="http://www.w3.org/1999/xlink" role="tcg" xlink:href="Profiling.html">Profiling (conditional text)</link>.</para> +</partintro> +<refentry version="5.0" xml:id="profile.arch"> +<refmeta> +<refentrytitle>profile.arch</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.arch</refname> +<refpurpose>Target profile for <tag class="attribute">arch</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.arch.frag"> +<xsl:param name="profile.arch"></xsl:param> +</programlisting> +</refsynopsisdiv> + + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.audience"> +<refmeta> +<refentrytitle>profile.audience</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.audience</refname> +<refpurpose>Target profile for <tag class="attribute">audience</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.audience.frag"> +<xsl:param name="profile.audience"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.condition"> +<refmeta> +<refentrytitle>profile.condition</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.condition</refname> +<refpurpose>Target profile for <tag class="attribute">condition</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.condition.frag"> +<xsl:param name="profile.condition"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.conformance"> +<refmeta> +<refentrytitle>profile.conformance</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.conformance</refname> +<refpurpose>Target profile for <tag class="attribute">conformance</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.conformance.frag"> +<xsl:param name="profile.conformance"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.lang"> +<refmeta> +<refentrytitle>profile.lang</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.lang</refname> +<refpurpose>Target profile for <tag class="attribute">lang</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.lang.frag"> +<xsl:param name="profile.lang"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.os"> +<refmeta> +<refentrytitle>profile.os</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.os</refname> +<refpurpose>Target profile for <tag class="attribute">os</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.os.frag"> +<xsl:param name="profile.os"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.revision"> +<refmeta> +<refentrytitle>profile.revision</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.revision</refname> +<refpurpose>Target profile for <tag class="attribute">revision</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.revision.frag"> +<xsl:param name="profile.revision"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.revisionflag"> +<refmeta> +<refentrytitle>profile.revisionflag</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.revisionflag</refname> +<refpurpose>Target profile for <tag class="attribute">revisionflag</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.revisionflag.frag"> +<xsl:param name="profile.revisionflag"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.role"> +<refmeta> +<refentrytitle>profile.role</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.role</refname> +<refpurpose>Target profile for <tag class="attribute">role</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.role.frag"> +<xsl:param name="profile.role"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +<warning> +<para>Note that <tag class="attribute">role</tag> is often +used for other purposes than profiling. For example it is commonly +used to get emphasize in bold font:</para> + +<programlisting><emphasis role="bold">very important</emphasis></programlisting> + +<para>If you are using <tag class="attribute">role</tag> for +these purposes do not forget to add values like <literal>bold</literal> to +value of this parameter. If you forgot you will get document with +small pieces missing which are very hard to track.</para> + +<para>For this reason it is not recommended to use <tag class="attribute">role</tag> attribute for profiling. You should +rather use profiling specific attributes like <tag class="attribute">userlevel</tag>, <tag class="attribute">os</tag>, <tag class="attribute">arch</tag>, <tag class="attribute">condition</tag>, etc.</para> +</warning> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.security"> +<refmeta> +<refentrytitle>profile.security</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.security</refname> +<refpurpose>Target profile for <tag class="attribute">security</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.security.frag"> +<xsl:param name="profile.security"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.status"> +<refmeta> +<refentrytitle>profile.status</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.status</refname> +<refpurpose>Target profile for <tag class="attribute">status</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.status.frag"> +<xsl:param name="profile.status"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.userlevel"> +<refmeta> +<refentrytitle>profile.userlevel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.userlevel</refname> +<refpurpose>Target profile for <tag class="attribute">userlevel</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.userlevel.frag"> +<xsl:param name="profile.userlevel"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.vendor"> +<refmeta> +<refentrytitle>profile.vendor</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.vendor</refname> +<refpurpose>Target profile for <tag class="attribute">vendor</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.vendor.frag"> +<xsl:param name="profile.vendor"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.wordsize"> +<refmeta> +<refentrytitle>profile.wordsize</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.wordsize</refname> +<refpurpose>Target profile for <tag class="attribute">wordsize</tag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.wordsize.frag"> +<xsl:param name="profile.wordsize"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.attribute"> +<refmeta> +<refentrytitle>profile.attribute</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.attribute</refname> +<refpurpose>Name of user-specified profiling attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.attribute.frag"> +<xsl:param name="profile.attribute"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>This parameter is used in conjuction with +<parameter>profile.value</parameter>.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.value"> +<refmeta> +<refentrytitle>profile.value</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.value</refname> +<refpurpose>Target profile for user-specified attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.value.frag"> +<xsl:param name="profile.value"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>When you are using this parameter you must also specify name of +profiling attribute with parameter +<parameter>profile.attribute</parameter>.</para> + +<para>The value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="profile.separator"> +<refmeta> +<refentrytitle>profile.separator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.separator</refname> +<refpurpose>Separator character for compound profile values</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="profile.separator.frag"> +<xsl:param name="profile.separator">;</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Separator character used for compound profile values. See <parameter>profile.arch</parameter></para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="l10n"><title>Localization</title> +<refentry version="5.0" xml:id="l10n.gentext.language"> +<refmeta> +<refentrytitle>l10n.gentext.language</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.language</refname> +<refpurpose>Sets the gentext language</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="l10n.gentext.language.frag"> +<xsl:param name="l10n.gentext.language"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If this parameter is set to any value other than the empty string, its +value will be used as the value for the language when generating text. Setting +<parameter>l10n.gentext.language</parameter> overrides any settings within the +document being formatted.</para> + +<para>It's much more likely that you might want to set the +<parameter>l10n.gentext.default.language</parameter> parameter.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="l10n.gentext.default.language"> + <refmeta> + <refentrytitle>l10n.gentext.default.language</refentrytitle> + <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> + </refmeta> + <refnamediv> + <refname>l10n.gentext.default.language</refname> + <refpurpose>Sets the default language for generated text</refpurpose> + </refnamediv> + + <refsynopsisdiv> +<programlisting xml:id="l10n.gentext.default.language.frag"> +<xsl:param name="l10n.gentext.default.language">en</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The value of the <parameter>l10n.gentext.default.language</parameter> +parameter is used as the language for generated text if no setting is provided +in the source document.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="l10n.gentext.use.xref.language"> +<refmeta> +<refentrytitle>l10n.gentext.use.xref.language</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.use.xref.language</refname> +<refpurpose>Use the language of target when generating cross-reference text?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="l10n.gentext.use.xref.language.frag"> +<xsl:param name="l10n.gentext.use.xref.language" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, the language of the target will be used when +generating cross reference text. Usually, the <quote>current</quote> +language is used when generating text (that is, the language of the +element that contains the cross-reference element). But setting this parameter +allows the language of the element <emphasis>pointed to</emphasis> to control +the generated text.</para> + +<para>Consider the following example:</para> + +<informalexample> +<programlisting><para lang="en">See also <xref linkend="chap3"/>.</para> +</programlisting> +</informalexample> + +<para>Suppose that Chapter 3 happens to be written in German. +If <parameter>l10n.gentext.use.xref.language</parameter> is non-zero, the +resulting text will be something like this:</para> + +<blockquote> +<para>See also Kapital 3.</para> +</blockquote> + +<para>Where the more traditional rendering would be:</para> + +<blockquote> +<para>See also Chapter 3.</para> +</blockquote> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="l10n.lang.value.rfc.compliant"> +<refmeta> +<refentrytitle>l10n.lang.value.rfc.compliant</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.lang.value.rfc.compliant</refname> +<refpurpose>Make value of lang attribute RFC compliant?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="l10n.lang.value.rfc.compliant.frag"> +<xsl:param name="l10n.lang.value.rfc.compliant" select="1"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, ensure that the values for all <tag class="attribute">lang</tag> attributes in HTML output are RFC +compliant<footnote><para>Section 8.1.1, <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/REC-html40/struct/dirlang.html#h-8.1.1">Language Codes</link>, in the HTML 4.0 Recommendation states that: + +<blockquote><para>[RFC1766] defines and explains the language codes +that must be used in HTML documents.</para> +<para>Briefly, language codes consist of a primary code and a possibly +empty series of subcodes: + +<literallayout class="monospaced">language-code = primary-code ( "-" subcode )*</literallayout> +</para> +<para>And in RFC 1766, <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.ietf.org/rfc/rfc1766.txt">Tags for the Identification +of Languages</link>, the EBNF for "language tag" is given as: + +<literallayout class="monospaced">Language-Tag = Primary-tag *( "-" Subtag ) +Primary-tag = 1*8ALPHA +Subtag = 1*8ALPHA</literallayout> +</para> +</blockquote> +</para></footnote>. + +by taking any underscore characters in any <tag class="attribute">lang</tag> values found in source documents, and +replacing them with hyphen characters in output HTML files. For +example, <literal>zh_CN</literal> in a source document becomes +<literal>zh-CN</literal> in the HTML output form that source. + +<note> +<para>This parameter does not cause any case change in <tag class="attribute">lang</tag> values, because RFC 1766 +explicitly states that all "language tags" (as it calls them) "are +to be treated as case insensitive".</para> +</note> +</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="writing.mode"> +<refmeta> +<refentrytitle>writing.mode</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>writing.mode</refname> +<refpurpose>Direction of text flow based on locale</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="writing.mode.frag"> +<xsl:param name="writing.mode"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">writing-mode</xsl:with-param> + <xsl:with-param name="lang"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="target" select="/*[1]"></xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Sets direction of text flow and text alignment based on locale. +The value is normally taken from the gentext file for the +lang attribute of the document's root element, using the +key name 'writing-mode' to look it up in the gentext file. +But the param can also be +set on the command line to override that gentext value. +</para> +<para>Accepted values are: +<variablelist> + <varlistentry> + <term>lr-tb</term> + <listitem> + <para>Left-to-right text flow in each line, lines stack top to bottom.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>rl-tb</term> + <listitem> + <para>Right-to-left text flow in each line, lines stack top to bottom.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>tb-rl</term> + <listitem> + <para>Top-to-bottom text flow in each vertical line, lines stack right to left. + Supported by only a few XSL-FO processors. Not supported in HTML output.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>lr</term> + <listitem> + <para>Shorthand for lr-tb.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>rl</term> + <listitem> + <para>Shorthand for rl-tb.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>tb</term> + <listitem> + <para>Shorthand for tb-rl.</para> + </listitem> + </varlistentry> +</variablelist> +</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="ebnf"><title>EBNF</title> +<refentry version="5.0" xml:id="ebnf.assignment"> +<refmeta> +<refentrytitle>ebnf.assignment</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">rtf</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ebnf.assignment</refname> +<refpurpose>The EBNF production assignment operator</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ebnf.assignment.frag"> + +<xsl:param name="ebnf.assignment"> + <fo:inline font-family="{$monospace.font.family}"> + <xsl:text>::=</xsl:text> + </fo:inline> +</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>ebnf.assignment</parameter> parameter determines what +text is used to show <quote>assignment</quote> in <tag>production</tag>s +in <tag>productionset</tag>s.</para> + +<para>While <quote><literal>::=</literal></quote> is common, so are several +other operators.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="ebnf.statement.terminator"> +<refmeta> +<refentrytitle>ebnf.statement.terminator</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">rtf</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ebnf.statement.terminator</refname> +<refpurpose>Punctuation that ends an EBNF statement.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="ebnf.statement.terminator.frag"> + +<xsl:param name="ebnf.statement.terminator"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>The <parameter>ebnf.statement.terminator</parameter> parameter determines what +text is used to terminate each <tag>production</tag> +in <tag>productionset</tag>.</para> + +<para>Some notations end each statement with a period.</para> + +</refsection> +</refentry> + +</reference> +<reference xml:id="prepress"><title>Prepress</title> +<refentry version="5.0" xml:id="crop.marks"> +<refmeta> +<refentrytitle>crop.marks</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>crop.marks</refname> +<refpurpose>Output crop marks?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="crop.marks.frag"> +<xsl:param name="crop.marks" select="0"></xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>If non-zero, crop marks will be added to each page. Currently this +works only with XEP if you have <parameter>xep.extensions</parameter> set.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="crop.mark.width"> +<refmeta> +<refentrytitle>crop.mark.width</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>crop.mark.width</refname> +<refpurpose>Width of crop marks.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="crop.mark.width.frag"> +<xsl:param name="crop.mark.width">0.5pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Width of crop marks. Crop marks are controlled by +<parameter>crop.marks</parameter> parameter.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="crop.mark.offset"> +<refmeta> +<refentrytitle>crop.mark.offset</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>crop.mark.offset</refname> +<refpurpose>Length of crop marks.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="crop.mark.offset.frag"> +<xsl:param name="crop.mark.offset">24pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Length of crop marks. Crop marks are controlled by +<parameter>crop.marks</parameter> parameter.</para> + +</refsection> +</refentry> + +<refentry version="5.0" xml:id="crop.mark.bleed"> +<refmeta> +<refentrytitle>crop.mark.bleed</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo> +</refmeta> +<refnamediv> +<refname>crop.mark.bleed</refname> +<refpurpose>Length of invisible part of crop marks.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<programlisting xml:id="crop.mark.bleed.frag"> +<xsl:param name="crop.mark.bleed">6pt</xsl:param> +</programlisting> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>Length of invisible part of crop marks. Crop marks are controlled by +<parameter>crop.marks</parameter> parameter.</para> + +</refsection> +</refentry> + +</reference> + +<appendix xml:id="stylesheet"><title>The Stylesheet</title> + +<para>The <filename>param.xsl</filename> stylesheet is just a wrapper +around all these parameters.</para> + +<programlisting xml:id="top"> +<xsl:stylesheet exclude-result-prefixes="src" version="1.0"> + +<!-- This file is generated from param.xweb --> + +<!-- ******************************************************************** + $Id: param.xweb 8392 2009-04-01 08:47:55Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<src:fragref linkend="abstract.properties.frag"></src:fragref> +<src:fragref linkend="abstract.title.properties.frag"></src:fragref> +<src:fragref linkend="admon.graphics.extension.frag"></src:fragref> +<src:fragref linkend="admon.graphics.frag"></src:fragref> +<src:fragref linkend="admon.graphics.path.frag"></src:fragref> +<src:fragref linkend="admon.textlabel.frag"></src:fragref> +<src:fragref linkend="admonition.properties.frag"></src:fragref> +<src:fragref linkend="admonition.title.properties.frag"></src:fragref> +<src:fragref linkend="graphical.admonition.properties.frag"></src:fragref> +<src:fragref linkend="nongraphical.admonition.properties.frag"></src:fragref> +<src:fragref linkend="alignment.frag"></src:fragref> +<src:fragref linkend="appendix.autolabel.frag"></src:fragref> +<src:fragref linkend="arbortext.extensions.frag"></src:fragref> +<src:fragref linkend="article.appendix.title.properties.frag"></src:fragref> +<src:fragref linkend="author.othername.in.middle.frag"></src:fragref> +<src:fragref linkend="autotoc.label.separator.frag"></src:fragref> +<src:fragref linkend="axf.extensions.frag"></src:fragref> +<src:fragref linkend="biblioentry.item.separator.frag"></src:fragref> +<src:fragref linkend="biblioentry.properties.frag"></src:fragref> +<src:fragref linkend="bibliography.collection.frag"></src:fragref> +<src:fragref linkend="bibliography.numbered.frag"></src:fragref> +<src:fragref linkend="bibliography.style.frag"></src:fragref> +<src:fragref linkend="blockquote.properties.frag"></src:fragref> +<src:fragref linkend="body.font.family.frag"></src:fragref> +<src:fragref linkend="body.font.master.frag"></src:fragref> +<src:fragref linkend="body.font.size.frag"></src:fragref> +<src:fragref linkend="body.margin.bottom.frag"></src:fragref> +<src:fragref linkend="body.margin.top.frag"></src:fragref> +<src:fragref linkend="body.start.indent.frag"></src:fragref> +<src:fragref linkend="body.end.indent.frag"></src:fragref> +<src:fragref linkend="bookmarks.collapse.frag"></src:fragref> +<src:fragref linkend="bridgehead.in.toc.frag"></src:fragref> +<src:fragref linkend="callout.defaultcolumn.frag"></src:fragref> +<src:fragref linkend="callout.graphics.extension.frag"></src:fragref> +<src:fragref linkend="callout.graphics.frag"></src:fragref> +<src:fragref linkend="callout.icon.size.frag"></src:fragref> +<src:fragref linkend="callout.graphics.number.limit.frag"></src:fragref> +<src:fragref linkend="callout.graphics.path.frag"></src:fragref> +<src:fragref linkend="callout.unicode.font.frag"></src:fragref> +<src:fragref linkend="callout.unicode.frag"></src:fragref> +<src:fragref linkend="callout.unicode.number.limit.frag"></src:fragref> +<src:fragref linkend="callout.unicode.start.character.frag"></src:fragref> +<src:fragref linkend="callouts.extension.frag"></src:fragref> +<src:fragref linkend="chapter.autolabel.frag"></src:fragref> +<src:fragref linkend="collect.xref.targets.frag"></src:fragref> +<src:fragref linkend="column.count.back.frag"></src:fragref> +<src:fragref linkend="column.count.body.frag"></src:fragref> +<src:fragref linkend="column.count.front.frag"></src:fragref> +<src:fragref linkend="column.count.index.frag"></src:fragref> +<src:fragref linkend="column.count.lot.frag"></src:fragref> +<src:fragref linkend="column.count.titlepage.frag"></src:fragref> +<src:fragref linkend="column.gap.back.frag"></src:fragref> +<src:fragref linkend="column.gap.body.frag"></src:fragref> +<src:fragref linkend="column.gap.front.frag"></src:fragref> +<src:fragref linkend="column.gap.index.frag"></src:fragref> +<src:fragref linkend="column.gap.lot.frag"></src:fragref> +<src:fragref linkend="column.gap.titlepage.frag"></src:fragref> +<src:fragref linkend="compact.list.item.spacing.frag"></src:fragref> +<src:fragref linkend="component.label.includes.part.label.frag"></src:fragref> +<src:fragref linkend="component.title.properties.frag"></src:fragref> +<src:fragref linkend="component.titlepage.properties.frag"></src:fragref> +<src:fragref linkend="crop.marks.frag"></src:fragref> +<src:fragref linkend="crop.mark.width.frag"></src:fragref> +<src:fragref linkend="crop.mark.offset.frag"></src:fragref> +<src:fragref linkend="crop.mark.bleed.frag"></src:fragref> +<src:fragref linkend="current.docid.frag"></src:fragref> +<src:fragref linkend="default.float.class.frag"></src:fragref> +<src:fragref linkend="default.image.width.frag"></src:fragref> +<src:fragref linkend="default.table.width.frag"></src:fragref> +<src:fragref linkend="default.table.frame.frag"></src:fragref> +<src:fragref linkend="default.table.rules.frag"></src:fragref> +<src:fragref linkend="default.units.frag"></src:fragref> +<src:fragref linkend="dingbat.font.family.frag"></src:fragref> +<src:fragref linkend="double.sided.frag"></src:fragref> +<src:fragref linkend="draft.mode.frag"></src:fragref> +<src:fragref linkend="draft.watermark.image.frag"></src:fragref> +<src:fragref linkend="ebnf.assignment.frag"></src:fragref> +<src:fragref linkend="ebnf.statement.terminator.frag"></src:fragref> +<src:fragref linkend="email.delimiters.enabled.frag"></src:fragref> +<src:fragref linkend="email.mailto.enabled.frag"></src:fragref> +<src:fragref linkend="equation.properties.frag"></src:fragref> +<src:fragref linkend="example.properties.frag"></src:fragref> +<src:fragref linkend="exsl.node.set.available.frag"></src:fragref> +<src:fragref linkend="figure.properties.frag"></src:fragref> +<src:fragref linkend="firstterm.only.link.frag"></src:fragref> +<src:fragref linkend="footer.content.properties.frag"></src:fragref> +<src:fragref linkend="footer.rule.frag"></src:fragref> +<src:fragref linkend="footer.column.widths.frag"></src:fragref> +<src:fragref linkend="footer.table.height.frag"></src:fragref> +<src:fragref linkend="footer.table.properties.frag"></src:fragref> +<src:fragref linkend="footers.on.blank.pages.frag"></src:fragref> +<src:fragref linkend="footnote.font.size.frag"></src:fragref> +<src:fragref linkend="footnote.number.format.frag"></src:fragref> +<src:fragref linkend="footnote.number.symbols.frag"></src:fragref> +<src:fragref linkend="footnote.mark.properties.frag"></src:fragref> +<src:fragref linkend="footnote.properties.frag"></src:fragref> +<src:fragref linkend="footnote.sep.leader.properties.frag"></src:fragref> +<src:fragref linkend="fop.extensions.frag"></src:fragref> +<src:fragref linkend="fop1.extensions.frag"></src:fragref> +<src:fragref linkend="formal.object.properties.frag"></src:fragref> +<src:fragref linkend="formal.procedures.frag"></src:fragref> +<src:fragref linkend="formal.title.placement.frag"></src:fragref> +<src:fragref linkend="formal.title.properties.frag"></src:fragref> +<src:fragref linkend="funcsynopsis.decoration.frag"></src:fragref> +<src:fragref linkend="funcsynopsis.style.frag"></src:fragref> +<src:fragref linkend="function.parens.frag"></src:fragref> +<src:fragref linkend="generate.index.frag"></src:fragref> +<src:fragref linkend="generate.section.toc.level.frag"></src:fragref> +<src:fragref linkend="generate.toc.frag"></src:fragref> +<src:fragref linkend="glossary.as.blocks.frag"></src:fragref> +<src:fragref linkend="glossary.collection.frag"></src:fragref> +<src:fragref linkend="glossary.sort.frag"></src:fragref> +<src:fragref linkend="glossentry.show.acronym.frag"></src:fragref> +<src:fragref linkend="glosslist.as.blocks.frag"></src:fragref> +<src:fragref linkend="glossterm.auto.link.frag"></src:fragref> +<src:fragref linkend="glossterm.separation.frag"></src:fragref> +<src:fragref linkend="glossterm.width.frag"></src:fragref> +<src:fragref linkend="glossentry.list.item.properties.frag"></src:fragref> +<src:fragref linkend="glossterm.list.properties.frag"></src:fragref> +<src:fragref linkend="glossterm.block.properties.frag"></src:fragref> +<src:fragref linkend="glossdef.list.properties.frag"></src:fragref> +<src:fragref linkend="glossdef.block.properties.frag"></src:fragref> +<src:fragref linkend="graphic.default.extension.frag"></src:fragref> +<src:fragref linkend="header.content.properties.frag"></src:fragref> +<src:fragref linkend="header.rule.frag"></src:fragref> +<src:fragref linkend="header.column.widths.frag"></src:fragref> +<src:fragref linkend="header.table.height.frag"></src:fragref> +<src:fragref linkend="header.table.properties.frag"></src:fragref> +<src:fragref linkend="headers.on.blank.pages.frag"></src:fragref> +<src:fragref linkend="highlight.default.language.frag"></src:fragref> +<src:fragref linkend="highlight.source.frag"></src:fragref> +<src:fragref linkend="highlight.xslthl.config.frag"></src:fragref> +<src:fragref linkend="hyphenate.frag"></src:fragref> +<src:fragref linkend="hyphenate.verbatim.frag"></src:fragref> +<src:fragref linkend="hyphenate.verbatim.characters.frag"></src:fragref> +<src:fragref linkend="ignore.image.scaling.frag"></src:fragref> +<src:fragref linkend="img.src.path.frag"></src:fragref> +<src:fragref linkend="index.method.frag"></src:fragref> +<src:fragref linkend="index.on.role.frag"></src:fragref> +<src:fragref linkend="index.on.type.frag"></src:fragref> +<src:fragref linkend="index.page.number.properties.frag"></src:fragref> +<src:fragref linkend="informalequation.properties.frag"></src:fragref> +<src:fragref linkend="informalexample.properties.frag"></src:fragref> +<src:fragref linkend="informalfigure.properties.frag"></src:fragref> +<src:fragref linkend="informal.object.properties.frag"></src:fragref> +<src:fragref linkend="informaltable.properties.frag"></src:fragref> +<src:fragref linkend="index.preferred.page.properties.frag"></src:fragref> +<src:fragref linkend="index.div.title.properties.frag"></src:fragref> +<src:fragref linkend="index.entry.properties.frag"></src:fragref> +<src:fragref linkend="index.number.separator.frag"></src:fragref> +<src:fragref linkend="index.range.separator.frag"></src:fragref> +<src:fragref linkend="index.term.separator.frag"></src:fragref> +<src:fragref linkend="insert.link.page.number.frag"></src:fragref> +<src:fragref linkend="insert.xref.page.number.frag"></src:fragref> +<src:fragref linkend="itemizedlist.properties.frag"></src:fragref> +<src:fragref linkend="itemizedlist.label.properties.frag"></src:fragref> +<src:fragref linkend="itemizedlist.label.width.frag"></src:fragref> +<src:fragref linkend="keep.relative.image.uris.frag"></src:fragref> +<src:fragref linkend="l10n.gentext.default.language.frag"></src:fragref> +<src:fragref linkend="l10n.gentext.language.frag"></src:fragref> +<src:fragref linkend="l10n.gentext.use.xref.language.frag"></src:fragref> +<src:fragref linkend="l10n.lang.value.rfc.compliant.frag"></src:fragref> +<src:fragref linkend="label.from.part.frag"></src:fragref> +<src:fragref linkend="line-height.frag"></src:fragref> +<src:fragref linkend="linenumbering.everyNth.frag"></src:fragref> +<src:fragref linkend="linenumbering.extension.frag"></src:fragref> +<src:fragref linkend="linenumbering.separator.frag"></src:fragref> +<src:fragref linkend="linenumbering.width.frag"></src:fragref> +<src:fragref linkend="list.block.properties.frag"></src:fragref> +<src:fragref linkend="list.block.spacing.frag"></src:fragref> +<src:fragref linkend="list.item.spacing.frag"></src:fragref> +<src:fragref linkend="make.index.markup.frag"></src:fragref> +<src:fragref linkend="make.single.year.ranges.frag"></src:fragref> +<src:fragref linkend="make.year.ranges.frag"></src:fragref> +<src:fragref linkend="margin.note.properties.frag"></src:fragref> +<src:fragref linkend="margin.note.title.properties.frag"></src:fragref> +<src:fragref linkend="margin.note.float.type.frag"></src:fragref> +<src:fragref linkend="margin.note.width.frag"></src:fragref> +<src:fragref linkend="marker.section.level.frag"></src:fragref> +<src:fragref linkend="menuchoice.menu.separator.frag"></src:fragref> +<src:fragref linkend="menuchoice.separator.frag"></src:fragref> +<src:fragref linkend="monospace.font.family.frag"></src:fragref> +<src:fragref linkend="monospace.properties.frag"></src:fragref> +<src:fragref linkend="monospace.verbatim.properties.frag"></src:fragref> +<src:fragref linkend="monospace.verbatim.font.width.frag"></src:fragref> +<src:fragref linkend="nominal.table.width.frag"></src:fragref> +<src:fragref linkend="normal.para.spacing.frag"></src:fragref> +<src:fragref linkend="olink.doctitle.frag"></src:fragref> +<src:fragref linkend="olink.base.uri.frag"></src:fragref> +<src:fragref linkend="olink.debug.frag"></src:fragref> +<src:fragref linkend="olink.properties.frag"></src:fragref> +<src:fragref linkend="olink.lang.fallback.sequence.frag"></src:fragref> +<src:fragref linkend="orderedlist.properties.frag"></src:fragref> +<src:fragref linkend="orderedlist.label.properties.frag"></src:fragref> +<src:fragref linkend="orderedlist.label.width.frag"></src:fragref> +<src:fragref linkend="prefer.internal.olink.frag"></src:fragref> +<src:fragref linkend="insert.olink.page.number.frag"></src:fragref> +<src:fragref linkend="insert.olink.pdf.frag.frag"></src:fragref> +<src:fragref linkend="page.height.frag"></src:fragref> +<src:fragref linkend="page.height.portrait.frag"></src:fragref> +<src:fragref linkend="page.margin.bottom.frag"></src:fragref> +<src:fragref linkend="page.margin.inner.frag"></src:fragref> +<src:fragref linkend="page.margin.outer.frag"></src:fragref> +<src:fragref linkend="page.margin.top.frag"></src:fragref> +<src:fragref linkend="page.orientation.frag"></src:fragref> +<src:fragref linkend="page.width.frag"></src:fragref> +<src:fragref linkend="page.width.portrait.frag"></src:fragref> +<src:fragref linkend="paper.type.frag"></src:fragref> +<src:fragref linkend="part.autolabel.frag"></src:fragref> +<src:fragref linkend="passivetex.extensions.frag"></src:fragref> +<src:fragref linkend="pgwide.properties.frag"></src:fragref> +<src:fragref linkend="preface.autolabel.frag"></src:fragref> +<src:fragref linkend="preferred.mediaobject.role.frag"></src:fragref> +<src:fragref linkend="procedure.properties.frag"></src:fragref> +<src:fragref linkend="process.empty.source.toc.frag"></src:fragref> +<src:fragref linkend="process.source.toc.frag"></src:fragref> +<src:fragref linkend="profile.arch.frag"></src:fragref> +<src:fragref linkend="profile.audience.frag"></src:fragref> +<src:fragref linkend="profile.attribute.frag"></src:fragref> +<src:fragref linkend="profile.condition.frag"></src:fragref> +<src:fragref linkend="profile.conformance.frag"></src:fragref> +<src:fragref linkend="profile.lang.frag"></src:fragref> +<src:fragref linkend="profile.os.frag"></src:fragref> +<src:fragref linkend="profile.revision.frag"></src:fragref> +<src:fragref linkend="profile.revisionflag.frag"></src:fragref> +<src:fragref linkend="profile.role.frag"></src:fragref> +<src:fragref linkend="profile.security.frag"></src:fragref> +<src:fragref linkend="profile.separator.frag"></src:fragref> +<src:fragref linkend="profile.status.frag"></src:fragref> +<src:fragref linkend="profile.userlevel.frag"></src:fragref> +<src:fragref linkend="profile.value.frag"></src:fragref> +<src:fragref linkend="profile.vendor.frag"></src:fragref> +<src:fragref linkend="profile.wordsize.frag"></src:fragref> +<src:fragref linkend="punct.honorific.frag"></src:fragref> +<src:fragref linkend="qanda.defaultlabel.frag"></src:fragref> +<src:fragref linkend="qanda.in.toc.frag"></src:fragref> +<src:fragref linkend="qanda.nested.in.toc.frag"></src:fragref> +<src:fragref linkend="qanda.inherit.numeration.frag"></src:fragref> +<src:fragref linkend="qandadiv.autolabel.frag"></src:fragref> +<src:fragref linkend="qanda.title.level1.properties.frag"></src:fragref> +<src:fragref linkend="qanda.title.level2.properties.frag"></src:fragref> +<src:fragref linkend="qanda.title.level3.properties.frag"></src:fragref> +<src:fragref linkend="qanda.title.level4.properties.frag"></src:fragref> +<src:fragref linkend="qanda.title.level5.properties.frag"></src:fragref> +<src:fragref linkend="qanda.title.level6.properties.frag"></src:fragref> +<src:fragref linkend="qanda.title.properties.frag"></src:fragref> +<src:fragref linkend="refentry.generate.name.frag"></src:fragref> +<src:fragref linkend="refentry.generate.title.frag"></src:fragref> +<src:fragref linkend="refentry.pagebreak.frag"></src:fragref> +<src:fragref linkend="refentry.title.properties.frag"></src:fragref> +<src:fragref linkend="refentry.xref.manvolnum.frag"></src:fragref> +<src:fragref linkend="reference.autolabel.frag"></src:fragref> +<src:fragref linkend="refclass.suppress.frag"></src:fragref> +<src:fragref linkend="region.after.extent.frag"></src:fragref> +<src:fragref linkend="region.before.extent.frag"></src:fragref> +<src:fragref linkend="revhistory.table.properties.frag"></src:fragref> +<src:fragref linkend="revhistory.table.cell.properties.frag"></src:fragref> +<src:fragref linkend="revhistory.title.properties.frag"></src:fragref> +<src:fragref linkend="root.properties.frag"></src:fragref> +<src:fragref linkend="rootid.frag"></src:fragref> +<src:fragref linkend="runinhead.default.title.end.punct.frag"></src:fragref> +<src:fragref linkend="runinhead.title.end.punct.frag"></src:fragref> +<src:fragref linkend="sans.font.family.frag"></src:fragref> +<src:fragref linkend="section.autolabel.frag"></src:fragref> +<src:fragref linkend="section.autolabel.max.depth.frag"></src:fragref> +<src:fragref linkend="section.container.element.frag"></src:fragref> +<src:fragref linkend="section.label.includes.component.label.frag"></src:fragref> +<src:fragref linkend="section.title.level1.properties.frag"></src:fragref> +<src:fragref linkend="section.title.level2.properties.frag"></src:fragref> +<src:fragref linkend="section.title.level3.properties.frag"></src:fragref> +<src:fragref linkend="section.title.level4.properties.frag"></src:fragref> +<src:fragref linkend="section.title.level5.properties.frag"></src:fragref> +<src:fragref linkend="section.title.level6.properties.frag"></src:fragref> +<src:fragref linkend="section.title.properties.frag"></src:fragref> +<src:fragref linkend="section.level1.properties.frag"></src:fragref> +<src:fragref linkend="section.level2.properties.frag"></src:fragref> +<src:fragref linkend="section.level3.properties.frag"></src:fragref> +<src:fragref linkend="section.level4.properties.frag"></src:fragref> +<src:fragref linkend="section.level5.properties.frag"></src:fragref> +<src:fragref linkend="section.level6.properties.frag"></src:fragref> +<src:fragref linkend="section.properties.frag"></src:fragref> +<src:fragref linkend="segmentedlist.as.table.frag"></src:fragref> +<src:fragref linkend="shade.verbatim.frag"></src:fragref> +<src:fragref linkend="shade.verbatim.style.frag"></src:fragref> +<src:fragref linkend="show.comments.frag"></src:fragref> +<src:fragref linkend="sidebar.properties.frag"></src:fragref> +<src:fragref linkend="sidebar.title.properties.frag"></src:fragref> +<src:fragref linkend="sidebar.float.type.frag"></src:fragref> +<src:fragref linkend="sidebar.float.width.frag"></src:fragref> +<src:fragref linkend="simplesect.in.toc.frag"></src:fragref> +<src:fragref linkend="subscript.properties.frag"></src:fragref> +<src:fragref linkend="superscript.properties.frag"></src:fragref> +<src:fragref linkend="symbol.font.family.frag"></src:fragref> +<src:fragref linkend="table.cell.border.color.frag"></src:fragref> +<src:fragref linkend="table.cell.border.style.frag"></src:fragref> +<src:fragref linkend="table.cell.border.thickness.frag"></src:fragref> +<src:fragref linkend="table.cell.padding.frag"></src:fragref> +<src:fragref linkend="table.footnote.number.format.frag"></src:fragref> +<src:fragref linkend="table.footnote.number.symbols.frag"></src:fragref> +<src:fragref linkend="table.footnote.properties.frag"></src:fragref> +<src:fragref linkend="table.frame.border.color.frag"></src:fragref> +<src:fragref linkend="table.frame.border.style.frag"></src:fragref> +<src:fragref linkend="table.frame.border.thickness.frag"></src:fragref> +<src:fragref linkend="table.properties.frag"></src:fragref> +<src:fragref linkend="tablecolumns.extension.frag"></src:fragref> +<src:fragref linkend="table.table.properties.frag"></src:fragref> +<src:fragref linkend="target.database.document.frag"></src:fragref> +<src:fragref linkend="targets.filename.frag"></src:fragref> +<src:fragref linkend="textdata.default.encoding.frag"></src:fragref> +<src:fragref linkend="tex.math.delims.frag"></src:fragref> +<src:fragref linkend="tex.math.in.alt.frag"></src:fragref> +<src:fragref linkend="textinsert.extension.frag"></src:fragref> +<src:fragref linkend="title.font.family.frag"></src:fragref> +<src:fragref linkend="title.margin.left.frag"></src:fragref> +<src:fragref linkend="toc.indent.width.frag"></src:fragref> +<src:fragref linkend="toc.line.properties.frag"></src:fragref> +<src:fragref linkend="toc.margin.properties.frag"></src:fragref> +<src:fragref linkend="toc.max.depth.frag"></src:fragref> +<src:fragref linkend="toc.section.depth.frag"></src:fragref> +<src:fragref linkend="ulink.footnotes.frag"></src:fragref> +<src:fragref linkend="ulink.hyphenate.frag"></src:fragref> +<src:fragref linkend="ulink.hyphenate.chars.frag"></src:fragref> +<src:fragref linkend="ulink.show.frag"></src:fragref> +<src:fragref linkend="use.extensions.frag"></src:fragref> +<src:fragref linkend="use.local.olink.style.frag"></src:fragref> +<src:fragref linkend="use.role.as.xrefstyle.frag"></src:fragref> +<src:fragref linkend="use.role.for.mediaobject.frag"></src:fragref> +<src:fragref linkend="use.svg.frag"></src:fragref> +<src:fragref linkend="variablelist.as.blocks.frag"></src:fragref> +<src:fragref linkend="variablelist.max.termlength.frag"></src:fragref> +<src:fragref linkend="variablelist.term.separator.frag"></src:fragref> +<src:fragref linkend="variablelist.term.properties.frag"></src:fragref> +<src:fragref linkend="variablelist.term.break.after.frag"></src:fragref> +<src:fragref linkend="verbatim.properties.frag"></src:fragref> +<src:fragref linkend="writing.mode.frag"></src:fragref> +<src:fragref linkend="xep.extensions.frag"></src:fragref> +<src:fragref linkend="xep.index.item.properties.frag"></src:fragref> +<src:fragref linkend="xref.label-page.separator.frag"></src:fragref> +<src:fragref linkend="xref.label-title.separator.frag"></src:fragref> +<src:fragref linkend="xref.properties.frag"></src:fragref> +<src:fragref linkend="xref.title-page.separator.frag"></src:fragref> +<src:fragref linkend="xref.with.number.and.title.frag"></src:fragref> + +</xsl:stylesheet> +</programlisting> + +</appendix> +</book> diff --git a/3rdParty/DocBook/XSL/fo/param.xsl b/3rdParty/DocBook/XSL/fo/param.xsl new file mode 100644 index 0000000..b52132e --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/param.xsl @@ -0,0 +1,942 @@ +<?xml version="1.0" encoding="ASCII"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<!-- This file is generated from param.xweb --> + +<!-- ******************************************************************** + $Id: param.xweb 8392 2009-04-01 08:47:55Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<xsl:attribute-set name="abstract.properties"> + <xsl:attribute name="start-indent">0.0in</xsl:attribute> + <xsl:attribute name="end-indent">0.0in</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="abstract.title.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"/></xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute> + <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt * 0.8')"/></xsl:attribute> + <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt * 1.2')"/></xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align">center</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="admon.graphics.extension">.png</xsl:param> +<xsl:param name="admon.graphics" select="0"/> +<xsl:param name="admon.graphics.path">images/</xsl:param> +<xsl:param name="admon.textlabel" select="1"/> +<xsl:attribute-set name="admonition.properties"/> +<xsl:attribute-set name="admonition.title.properties"> + <xsl:attribute name="font-size">14pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="graphical.admonition.properties"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="nongraphical.admonition.properties"> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.start}">0.25in</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}">0.25in</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="alignment">justify</xsl:param> +<xsl:param name="appendix.autolabel">A</xsl:param> +<xsl:param name="arbortext.extensions" select="0"/> +<xsl:attribute-set name="article.appendix.title.properties" use-attribute-sets="section.title.properties section.title.level1.properties"> + <xsl:attribute name="margin-{$direction.align.start}"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="author.othername.in.middle" select="1"/> +<xsl:param name="autotoc.label.separator">. </xsl:param> +<xsl:param name="axf.extensions" select="0"/> +<xsl:param name="biblioentry.item.separator">. </xsl:param> +<xsl:attribute-set name="biblioentry.properties" use-attribute-sets="normal.para.spacing"> + <xsl:attribute name="start-indent">0.5in</xsl:attribute> + <xsl:attribute name="text-indent">-0.5in</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="bibliography.collection">http://docbook.sourceforge.net/release/bibliography/bibliography.xml</xsl:param> + +<xsl:param name="bibliography.numbered" select="0"/> +<xsl:param name="bibliography.style">normal</xsl:param> +<xsl:attribute-set name="blockquote.properties"> +<xsl:attribute name="margin-{$direction.align.start}">0.5in</xsl:attribute> +<xsl:attribute name="margin-{$direction.align.end}">0.5in</xsl:attribute> +<xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> +<xsl:attribute name="space-after.optimum">1em</xsl:attribute> +<xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="body.font.family">serif</xsl:param> +<xsl:param name="body.font.master">10</xsl:param> +<xsl:param name="body.font.size"> + <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> +</xsl:param> +<xsl:param name="body.margin.bottom">0.5in</xsl:param> +<xsl:param name="body.margin.top">0.5in</xsl:param> +<xsl:param name="body.start.indent"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0">0pt</xsl:when> + <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when> + <xsl:otherwise>4pc</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="body.end.indent">0pt</xsl:param> +<xsl:param name="bookmarks.collapse" select="1"/> +<xsl:param name="bridgehead.in.toc" select="0"/> +<xsl:param name="callout.defaultcolumn">60</xsl:param> + +<xsl:param name="callout.graphics.extension">.svg</xsl:param> +<xsl:param name="callout.graphics" select="1"/> +<xsl:param name="callout.icon.size">7pt</xsl:param> + +<xsl:param name="callout.graphics.number.limit">30</xsl:param> +<xsl:param name="callout.graphics.path">images/callouts/</xsl:param> +<xsl:param name="callout.unicode.font">ZapfDingbats</xsl:param> +<xsl:param name="callout.unicode" select="0"/> +<xsl:param name="callout.unicode.number.limit">10</xsl:param> +<xsl:param name="callout.unicode.start.character">10102</xsl:param> +<xsl:param name="callouts.extension" select="1"/> +<xsl:param name="chapter.autolabel" select="1"/> +<xsl:param name="collect.xref.targets">no</xsl:param> +<xsl:param name="column.count.back" select="1"/> +<xsl:param name="column.count.body" select="1"/> +<xsl:param name="column.count.front" select="1"/> +<xsl:param name="column.count.index">2</xsl:param> +<xsl:param name="column.count.lot" select="1"/> +<xsl:param name="column.count.titlepage" select="1"/> +<xsl:param name="column.gap.back">12pt</xsl:param> +<xsl:param name="column.gap.body">12pt</xsl:param> +<xsl:param name="column.gap.front">12pt</xsl:param> +<xsl:param name="column.gap.index">12pt</xsl:param> +<xsl:param name="column.gap.lot">12pt</xsl:param> +<xsl:param name="column.gap.titlepage">12pt</xsl:param> +<xsl:attribute-set name="compact.list.item.spacing"> + <xsl:attribute name="space-before.optimum">0em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="component.label.includes.part.label" select="0"/> +<xsl:attribute-set name="component.title.properties"> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute> + <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt * 0.8')"/></xsl:attribute> + <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt * 1.2')"/></xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align"> + <xsl:choose> + <xsl:when test="((parent::article | parent::articleinfo | parent::info/parent::article) and not(ancestor::book) and not(self::bibliography)) or (parent::slides | parent::slidesinfo)">center</xsl:when> + <xsl:otherwise>start</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="component.titlepage.properties"> +</xsl:attribute-set> +<xsl:param name="crop.marks" select="0"/> +<xsl:param name="crop.mark.width">0.5pt</xsl:param> +<xsl:param name="crop.mark.offset">24pt</xsl:param> +<xsl:param name="crop.mark.bleed">6pt</xsl:param> +<xsl:param name="current.docid"/> +<xsl:param name="default.float.class"> + <xsl:choose> + <xsl:when test="contains($stylesheet.result.type,'html')">left</xsl:when> + <xsl:otherwise>before</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="default.image.width"/> +<xsl:param name="default.table.width"/> +<xsl:param name="default.table.frame">all</xsl:param> +<xsl:param name="default.table.rules">none</xsl:param> +<xsl:param name="default.units">pt</xsl:param> +<xsl:param name="dingbat.font.family">serif</xsl:param> +<xsl:param name="double.sided" select="0"/> +<xsl:param name="draft.mode">maybe</xsl:param> +<xsl:param name="draft.watermark.image">http://docbook.sourceforge.net/release/images/draft.png</xsl:param> + +<xsl:param name="ebnf.assignment"> + <fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$monospace.font.family}"> + <xsl:text>::=</xsl:text> + </fo:inline> +</xsl:param> + +<xsl:param name="ebnf.statement.terminator"/> +<xsl:param name="email.delimiters.enabled" select="1"/> +<xsl:param name="email.mailto.enabled" select="0"/> +<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"/> +<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"/> +<xsl:param name="exsl.node.set.available"> + <xsl:choose> + <xsl:when xmlns:exsl="http://exslt.org/common" exsl:foo="" test="function-available('exsl:node-set') or contains(system-property('xsl:vendor'), 'Apache Software Foundation')">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/> +<xsl:param name="firstterm.only.link" select="0"/> +<xsl:attribute-set name="footer.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.fontset"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="footer.rule" select="1"/> +<xsl:param name="footer.column.widths">1 1 1</xsl:param> +<xsl:param name="footer.table.height">14pt</xsl:param> +<xsl:attribute-set name="footer.table.properties"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + <xsl:attribute name="width">100%</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="footers.on.blank.pages" select="1"/> +<xsl:param name="footnote.font.size"> + <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> +</xsl:param> +<xsl:param name="footnote.number.format">1</xsl:param> +<xsl:param name="footnote.number.symbols"/> +<xsl:attribute-set name="footnote.mark.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"/></xsl:attribute> + <xsl:attribute name="font-size">75%</xsl:attribute> + <xsl:attribute name="font-weight">normal</xsl:attribute> + <xsl:attribute name="font-style">normal</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="footnote.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"/></xsl:attribute> + <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"/></xsl:attribute> + <xsl:attribute name="font-weight">normal</xsl:attribute> + <xsl:attribute name="font-style">normal</xsl:attribute> + <xsl:attribute name="text-align"><xsl:value-of select="$alignment"/></xsl:attribute> + <xsl:attribute name="start-indent">0pt</xsl:attribute> + <xsl:attribute name="text-indent">0pt</xsl:attribute> + <xsl:attribute name="hyphenate"><xsl:value-of select="$hyphenate"/></xsl:attribute> + <xsl:attribute name="wrap-option">wrap</xsl:attribute> + <xsl:attribute name="linefeed-treatment">treat-as-space</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="footnote.sep.leader.properties"> + <xsl:attribute name="color">black</xsl:attribute> + <xsl:attribute name="leader-pattern">rule</xsl:attribute> + <xsl:attribute name="leader-length">1in</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="fop.extensions" select="0"/> +<xsl:param name="fop1.extensions" select="0"/> +<xsl:attribute-set name="formal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="formal.procedures" select="1"/> +<xsl:param name="formal.title.placement"> +figure before +example before +equation before +table before +procedure before +task before +</xsl:param> +<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="funcsynopsis.decoration" select="1"/> +<xsl:param name="funcsynopsis.style">kr</xsl:param> +<xsl:param name="function.parens" select="0"/> +<xsl:param name="generate.index" select="1"/> +<xsl:param name="generate.section.toc.level" select="0"/> + +<xsl:param name="generate.toc"> +/appendix toc,title +article/appendix nop +/article toc,title +book toc,title,figure,table,example,equation +/chapter toc,title +part toc,title +/preface toc,title +reference toc,title +/sect1 toc +/sect2 toc +/sect3 toc +/sect4 toc +/sect5 toc +/section toc +set toc,title +</xsl:param> +<xsl:param name="glossary.as.blocks" select="0"/> +<xsl:param name="glossary.collection"/> +<xsl:param name="glossary.sort" select="0"/> +<xsl:param name="glossentry.show.acronym">no</xsl:param> +<xsl:param name="glosslist.as.blocks" select="0"/> +<xsl:param name="glossterm.auto.link" select="0"/> +<xsl:param name="glossterm.separation">0.25in</xsl:param> +<xsl:param name="glossterm.width">2in</xsl:param> +<xsl:attribute-set name="glossentry.list.item.properties"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="glossterm.list.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="glossterm.block.properties"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="glossdef.list.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="glossdef.block.properties"> + <xsl:attribute name="margin-{$direction.align.start}">.25in</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="graphic.default.extension"/> +<xsl:attribute-set name="header.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.fontset"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="header.rule" select="1"/> +<xsl:param name="header.column.widths">1 1 1</xsl:param> +<xsl:param name="header.table.height">14pt</xsl:param> +<xsl:attribute-set name="header.table.properties"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + <xsl:attribute name="width">100%</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="headers.on.blank.pages" select="1"/> +<xsl:param name="highlight.default.language"/> +<xsl:param name="highlight.source" select="0"/> +<xsl:param name="highlight.xslthl.config"/> +<xsl:param name="hyphenate">true</xsl:param> +<xsl:param name="hyphenate.verbatim" select="0"/> +<xsl:param name="hyphenate.verbatim.characters"/> +<xsl:param name="ignore.image.scaling" select="0"/> +<xsl:param name="img.src.path"/> +<xsl:param name="index.method">basic</xsl:param> +<xsl:param name="index.on.role" select="0"/> +<xsl:param name="index.on.type" select="0"/> +<xsl:attribute-set name="index.page.number.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="informalequation.properties" use-attribute-sets="informal.object.properties"/> +<xsl:attribute-set name="informalexample.properties" use-attribute-sets="informal.object.properties"/> +<xsl:attribute-set name="informalfigure.properties" use-attribute-sets="informal.object.properties"/> +<xsl:attribute-set name="informal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="informaltable.properties" use-attribute-sets="informal.object.properties"/> +<xsl:attribute-set name="index.preferred.page.properties"> + <xsl:attribute name="font-weight">bold</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="index.div.title.properties"> + <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute> + <xsl:attribute name="font-size">14.4pt</xsl:attribute> + <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"/></xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master,'pt')"/></xsl:attribute> + <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master,'pt * 0.8')"/></xsl:attribute> + <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master,'pt * 1.2')"/></xsl:attribute> + <xsl:attribute name="start-indent">0pt</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="index.entry.properties"> + <xsl:attribute name="start-indent">0pt</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="index.number.separator"/> +<xsl:param name="index.range.separator"/> +<xsl:param name="index.term.separator"/> +<xsl:param name="insert.link.page.number">no</xsl:param> +<xsl:param name="insert.xref.page.number">no</xsl:param> +<xsl:attribute-set name="itemizedlist.properties" use-attribute-sets="list.block.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="itemizedlist.label.properties"> +</xsl:attribute-set> + <xsl:param name="itemizedlist.label.width">1.0em</xsl:param> + + +<xsl:param name="keep.relative.image.uris" select="0"/> +<xsl:param name="l10n.gentext.default.language">en</xsl:param> +<xsl:param name="l10n.gentext.language"/> +<xsl:param name="l10n.gentext.use.xref.language" select="0"/> +<xsl:param name="l10n.lang.value.rfc.compliant" select="1"/> +<xsl:param name="label.from.part" select="0"/> +<xsl:param name="line-height">normal</xsl:param> +<xsl:param name="linenumbering.everyNth">5</xsl:param> +<xsl:param name="linenumbering.extension" select="1"/> +<xsl:param name="linenumbering.separator"><xsl:text> </xsl:text></xsl:param> +<xsl:param name="linenumbering.width">3</xsl:param> +<xsl:attribute-set name="list.block.properties"> + <xsl:attribute name="provisional-label-separation">0.2em</xsl:attribute> + <xsl:attribute name="provisional-distance-between-starts">1.5em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="list.block.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="list.item.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="make.index.markup" select="0"/> +<xsl:param name="make.single.year.ranges" select="0"/> +<xsl:param name="make.year.ranges" select="0"/> +<xsl:attribute-set name="margin.note.properties"> + <xsl:attribute name="font-size">90%</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="margin.note.title.properties"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="margin.note.float.type">none</xsl:param> +<xsl:param name="margin.note.width">1in</xsl:param> +<xsl:param name="marker.section.level">2</xsl:param> +<xsl:param name="menuchoice.menu.separator"> → </xsl:param> +<xsl:param name="menuchoice.separator">+</xsl:param> +<xsl:param name="monospace.font.family">monospace</xsl:param> +<xsl:attribute-set name="monospace.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$monospace.font.family"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="monospace.verbatim.font.width">0.60em</xsl:param> +<xsl:param name="nominal.table.width">6in</xsl:param> +<xsl:attribute-set name="normal.para.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="olink.doctitle">no</xsl:param> +<xsl:param name="olink.base.uri"/> +<xsl:param name="olink.debug" select="0"/> +<xsl:attribute-set name="olink.properties"> + <xsl:attribute name="show-destination">replace</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="olink.lang.fallback.sequence"/> +<xsl:attribute-set name="orderedlist.properties" use-attribute-sets="list.block.properties"> + <xsl:attribute name="provisional-distance-between-starts">2em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="orderedlist.label.properties"> +</xsl:attribute-set> +<xsl:param name="orderedlist.label.width">1.2em</xsl:param> +<xsl:param name="prefer.internal.olink" select="0"/> +<xsl:param name="insert.olink.page.number">no</xsl:param> +<xsl:param name="insert.olink.pdf.frag" select="0"/> +<xsl:param name="page.height"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.height.portrait"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.width.portrait"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="page.height.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when> + <xsl:when test="$paper.type = 'USletter'">11in</xsl:when> + <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">37mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">44mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">40mm</xsl:when> + <xsl:otherwise>11in</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="page.margin.bottom">0.5in</xsl:param> +<xsl:param name="page.margin.inner"> + <xsl:choose> + <xsl:when test="$double.sided != 0">1.25in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="page.margin.outer"> + <xsl:choose> + <xsl:when test="$double.sided != 0">0.75in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="page.margin.top">0.5in</xsl:param> +<xsl:param name="page.orientation">portrait</xsl:param> +<xsl:param name="page.width"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.width.portrait"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.height.portrait"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="page.width.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">37mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">26mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">44mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">31mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">40mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">28mm</xsl:when> + <xsl:otherwise>8.5in</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="paper.type">USletter</xsl:param> +<xsl:param name="part.autolabel">I</xsl:param> +<xsl:param name="passivetex.extensions" select="0"/> +<xsl:attribute-set name="pgwide.properties"> + <xsl:attribute name="start-indent">0pt</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="preface.autolabel" select="0"/> +<xsl:param name="preferred.mediaobject.role"/> +<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="keep-together.within-column">auto</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="process.empty.source.toc" select="0"/> +<xsl:param name="process.source.toc" select="0"/> +<xsl:param name="profile.arch"/> +<xsl:param name="profile.audience"/> +<xsl:param name="profile.attribute"/> +<xsl:param name="profile.condition"/> +<xsl:param name="profile.conformance"/> +<xsl:param name="profile.lang"/> +<xsl:param name="profile.os"/> +<xsl:param name="profile.revision"/> +<xsl:param name="profile.revisionflag"/> +<xsl:param name="profile.role"/> +<xsl:param name="profile.security"/> +<xsl:param name="profile.separator">;</xsl:param> +<xsl:param name="profile.status"/> +<xsl:param name="profile.userlevel"/> +<xsl:param name="profile.value"/> +<xsl:param name="profile.vendor"/> +<xsl:param name="profile.wordsize"/> +<xsl:param name="punct.honorific">.</xsl:param> +<xsl:param name="qanda.defaultlabel">number</xsl:param> +<xsl:param name="qanda.in.toc" select="0"/> +<xsl:param name="qanda.nested.in.toc" select="0"/> +<xsl:param name="qanda.inherit.numeration" select="1"/> +<xsl:param name="qandadiv.autolabel" select="1"/> +<xsl:attribute-set name="qanda.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="qanda.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="qanda.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="qanda.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="qanda.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="qanda.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="qanda.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by qanda.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="refentry.generate.name" select="1"/> +<xsl:param name="refentry.generate.title" select="0"/> +<xsl:param name="refentry.pagebreak" select="1"/> +<xsl:attribute-set name="refentry.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="space-after">1em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute> + <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute> +</xsl:attribute-set> +<xsl:param name="refentry.xref.manvolnum" select="1"/> + <xsl:param name="reference.autolabel">I</xsl:param> +<xsl:param name="refclass.suppress" select="0"/> +<xsl:param name="region.after.extent">0.4in</xsl:param> +<xsl:param name="region.before.extent">0.4in</xsl:param> +<xsl:attribute-set name="revhistory.table.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="revhistory.table.cell.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="revhistory.title.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="root.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.fontset"/> + </xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.size"/> + </xsl:attribute> + <xsl:attribute name="text-align"> + <xsl:value-of select="$alignment"/> + </xsl:attribute> + <xsl:attribute name="line-height"> + <xsl:value-of select="$line-height"/> + </xsl:attribute> + <xsl:attribute name="font-selection-strategy">character-by-character</xsl:attribute> + <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute> + <xsl:attribute name="writing-mode"> + <xsl:value-of select="$direction.mode"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="rootid"/> +<xsl:param name="runinhead.default.title.end.punct">.</xsl:param> +<xsl:param name="runinhead.title.end.punct">.!?:</xsl:param> +<xsl:param name="sans.font.family">sans-serif</xsl:param> +<xsl:param name="section.autolabel" select="0"/> +<xsl:param name="section.autolabel.max.depth">8</xsl:param> +<xsl:param name="section.container.element">block</xsl:param> +<xsl:param name="section.label.includes.component.label" select="0"/> +<xsl:attribute-set name="section.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by section.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.level1.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="section.level2.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="section.level3.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="section.level4.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="section.level5.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="section.level6.properties" use-attribute-sets="section.properties"> +</xsl:attribute-set> +<xsl:attribute-set name="section.properties"> +</xsl:attribute-set> +<xsl:param name="segmentedlist.as.table" select="0"/> +<xsl:param name="shade.verbatim" select="0"/> + +<xsl:attribute-set name="shade.verbatim.style"> + <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="show.comments" select="1"/> +<xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="border-width">1pt</xsl:attribute> + <xsl:attribute name="border-color">black</xsl:attribute> + <xsl:attribute name="background-color">#DDDDDD</xsl:attribute> + <xsl:attribute name="padding-start">12pt</xsl:attribute> + <xsl:attribute name="padding-end">12pt</xsl:attribute> + <xsl:attribute name="padding-top">6pt</xsl:attribute> + <xsl:attribute name="padding-bottom">6pt</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute> + <xsl:attribute name="margin-{$direction.align.end}">0pt</xsl:attribute> +<!-- + <xsl:attribute name="margin-top">6pt</xsl:attribute> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> +--> +</xsl:attribute-set> +<xsl:attribute-set name="sidebar.title.properties"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="sidebar.float.type">none</xsl:param> +<xsl:param name="sidebar.float.width">1in</xsl:param> +<xsl:param name="simplesect.in.toc" select="0"/> +<xsl:attribute-set name="subscript.properties"> + <xsl:attribute name="font-size">75%</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="superscript.properties"> + <xsl:attribute name="font-size">75%</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param> + +<xsl:param name="table.cell.border.color">black</xsl:param> +<xsl:param name="table.cell.border.style">solid</xsl:param> +<xsl:param name="table.cell.border.thickness">0.5pt</xsl:param> +<xsl:attribute-set name="table.cell.padding"> + <xsl:attribute name="padding-start">2pt</xsl:attribute> + <xsl:attribute name="padding-end">2pt</xsl:attribute> + <xsl:attribute name="padding-top">2pt</xsl:attribute> + <xsl:attribute name="padding-bottom">2pt</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="table.footnote.number.format">a</xsl:param> +<xsl:param name="table.footnote.number.symbols"/> +<xsl:attribute-set name="table.footnote.properties"> + <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"/></xsl:attribute> + <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"/></xsl:attribute> + <xsl:attribute name="font-weight">normal</xsl:attribute> + <xsl:attribute name="font-style">normal</xsl:attribute> + <xsl:attribute name="space-before">2pt</xsl:attribute> + <xsl:attribute name="text-align"><xsl:value-of select="$alignment"/></xsl:attribute> +</xsl:attribute-set> + +<xsl:param name="table.frame.border.color">black</xsl:param> +<xsl:param name="table.frame.border.style">solid</xsl:param> +<xsl:param name="table.frame.border.thickness">0.5pt</xsl:param> +<xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="keep-together.within-column">auto</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="tablecolumns.extension" select="1"/> +<xsl:attribute-set name="table.table.properties"> + <xsl:attribute name="border-before-width.conditionality">retain</xsl:attribute> + <xsl:attribute name="border-collapse">collapse</xsl:attribute> +</xsl:attribute-set> + <xsl:param name="target.database.document">olinkdb.xml</xsl:param> +<xsl:param name="targets.filename">target.db</xsl:param> +<xsl:param name="textdata.default.encoding"/> +<xsl:param name="tex.math.delims" select="1"/> +<xsl:param name="tex.math.in.alt"/> + <xsl:param name="textinsert.extension" select="1"/> +<xsl:param name="title.font.family">sans-serif</xsl:param> +<xsl:param name="title.margin.left"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0">-4pc</xsl:when> + <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="toc.indent.width">24</xsl:param> +<!-- inconsistant point specification? --> +<xsl:attribute-set name="toc.line.properties"> + <xsl:attribute name="text-align-last">justify</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> + <xsl:attribute name="end-indent"><xsl:value-of select="concat($toc.indent.width, 'pt')"/></xsl:attribute> + <xsl:attribute name="last-line-end-indent"><xsl:value-of select="concat('-', $toc.indent.width, 'pt')"/></xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="toc.margin.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="toc.max.depth">8</xsl:param> +<xsl:param name="toc.section.depth">2</xsl:param> +<xsl:param name="ulink.footnotes" select="0"/> +<xsl:param name="ulink.hyphenate"/> +<xsl:param name="ulink.hyphenate.chars">/</xsl:param> +<xsl:param name="ulink.show" select="1"/> +<xsl:param name="use.extensions" select="0"/> +<xsl:param name="use.local.olink.style" select="0"/> +<xsl:param name="use.role.as.xrefstyle" select="1"/> +<xsl:param name="use.role.for.mediaobject" select="1"/> +<xsl:param name="use.svg" select="1"/> +<xsl:param name="variablelist.as.blocks" select="0"/> +<xsl:param name="variablelist.max.termlength">24</xsl:param> +<xsl:param name="variablelist.term.separator">, </xsl:param> +<xsl:attribute-set name="variablelist.term.properties"> +</xsl:attribute-set> +<xsl:param name="variablelist.term.break.after">0</xsl:param> +<xsl:attribute-set name="verbatim.properties"> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> + <xsl:attribute name="white-space-collapse">false</xsl:attribute> + <xsl:attribute name="white-space-treatment">preserve</xsl:attribute> + <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="writing.mode"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">writing-mode</xsl:with-param> + <xsl:with-param name="lang"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="target" select="/*[1]"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> +</xsl:param> +<xsl:param name="xep.extensions" select="0"/> +<xsl:attribute-set name="xep.index.item.properties" use-attribute-sets="index.page.number.properties"> + <xsl:attribute name="merge-subsequent-page-numbers">true</xsl:attribute> + <xsl:attribute name="link-back">true</xsl:attribute> +</xsl:attribute-set> +<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param> +<xsl:param name="xref.label-title.separator">: </xsl:param> +<xsl:attribute-set name="xref.properties"> +</xsl:attribute-set> +<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param> +<xsl:param name="xref.with.number.and.title" select="1"/> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/passivetex.xsl b/3rdParty/DocBook/XSL/fo/passivetex.xsl new file mode 100644 index 0000000..9fa28ec --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/passivetex.xsl @@ -0,0 +1,36 @@ +<?xml version='1.0' encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: passivetex.xsl 5315 2005-10-20 10:08:42Z kosek $ + ******************************************************************** + This extension stops PassiveTeX from merging subsequent '-' to + dashes. You must set passivetex.extensions to '1' if you want get + this functionality. + ******************************************************************** --> + +<xsl:template name="passivetex.dash.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, '--')"> + <xsl:variable name="rest"> + <xsl:call-template name="passivetex.dash.subst"> + <xsl:with-param name="string" + select="concat('-', substring-after($string, '--'))"/> + </xsl:call-template> + </xsl:variable> + <xsl:value-of select="concat(substring-before($string, '--'), + '-​', + $rest)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/pdf2index b/3rdParty/DocBook/XSL/fo/pdf2index new file mode 100755 index 0000000..c14d8ec --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/pdf2index @@ -0,0 +1,140 @@ +#!/usr/bin/perl -- # -*- Perl -*- + +# this needs some cleanup... + +my $PSTOTEXT = "pstotext"; + +my $pdf = shift @ARGV; + +my $index = ""; +my $inindex = 0; +open (F, "$PSTOTEXT $pdf |"); +while (<F>) { + if (/^<\/index/) { + $index .= $_; + $inindex = 0; + } + $inindex = 1 if /^<index/; + + if ($inindex) { + $index .= $_ if /^\s*</; + } +} + +my $cindex = ""; +while ($index =~ /^(.*?)((<phrase role=\"pageno\">.*?<\/phrase>\s*)+)/s) { + $cindex .= $1; + $_ = $2; + $index = $'; # ' + + my @pages = m/<phrase role=\"pageno\">.*?<\/phrase>\s*/sg; + + # Expand ranges + if ($#pages >= 0) { + my @mpages = (); + foreach my $page (@pages) { + my $pageno = &pageno($page); + if ($pageno =~ /^([0-9]+)[^0-9]([0-9]+)$/) { # funky - + for (my $count = $1; $count <= $2; $count++) { + push (@mpages, "<phrase role=\"$pageno\">$count</phrase>"); + } + } else { + push (@mpages, $page); + } + } + @pages = sort rangesort @mpages; + } + + # Remove duplicates... + if ($#pages > 0) { + my @mpages = (); + my $current = ""; + foreach my $page (@pages) { + my $pageno = &pageno($page); + if ($pageno ne $current) { + push (@mpages, $page); + $current = $pageno; + } + } + @pages = @mpages; + } + + # Collapse ranges... + if ($#pages > 1) { + my @cpages = (); + while (@pages) { + my $count = 0; + my $len = &rangelen($count, @pages); + if ($len <= 2) { + my $page = shift @pages; + push (@cpages, $page); + } else { + my $fpage = shift @pages; + my $lpage = ""; + while ($len > 1) { + $lpage = shift @pages; + $len--; + } + my $fpno = &pageno($fpage); + my $lpno = &pageno($lpage); + $fpage =~ s/>$fpno</>${fpno}-$lpno</s; + push (@cpages, $fpage); + } + } + @pages = @cpages; + } + + my $page = shift @pages; + $page =~ s/\s*$//s; + $cindex .= $page; + while (@pages) { + $page = shift @pages; + $page =~ s/\s*$//s; + $cindex .= ", $page"; + } +} +$cindex .= $index; + +print "$cindex\n"; + +sub pageno { + my $page = shift; + + $page =~ s/^<phrase.*?>//; + $page =~ s/^<link.*?>//; + + return $1 if $page =~ /^([^<>]+)/; + return "?"; +} + +sub rangesort { + my $apno = &pageno($a); + my $bpno = &pageno($b); + + # Make sure roman pages come before arabic ones, otherwise sort them in order + return -1 if ($apno !~ /^\d+/ && $bpno =~ /^\d+/); + return 1 if ($apno =~ /^\d+/ && $bpno !~ /^\d+/); + return $apno <=> $bpno; +} + +sub rangelen { + my $count = shift; + my @pages = @_; + my $len = 1; + my $inrange = 1; + + my $current = &pageno($pages[$count]); + while ($count < $#pages && $inrange) { + $count++; + my $next = &pageno($pages[$count]); + if ($current + 1 eq $next) { + $current = $next; + $inrange = 1; + $len++; + } else { + $inrange = 0; + } + } + + return $len; +} diff --git a/3rdParty/DocBook/XSL/fo/pi.xml b/3rdParty/DocBook/XSL/fo/pi.xml new file mode 100644 index 0000000..bfb57d4 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/pi.xml @@ -0,0 +1,1002 @@ +<?xml version="1.0"?> + +<reference><info><title>FO Processing Instruction Reference</title> + <releaseinfo role="meta"> + $Id: pi.xsl 8394 2009-04-02 20:31:30Z mzjn $ + </releaseinfo> + </info> + + <partintro xml:id="partintro"> + <title>Introduction</title> + + +<para>This is generated reference documentation for all + user-specifiable processing instructions (PIs) in the DocBook + XSL stylesheets for FO output. + <note> + +<para>You add these PIs at particular points in a document to + cause specific “exceptions” to formatting/output behavior. To + make global changes in formatting/output behavior across an + entire document, it’s better to do it by setting an + appropriate stylesheet parameter (if there is one).</para> + + </note> + </para> + + </partintro> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_background-color"> +<refnamediv> +<refname>dbfo_background-color</refname> +<refpurpose>Sets background color for an image</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo background-color="<replaceable>color</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo background-color</tag> PI before or + after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>, + <tag>imagedata</tag>, or <tag>videodata</tag> element) as a + sibling to the element, to set a background color for the + image.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>background-color="<replaceable>color</replaceable>"</term> + <listitem> + +<para>An HTML color value</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="BGcolor.html">Background color</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_bgcolor"> +<refnamediv> +<refname>dbfo_bgcolor</refname> +<refpurpose>Sets background color on a table row or table cell</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo bgcolor="<replaceable>color</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo bgcolor</tag> PI as child of a table row + or cell to set a background color for that table row or cell.</para> + + +<para>This PI works for both CALS and HTML tables.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term> + <listitem> + +<para>An HTML color value</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="BGtableColor.html#CellBGColor">Cell background color</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_float-type"> +<refnamediv> +<refname>dbfo_float-type</refname> +<refpurpose>Specifies float behavior for a sidebar</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo float-type="margin.note"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo float-type</tag> PI to specify the float + behavior for a <tag>sidebar</tag> (to cause the sidebar to be + displayed as a marginal note).</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>float-type="margin.note"</term> + <listitem> + +<para>Specifies that the <tag>sidebar</tag> should be + displayed as a marginal note.</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>sidebar.float.type</parameter> (parameter), + <parameter>sidebar.float.width</parameter> (parameter), + <parameter>sidebar.properties</parameter> (attribute-set), + <parameter>sidebar.title.properties</parameter> (attribute-set) + </para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="SideFloats.html#SidebarFloats">A sidebar as + side float</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_funcsynopsis-style"> +<refnamediv> +<refname>dbfo_funcsynopsis-style</refname> +<refpurpose>Specifies presentation style for a funcsynopsis</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo funcsynopsis-style="kr"|"ansi"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo funcsynopsis-style</tag> PI as a child of + a <tag>funcsynopsis</tag> or anywhere within a funcsynopsis + to control the presentation style for output of all + <tag>funcprototype</tag> instances within that funcsynopsis.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>funcsynopsis-style="kr"</term> + <listitem> + +<para>Displays <tag>funcprototype</tag> output in K&R style</para> + + </listitem> + </varlistentry> + <varlistentry><term>funcsynopsis-style="ansi"</term> + <listitem> + +<para>Displays <tag>funcprototype</tag> output in ANSI style</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>funcsynopsis.style</parameter></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_glossary-presentation"> +<refnamediv> +<refname>dbfo_glossary-presentation</refname> +<refpurpose>Specifies presentation style for a glossary</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo glossary-presentation="list"|"blocks"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo glossary-presentation</tag> PI as a child of + a <tag>glossary</tag> to control its presentation style.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>glossary-presentation="list"</term> + <listitem> + +<para>Displays the glossary as a list</para> + + </listitem> + </varlistentry> + <varlistentry><term>glossary-presentation="blocks"</term> + <listitem> + +<para>Displays the glossary as blocks</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>glossary.as.blocks</parameter></para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Glossaries.html#GlossaryFormatPrint">Glossary + formatting in print</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_glosslist-presentation"> +<refnamediv> +<refname>dbfo_glosslist-presentation</refname> +<refpurpose>Specifies presentation style for a glosslist</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo glosslist-presentation="list"|"blocks"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo glosslist-presentation</tag> PI as a child of + a <tag>glosslist</tag> to control its presentation style.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>glosslist-presentation="list"</term> + <listitem> + +<para>Displays the glosslist as a list</para> + + </listitem> + </varlistentry> + <varlistentry><term>glosslist-presentation="blocks"</term> + <listitem> + +<para>Displays the glosslist as blocks</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>glosslist.as.blocks</parameter> </para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Glossaries.html#GlossaryFormatPrint">Glossary + formatting in print</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_glossterm-width"> +<refnamediv> +<refname>dbfo_glossterm-width</refname> +<refpurpose>Specifies the glossterm width for a glossary or + glosslist</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo glossterm-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo glossterm-width</tag> PI as a child of a + <tag>glossary</tag> or <tag>glosslist</tag> to specify the + width for output of <tag>glossterm</tag> instances in the + output.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>glossterm-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the glossterm width (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>glossterm.width</parameter>, + <parameter>glossterm.separation</parameter> + </para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Glossaries.html#GlossaryFormatPrint">Glossary + formatting in print</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_keep-together"> +<refnamediv> +<refname>dbfo_keep-together</refname> +<refpurpose>Specifies “keep” behavior for a table, example, + figure, equation, procedure, or task</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo keep-together="auto"|"always"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo keep-together</tag> PI as a child of a + formal object (<tag>table</tag>, <tag>example</tag>, + <tag>figure</tag>, <tag>equation</tag>, <tag>procedure</tag>, or + <tag>task</tag>) to specify “keep” behavior (to allow the object to + “break” across a page).</para> + + +<para>The PI also works with <tag>informaltable</tag>, <tag>informalexample</tag>, + <tag>informalfigure</tag> and <tag>informalequation</tag>. + </para> + + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>keep-together="auto"</term> + <listitem> + +<para>Enables the object to break across a page</para> + + </listitem> + </varlistentry> + <varlistentry><term>keep-together="always"</term> + <listitem> + +<para>Prevents the object from breaking across a page (the + default stylesheet behavior)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para>formal.object.properties</para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="PageBreaking.html#KeepTogetherPI">Keep-together processing instruction</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_label-width"> +<refnamediv> +<refname>dbfo_label-width</refname> +<refpurpose>Specifies the label width for a qandaset, itemizedlist, orderedlist + or calloutlist</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo label-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo label-width</tag> PI as a child of a + <tag>qandaset</tag>, <tag>itemizedlist</tag>, <tag>orderedlist</tag>, + or <tag>calloutlist</tag> to specify the width of labels.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>label-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the label width (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="QandAformat.html">Q and A formatting</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_linenumbering.everyNth"> +<refnamediv> +<refname>dbfo_linenumbering.everyNth</refname> +<refpurpose>Specifies interval for line numbers in verbatims</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo linenumbering.everyNth</tag> PI as a child + of a “verbatim” element – <tag>programlisting</tag>, + <tag>screen</tag>, <tag>synopsis</tag> — to specify + the interval at which lines are numbered.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term> + <listitem> + +<para>Specifies numbering interval; a number is output + before every <replaceable>N</replaceable>th line</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>linenumbering.everyNth</parameter></para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="AnnotateListing.html#LineNumbering">Line numbering</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_linenumbering.separator"> +<refnamediv> +<refname>dbfo_linenumbering.separator</refname> +<refpurpose>Specifies separator text for line numbers in verbatims</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo linenumbering.separator</tag> PI as a child + of a “verbatim” element – <tag>programlisting</tag>, + <tag>screen</tag>, <tag>synopsis</tag> — to specify + the separator text output between the line numbers and content.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term> + <listitem> + +<para>Specifies the text (zero or more characters)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>linenumbering.separator</parameter></para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="AnnotateListing.html#LineNumbering">Line numbering</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_linenumbering.width"> +<refnamediv> +<refname>dbfo_linenumbering.width</refname> +<refpurpose>Specifies width for line numbers in verbatims</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo linenumbering.width</tag> PI as a child + of a “verbatim” element – <tag>programlisting</tag>, + <tag>screen</tag>, <tag>synopsis</tag> — to specify + the width set aside for line numbers.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the width (inluding units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>linenumbering.width</parameter></para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="AnnotateListing.html#LineNumbering">Line numbering</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_list-presentation"> +<refnamediv> +<refname>dbfo_list-presentation</refname> +<refpurpose>Specifies presentation style for a variablelist or + segmentedlist</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo list-presentation="list"|"blocks"|"table"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo list-presentation</tag> PI as a child of + a <tag>variablelist</tag> or <tag>segmentedlist</tag> to + control the presentation style for the list (to cause it, for + example, to be displayed as a table).</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>list-presentation="list"</term> + <listitem> + +<para>Displays the list as a list</para> + + </listitem> + </varlistentry> + <varlistentry><term>list-presentation="blocks"</term> + <listitem> + +<para>(<tag>variablelist</tag> only) Displays the list as blocks</para> + + </listitem> + </varlistentry> + <varlistentry><term>list-presentation="table"</term> + <listitem> + +<para>(<tag>segmentedlist</tag> only) Displays the list as a table</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<itemizedlist> + <listitem> + +<para><parameter>variablelist.as.blocks</parameter></para> + + </listitem> + <listitem> + +<para><parameter>variablelist.as.table</parameter></para> + + </listitem> + </itemizedlist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Variablelists.html#ListIndents">Variable list formatting in print</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_list-width"> +<refnamediv> +<refname>dbfo_list-width</refname> +<refpurpose>Specifies the width of a horizontal simplelist</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo list-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo list-width</tag> PI as a child of a + <tag>simplelist</tag> whose <tag class="attribute">class</tag> + value is <literal>horizontal</literal>, to specify the width + of the <tag>simplelist</tag>.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>list-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the <tag>simplelist</tag> width (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_orientation"> +<refnamediv> +<refname>dbfo_orientation</refname> +<refpurpose>Specifies the orientation for a CALS table row or cell</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo orientation</tag> PI as a child of a CALS + <tag>table</tag> row or cell to specify the orientation + (rotation) for the row or cell.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</term> + <listitem> + +<para>Specifies the number of degrees by which the cell or + row is rotated</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_pgwide"> +<refnamediv> +<refname>dbfo_pgwide</refname> +<refpurpose>Specifies if an <tag>equation</tag> or <tag>example</tag> goes across full page width</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo pgwide="0"|"1"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo pgwide</tag> PI as a child of an + <tag>equation</tag> or <tag>example</tag> to specify that the + content should rendered across the full width of the page.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>pgwide="0"</term> + <listitem> + +<para>If zero, the content is rendered across the current + text flow</para> + + </listitem> + </varlistentry> + <varlistentry><term>pgwide="1"</term> + <listitem> + +<para>If <code>1</code> (or any non-zero value), the + content is rendered across the full width of the page</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>pgwide.properties</parameter></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_rotated-width"> +<refnamediv> +<refname>dbfo_rotated-width</refname> +<refpurpose>Specifies the width for a CALS table <tag>entry</tag> or + <tag>row</tag></refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo rotated-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo rotated-width</tag> PI as a child of + <tag>entry</tag> or <tag>row</tag> instance in a CALS table to specify the + width of that the <tag>entry</tag> or <tag>row</tag>; or + use it higher up in table to cause the width to be inherited + recursively down.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>rotated-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the width of a row or cell (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_sidebar-width"> +<refnamediv> +<refname>dbfo_sidebar-width</refname> +<refpurpose>Specifies the width of a sidebar</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo sidebar-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo sidebar-width</tag> PI as a child of a + <tag>sidebar</tag> to specify the width of the sidebar.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>sidebar-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the <tag>sidebar</tag> width (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="params"><title>Related Global Parameters</title> + +<para><parameter>sidebar.float.type parameter</parameter>, + <parameter>sidebar.float.width parameter</parameter>, + <parameter>sidebar.properties attribute-set</parameter>, + <parameter>sidebar.title.properties</parameter> + </para> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="SideFloats.html#SidebarFloats">A sidebar as + side float</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_start"> +<refnamediv> +<refname>dbfo_start</refname> +<refpurpose>(obsolete) Sets the starting number on an ordered list</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo start="<replaceable>character</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para><emphasis>This PI is obsolete</emphasis>. The intent of + it was to provide a means for setting a specific starting + number for an ordered list. Instead of this PI, set a value + for the <literal>override</literal> attribute on the first + <tag>listitem</tag> in the list; that will have the same + effect as what this PI was intended for.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>start="<replaceable>character</replaceable>"</term> + <listitem> + +<para>Specifies the character to use as the starting + number; use 0-9, a-z, A-Z, or lowercase or uppercase + Roman numerals</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Orderedlists.html#ListStartNum">List starting number</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_table-width"> +<refnamediv> +<refname>dbfo_table-width</refname> +<refpurpose>Specifies the width for a CALS table or for revhistory + output</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo table-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo table-width</tag> PI as a child or + sibling of a CALS <tag>table</tag>, or as a child of an + <tag>informaltable</tag>, <tag>entrytbl</tag>, or + <tag>revhistory</tag> instance (which is rendered as a table + in output) to specify the width of the table in output.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>table-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the table width (including units or as a percentage)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Tables.html#TableWidth">Table width</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_term-width"> +<refnamediv> +<refname>dbfo_term-width</refname> +<refpurpose>Specifies the term width for a variablelist</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo term-width="<replaceable>width</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo term-width</tag> PI as a child of a + <tag>variablelist</tag> to specify the width for + <tag>term</tag> output.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>term-width="<replaceable>width</replaceable>"</term> + <listitem> + +<para>Specifies the term width (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="Variablelists.html#ListIndents">Variable list formatting in print</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_toc"> +<refnamediv> +<refname>dbfo_toc</refname> +<refpurpose>Specifies whether a TOC should be generated for a qandaset</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo toc="0"|"1"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo toc</tag> PI as a child of a + <tag>qandaset</tag> to specify whether a table of contents + (TOC) is generated for the <tag>qandaset</tag>.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>toc="0"</term> + <listitem> + +<para>If zero, no TOC is generated</para> + + </listitem> + </varlistentry> + <varlistentry><term>toc="1"</term> + <listitem> + +<para>If <code>1</code> (or any non-zero value), + a TOC is generated</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="QandAtoc.html">Q and A list of questions</link>, + <link role="tcg" xlink:href="QandAformat.html">Q and A formatting</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo-need"> +<refnamediv> +<refname>dbfo-need</refname> +<refpurpose>Specify a need for space (a kind of soft page break)</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo-need height="<replaceable>n</replaceable>" [space-before="<replaceable>n</replaceable>"]</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>A “need” is a request for space on a page. If the + requested space is not available, the page breaks and the + content that follows the need request appears on the next + page. If the requested space is available, then no page break + is inserted.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>height="<replaceable>n</replaceable>"</term> + <listitem> + +<para>The amount of height needed (including units)</para> + + </listitem> + </varlistentry> + <varlistentry><term>space-before="<replaceable>n</replaceable>"</term> + <listitem> + +<para>The amount of extra vertical space to add (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="PageBreaking.html#SoftPageBreaks">Soft page breaks</link></para> + + </refsect1></refentry> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbfo_row-height"> +<refnamediv> +<refname>dbfo_row-height</refname> +<refpurpose>Specifies the height for a CALS table row</refpurpose> +</refnamediv> +<refsynopsisdiv> + + <synopsis><tag class="xmlpi">dbfo row-height="<replaceable>height</replaceable>"</tag></synopsis> + +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Use the <tag class="xmlpi">dbfo row-height</tag> PI as a child of a + <tag>row</tag> to specify the height of the row.</para> + + </refsect1><refsect1><title>Parameters</title> + +<variablelist> + <varlistentry><term>row-height="<replaceable>height</replaceable>"</term> + <listitem> + +<para>Specifies the row height (including units)</para> + + </listitem> + </varlistentry> + </variablelist> + + </refsect1><refsect1 role="tcg"><title>Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link></title> + +<para><link role="tcg" xlink:href="RowHeight.html">Row height</link></para> + + </refsect1></refentry> +</reference> + diff --git a/3rdParty/DocBook/XSL/fo/pi.xsl b/3rdParty/DocBook/XSL/fo/pi.xsl new file mode 100644 index 0000000..0541f5e --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/pi.xsl @@ -0,0 +1,1086 @@ +<?xml version='1.0'?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + exclude-result-prefixes="doc xlink" + version='1.0'> + +<!-- ******************************************************************** + $Id: pi.xsl 8394 2009-04-02 20:31:30Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<doc:reference xmlns=""><info><title>FO Processing Instruction Reference</title> + <releaseinfo role="meta"> + $Id: pi.xsl 8394 2009-04-02 20:31:30Z mzjn $ + </releaseinfo> + </info> + + <partintro id="partintro"> + <title>Introduction</title> + + <para>This is generated reference documentation for all + user-specifiable processing instructions (PIs) in the DocBook + XSL stylesheets for FO output. + <note> + <para>You add these PIs at particular points in a document to + cause specific “exceptions” to formatting/output behavior. To + make global changes in formatting/output behavior across an + entire document, it’s better to do it by setting an + appropriate stylesheet parameter (if there is one).</para> + </note> + </para> + </partintro> +</doc:reference> + +<!-- ==================================================================== --> + +<doc:pi name="dbfo_background-color" xmlns=""> + <refpurpose>Sets background color for an image</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo background-color</tag> PI before or + after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>, + <tag>imagedata</tag>, or <tag>videodata</tag> element) as a + sibling to the element, to set a background color for the + image.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo background-color="<replaceable>color</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>background-color="<replaceable>color</replaceable>"</term> + <listitem> + <para>An HTML color value</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="BGcolor.html" + >Background color</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_background-color"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'background-color'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_bgcolor" xmlns=""> + <refpurpose>Sets background color on a table row or table cell</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo bgcolor</tag> PI as child of a table row + or cell to set a background color for that table row or cell.</para> + <para>This PI works for both CALS and HTML tables.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo bgcolor="<replaceable>color</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term> + <listitem> + <para>An HTML color value</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="BGtableColor.html#CellBGColor" + >Cell background color</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_bgcolor"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'bgcolor'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_float-type" xmlns=""> + <refpurpose>Specifies float behavior for a sidebar</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo float-type</tag> PI to specify the float + behavior for a <tag>sidebar</tag> (to cause the sidebar to be + displayed as a marginal note).</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo float-type="margin.note"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>float-type="margin.note"</term> + <listitem> + <para>Specifies that the <tag>sidebar</tag> should be + displayed as a marginal note.</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>sidebar.float.type</parameter> (parameter), + <parameter>sidebar.float.width</parameter> (parameter), + <parameter>sidebar.properties</parameter> (attribute-set), + <parameter>sidebar.title.properties</parameter> (attribute-set) + </para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" xlink:href="SideFloats.html#SidebarFloats" >A sidebar as + side float</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_float-type"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'float-type'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_funcsynopsis-style" xmlns=""> + <refpurpose>Specifies presentation style for a funcsynopsis</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo funcsynopsis-style</tag> PI as a child of + a <tag>funcsynopsis</tag> or anywhere within a funcsynopsis + to control the presentation style for output of all + <tag>funcprototype</tag> instances within that funcsynopsis.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo funcsynopsis-style="kr"|"ansi"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>funcsynopsis-style="kr"</term> + <listitem> + <para>Displays <tag>funcprototype</tag> output in K&R style</para> + </listitem> + </varlistentry> + <varlistentry><term>funcsynopsis-style="ansi"</term> + <listitem> + <para>Displays <tag>funcprototype</tag> output in ANSI style</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>funcsynopsis.style</parameter></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_funcsynopsis-style"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'funcsynopsis-style'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_glossary-presentation" xmlns=""> + <refpurpose>Specifies presentation style for a glossary</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo glossary-presentation</tag> PI as a child of + a <tag>glossary</tag> to control its presentation style.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo glossary-presentation="list"|"blocks"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>glossary-presentation="list"</term> + <listitem> + <para>Displays the glossary as a list</para> + </listitem> + </varlistentry> + <varlistentry><term>glossary-presentation="blocks"</term> + <listitem> + <para>Displays the glossary as blocks</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>glossary.as.blocks</parameter></para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" xlink:href="Glossaries.html#GlossaryFormatPrint" >Glossary + formatting in print</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_glossary-presentation"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossary-presentation'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_glosslist-presentation" xmlns=""> + <refpurpose>Specifies presentation style for a glosslist</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo glosslist-presentation</tag> PI as a child of + a <tag>glosslist</tag> to control its presentation style.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo glosslist-presentation="list"|"blocks"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>glosslist-presentation="list"</term> + <listitem> + <para>Displays the glosslist as a list</para> + </listitem> + </varlistentry> + <varlistentry><term>glosslist-presentation="blocks"</term> + <listitem> + <para>Displays the glosslist as blocks</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>glosslist.as.blocks</parameter> </para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" xlink:href="Glossaries.html#GlossaryFormatPrint" >Glossary + formatting in print</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_glosslist-presentation"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glosslist-presentation'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_glossterm-width" xmlns=""> + <refpurpose>Specifies the glossterm width for a glossary or + glosslist</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo glossterm-width</tag> PI as a child of a + <tag>glossary</tag> or <tag>glosslist</tag> to specify the + width for output of <tag>glossterm</tag> instances in the + output.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo glossterm-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>glossterm-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the glossterm width (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>glossterm.width</parameter>, + <parameter>glossterm.separation</parameter> + </para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" xlink:href="Glossaries.html#GlossaryFormatPrint" >Glossary + formatting in print</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_glossterm-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_keep-together" xmlns=""> + <refpurpose>Specifies “keep” behavior for a table, example, + figure, equation, procedure, or task</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo keep-together</tag> PI as a child of a + formal object (<tag>table</tag>, <tag>example</tag>, + <tag>figure</tag>, <tag>equation</tag>, <tag>procedure</tag>, or + <tag>task</tag>) to specify “keep” behavior (to allow the object to + “break” across a page).</para> + <para>The PI also works with <tag>informaltable</tag>, <tag>informalexample</tag>, + <tag>informalfigure</tag> and <tag>informalequation</tag>. + </para> + + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo keep-together="auto"|"always"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>keep-together="auto"</term> + <listitem> + <para>Enables the object to break across a page</para> + </listitem> + </varlistentry> + <varlistentry><term>keep-together="always"</term> + <listitem> + <para>Prevents the object from breaking across a page (the + default stylesheet behavior)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para>formal.object.properties</para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" xlink:href="PageBreaking.html#KeepTogetherPI" + >Keep-together processing instruction</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_keep-together"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'keep-together'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_label-width" xmlns=""> + <refpurpose>Specifies the label width for a qandaset, itemizedlist, orderedlist + or calloutlist</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo label-width</tag> PI as a child of a + <tag>qandaset</tag>, <tag>itemizedlist</tag>, <tag>orderedlist</tag>, + or <tag>calloutlist</tag> to specify the width of labels.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo label-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>label-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the label width (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="QandAformat.html" + >Q and A formatting</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_label-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'label-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_linenumbering.everyNth" xmlns=""> + <refpurpose>Specifies interval for line numbers in verbatims</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo linenumbering.everyNth</tag> PI as a child + of a “verbatim” element – <tag>programlisting</tag>, + <tag>screen</tag>, <tag>synopsis</tag> — to specify + the interval at which lines are numbered.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term> + <listitem> + <para>Specifies numbering interval; a number is output + before every <replaceable>N</replaceable>th line</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>linenumbering.everyNth</parameter></para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="AnnotateListing.html#LineNumbering" + >Line numbering</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_linenumbering.everyNth"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_linenumbering.separator" xmlns=""> + <refpurpose>Specifies separator text for line numbers in verbatims</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo linenumbering.separator</tag> PI as a child + of a “verbatim” element – <tag>programlisting</tag>, + <tag>screen</tag>, <tag>synopsis</tag> — to specify + the separator text output between the line numbers and content.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term> + <listitem> + <para>Specifies the text (zero or more characters)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>linenumbering.separator</parameter></para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="AnnotateListing.html#LineNumbering" + >Line numbering</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_linenumbering.separator"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'linenumbering.separator'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_linenumbering.width" xmlns=""> + <refpurpose>Specifies width for line numbers in verbatims</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo linenumbering.width</tag> PI as a child + of a “verbatim” element – <tag>programlisting</tag>, + <tag>screen</tag>, <tag>synopsis</tag> — to specify + the width set aside for line numbers.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the width (inluding units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>linenumbering.width</parameter></para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="AnnotateListing.html#LineNumbering" + >Line numbering</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_linenumbering.width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'linenumbering.width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_list-presentation" xmlns=""> + <refpurpose>Specifies presentation style for a variablelist or + segmentedlist</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo list-presentation</tag> PI as a child of + a <tag>variablelist</tag> or <tag>segmentedlist</tag> to + control the presentation style for the list (to cause it, for + example, to be displayed as a table).</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo list-presentation="list"|"blocks"|"table"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>list-presentation="list"</term> + <listitem> + <para>Displays the list as a list</para> + </listitem> + </varlistentry> + <varlistentry><term>list-presentation="blocks"</term> + <listitem> + <para>(<tag>variablelist</tag> only) Displays the list as blocks</para> + </listitem> + </varlistentry> + <varlistentry><term>list-presentation="table"</term> + <listitem> + <para>(<tag>segmentedlist</tag> only) Displays the list as a table</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <itemizedlist> + <listitem> + <para><parameter>variablelist.as.blocks</parameter></para> + </listitem> + <listitem> + <para><parameter>variablelist.as.table</parameter></para> + </listitem> + </itemizedlist> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="Variablelists.html#ListIndents" + >Variable list formatting in print</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_list-presentation"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'list-presentation'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_list-width" xmlns=""> + <refpurpose>Specifies the width of a horizontal simplelist</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo list-width</tag> PI as a child of a + <tag>simplelist</tag> whose <tag class="attribute">class</tag> + value is <literal>horizontal</literal>, to specify the width + of the <tag>simplelist</tag>.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo list-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>list-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the <tag>simplelist</tag> width (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> +</doc:pi> +<xsl:template name="pi.dbfo_list-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'list-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_orientation" xmlns=""> + <refpurpose>Specifies the orientation for a CALS table row or cell</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo orientation</tag> PI as a child of a CALS + <tag>table</tag> row or cell to specify the orientation + (rotation) for the row or cell.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</term> + <listitem> + <para>Specifies the number of degrees by which the cell or + row is rotated</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> +</doc:pi> +<xsl:template name="pi.dbfo_orientation"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'orientation'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_pgwide" xmlns=""> + <refpurpose>Specifies if an <tag>equation</tag> or <tag>example</tag> goes across full page width</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo pgwide</tag> PI as a child of an + <tag>equation</tag> or <tag>example</tag> to specify that the + content should rendered across the full width of the page.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo pgwide="0"|"1"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>pgwide="0"</term> + <listitem> + <para>If zero, the content is rendered across the current + text flow</para> + </listitem> + </varlistentry> + <varlistentry><term>pgwide="1"</term> + <listitem> + <para>If <code>1</code> (or any non-zero value), the + content is rendered across the full width of the page</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>pgwide.properties</parameter></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_pgwide"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'pgwide'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_rotated-width" xmlns=""> + <refpurpose>Specifies the width for a CALS table <tag>entry</tag> or + <tag>row</tag></refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo rotated-width</tag> PI as a child of + <tag>entry</tag> or <tag>row</tag> instance in a CALS table to specify the + width of that the <tag>entry</tag> or <tag>row</tag>; or + use it higher up in table to cause the width to be inherited + recursively down.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo rotated-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>rotated-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the width of a row or cell (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> +</doc:pi> +<xsl:template name="pi.dbfo_rotated-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'rotated-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_sidebar-width" xmlns=""> + <refpurpose>Specifies the width of a sidebar</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo sidebar-width</tag> PI as a child of a + <tag>sidebar</tag> to specify the width of the sidebar.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo sidebar-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>sidebar-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the <tag>sidebar</tag> width (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="params"> + <para><parameter>sidebar.float.type parameter</parameter>, + <parameter>sidebar.float.width parameter</parameter>, + <parameter>sidebar.properties attribute-set</parameter>, + <parameter>sidebar.title.properties</parameter> + </para> + </refsee> + <refsee role="tcg"> + <para><link role="tcg" xlink:href="SideFloats.html#SidebarFloats" >A sidebar as + side float</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_sidebar-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'sidebar-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_start" xmlns=""> + <refpurpose>(obsolete) Sets the starting number on an ordered list</refpurpose> + <refdescription> + <para><emphasis>This PI is obsolete</emphasis>. The intent of + it was to provide a means for setting a specific starting + number for an ordered list. Instead of this PI, set a value + for the <literal>override</literal> attribute on the first + <tag>listitem</tag> in the list; that will have the same + effect as what this PI was intended for.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo start="<replaceable>character</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>start="<replaceable>character</replaceable>"</term> + <listitem> + <para>Specifies the character to use as the starting + number; use 0-9, a-z, A-Z, or lowercase or uppercase + Roman numerals</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="Orderedlists.html#ListStartNum" + >List starting number</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_start"> + <xsl:param name="node" select="."/> + <xsl:call-template name="pi-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'start'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_table-width" xmlns=""> + <refpurpose>Specifies the width for a CALS table or for revhistory + output</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo table-width</tag> PI as a child or + sibling of a CALS <tag>table</tag>, or as a child of an + <tag>informaltable</tag>, <tag>entrytbl</tag>, or + <tag>revhistory</tag> instance (which is rendered as a table + in output) to specify the width of the table in output.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo table-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>table-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the table width (including units or as a percentage)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="Tables.html#TableWidth" + >Table width</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_table-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'table-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_term-width" xmlns=""> + <refpurpose>Specifies the term width for a variablelist</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo term-width</tag> PI as a child of a + <tag>variablelist</tag> to specify the width for + <tag>term</tag> output.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo term-width="<replaceable>width</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>term-width="<replaceable>width</replaceable>"</term> + <listitem> + <para>Specifies the term width (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="Variablelists.html#ListIndents" + >Variable list formatting in print</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_term-width"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'term-width'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo_toc" xmlns=""> + <refpurpose>Specifies whether a TOC should be generated for a qandaset</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo toc</tag> PI as a child of a + <tag>qandaset</tag> to specify whether a table of contents + (TOC) is generated for the <tag>qandaset</tag>.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo toc="0"|"1"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>toc="0"</term> + <listitem> + <para>If zero, no TOC is generated</para> + </listitem> + </varlistentry> + <varlistentry><term>toc="1"</term> + <listitem> + <para>If <code>1</code> (or any non-zero value), + a TOC is generated</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="QandAtoc.html" + >Q and A list of questions</link>, + <link role="tcg" + xlink:href="QandAformat.html" + >Q and A formatting</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_toc"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'toc'"/> + </xsl:call-template> +</xsl:template> + +<doc:pi name="dbfo-need" xmlns=""> + <refpurpose>Specify a need for space (a kind of soft page break)</refpurpose> + <refdescription> + <para>A “need” is a request for space on a page. If the + requested space is not available, the page breaks and the + content that follows the need request appears on the next + page. If the requested space is available, then no page break + is inserted.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo-need height="<replaceable>n</replaceable>" [space-before="<replaceable>n</replaceable>"]</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>height="<replaceable>n</replaceable>"</term> + <listitem> + <para>The amount of height needed (including units)</para> + </listitem> + </varlistentry> + <varlistentry><term>space-before="<replaceable>n</replaceable>"</term> + <listitem> + <para>The amount of extra vertical space to add (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="PageBreaking.html#SoftPageBreaks" + >Soft page breaks</link></para> + </refsee> +</doc:pi> + +<doc:pi name="dbfo_row-height" xmlns=""> + <refpurpose>Specifies the height for a CALS table row</refpurpose> + <refdescription> + <para>Use the <tag class="xmlpi">dbfo row-height</tag> PI as a child of a + <tag>row</tag> to specify the height of the row.</para> + </refdescription> + <refsynopsisdiv> + <synopsis><tag class="xmlpi">dbfo row-height="<replaceable>height</replaceable>"</tag></synopsis> + </refsynopsisdiv> + <refparameter> + <variablelist> + <varlistentry><term>row-height="<replaceable>height</replaceable>"</term> + <listitem> + <para>Specifies the row height (including units)</para> + </listitem> + </varlistentry> + </variablelist> + </refparameter> + <refsee role="tcg"> + <para><link role="tcg" + xlink:href="RowHeight.html" + >Row height</link></para> + </refsee> +</doc:pi> +<xsl:template name="pi.dbfo_row-height"> + <xsl:param name="node" select="."/> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'row-height'"/> + </xsl:call-template> +</xsl:template> + + +<xsl:template name="pi.dbfo-need"> + <xsl:variable name="pi-height"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="."/> + <xsl:with-param name="attribute" select="'height'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="height"> + <xsl:choose> + <xsl:when test="$pi-height != ''"> + <xsl:value-of select="$pi-height"/> + </xsl:when> + <xsl:otherwise>0pt</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="pi-before"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" select="."/> + <xsl:with-param name="attribute" select="'space-before'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="spacer"> + <fo:block-container width="100%" height="{$height}"> + <fo:block><fo:leader leader-length="0pt"/></fo:block> + </fo:block-container> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$fop.extensions != 0"> + <!-- Doesn't work in fop --> + </xsl:when> + <xsl:when test="$pi-before != '' and + not(following-sibling::listitem) and + not(following-sibling::step)"> + <fo:block space-after="0pt" space-before="{$pi-before}"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:when> + <xsl:when test="following-sibling::para"> + <fo:block space-after="0pt" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:when> + <xsl:when test="following-sibling::table or + following-sibling::figure or + following-sibling::example or + following-sibling::equation"> + <fo:block space-after="0pt" + xsl:use-attribute-sets="formal.object.properties"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:when> + <xsl:when test="following-sibling::informaltable or + following-sibling::informalfigure or + following-sibling::informalexample or + following-sibling::informalequation"> + <fo:block space-after="0pt" + xsl:use-attribute-sets="informal.object.properties"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:when> + <xsl:when test="following-sibling::itemizedlist or + following-sibling::orderedlist or + following-sibling::variablelist or + following-sibling::simplelist"> + <fo:block space-after="0pt" + xsl:use-attribute-sets="informal.object.properties"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:when> + <xsl:when test="following-sibling::listitem or + following-sibling::step"> + <fo:list-item space-after="0pt" + xsl:use-attribute-sets="informal.object.properties"> + <fo:list-item-label/> + <fo:list-item-body start-indent="0pt" end-indent="0pt"> + <xsl:copy-of select="$spacer"/> + </fo:list-item-body> + </fo:list-item> + </xsl:when> + <xsl:when test="following-sibling::sect1 or + following-sibling::sect2 or + following-sibling::sect3 or + following-sibling::sect4 or + following-sibling::sect5 or + following-sibling::section"> + <fo:block space-after="0pt" + xsl:use-attribute-sets="section.title.properties"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block space-after="0pt" space-before="0em"> + <xsl:copy-of select="$spacer"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="$fop.extensions != 0"> + <!-- Doesn't work in fop --> + </xsl:when> + <xsl:when test="following-sibling::listitem or + following-sibling::step"> + <fo:list-item space-before.precedence="force" + space-before="-{$height}" + space-after="0pt" + space-after.precedence="force"> + <fo:list-item-label/> + <fo:list-item-body start-indent="0pt" end-indent="0pt"/> + </fo:list-item> + </xsl:when> + <xsl:otherwise> + <fo:block space-before.precedence="force" + space-before="-{$height}" + space-after="0pt" + space-after.precedence="force"> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="dbfo-attribute"> + <!-- * dbfo-attribute is an interal utility template for retrieving --> + <!-- * pseudo-attributes/parameters from PIs --> + <xsl:param name="pis" select="processing-instruction('dbfo')"/> + <xsl:param name="attribute">filename</xsl:param> + <xsl:call-template name="pi-attribute"> + <xsl:with-param name="pis" select="$pis"/> + <xsl:with-param name="attribute" select="$attribute"/> + </xsl:call-template> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="processing-instruction()"> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="processing-instruction('dbfo-need')"> + <xsl:call-template name="pi.dbfo-need"/> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/profile-docbook.xsl b/3rdParty/DocBook/XSL/fo/profile-docbook.xsl new file mode 100644 index 0000000..b8ebc03 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/profile-docbook.xsl @@ -0,0 +1,288 @@ +<?xml version="1.0" encoding="US-ASCII"?> +<!--This file was created automatically by xsl2profile--> +<!--from the DocBook XSL stylesheets.--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="db ng exsl exslt" version="1.0"> + +<!-- It is important to use indent="no" here, otherwise verbatim --> +<!-- environments get broken by indented tags...at least when the --> +<!-- callout extension is used...at least with some processors --> +<xsl:output method="xml" indent="no"/> + +<!-- ******************************************************************** + $Id: docbook.xsl 8414 2009-04-18 22:40:23Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:include href="../VERSION"/> +<xsl:include href="param.xsl"/> +<xsl:include href="../lib/lib.xsl"/> +<xsl:include href="../common/l10n.xsl"/> +<xsl:include href="../common/common.xsl"/> +<xsl:include href="../common/utility.xsl"/> +<xsl:include href="../common/labels.xsl"/> +<xsl:include href="../common/titles.xsl"/> +<xsl:include href="../common/subtitles.xsl"/> +<xsl:include href="../common/gentext.xsl"/> +<xsl:include href="../common/olink.xsl"/> +<xsl:include href="../common/targets.xsl"/> +<xsl:include href="../common/pi.xsl"/> +<xsl:include href="autotoc.xsl"/> +<xsl:include href="autoidx.xsl"/> +<xsl:include href="lists.xsl"/> +<xsl:include href="callout.xsl"/> +<xsl:include href="verbatim.xsl"/> +<xsl:include href="graphics.xsl"/> +<xsl:include href="xref.xsl"/> +<xsl:include href="formal.xsl"/> +<xsl:include href="table.xsl"/> +<xsl:include href="htmltbl.xsl"/> +<xsl:include href="sections.xsl"/> +<xsl:include href="inline.xsl"/> +<xsl:include href="footnote.xsl"/> +<xsl:include href="fo.xsl"/> +<xsl:include href="fo-rtf.xsl"/> +<xsl:include href="info.xsl"/> +<xsl:include href="keywords.xsl"/> +<xsl:include href="division.xsl"/> +<xsl:include href="index.xsl"/> +<xsl:include href="toc.xsl"/> +<xsl:include href="refentry.xsl"/> +<xsl:include href="math.xsl"/> +<xsl:include href="admon.xsl"/> +<xsl:include href="component.xsl"/> +<xsl:include href="biblio.xsl"/> +<xsl:include href="biblio-iso690.xsl"/> +<xsl:include href="glossary.xsl"/> +<xsl:include href="block.xsl"/> +<xsl:include href="task.xsl"/> +<xsl:include href="qandaset.xsl"/> +<xsl:include href="synop.xsl"/> +<xsl:include href="titlepage.xsl"/> +<xsl:include href="titlepage.templates.xsl"/> +<xsl:include href="pagesetup.xsl"/> +<xsl:include href="pi.xsl"/> +<xsl:include href="spaces.xsl"/> +<xsl:include href="ebnf.xsl"/> +<xsl:include href="../html/chunker.xsl"/> +<xsl:include href="annotations.xsl"/> +<xsl:include href="../common/stripns.xsl"/> + +<xsl:include href="fop.xsl"/> +<xsl:include href="fop1.xsl"/> +<xsl:include href="passivetex.xsl"/> +<xsl:include href="xep.xsl"/> +<xsl:include href="axf.xsl"/> +<xsl:include href="ptc.xsl"/> + +<xsl:param name="stylesheet.result.type" select="'fo'"/> + +<!-- ==================================================================== --> + +<xsl:key name="id" match="*" use="@id|@xml:id"/> + +<!-- ==================================================================== --> + +<xsl:template match="*"> + <xsl:message> + <xsl:text>Element </xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text> in namespace '</xsl:text> + <xsl:value-of select="namespace-uri(.)"/> + <xsl:text>' encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> + </xsl:message> + + <fo:block color="red"> + <xsl:text><</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>></xsl:text> + <xsl:apply-templates/> + <xsl:text></</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>></xsl:text> + </fo:block> +</xsl:template> + +<!-- Update this list if new root elements supported --> +<xsl:variable name="root.elements" select="' appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex '"/> + +<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/"> + <!-- * Get a title for current doc so that we let the user --> + <!-- * know what document we are processing at this point. --> + <xsl:variable name="doc.title"> + <xsl:call-template name="get.doc.title"/> + </xsl:variable> + <xsl:choose> + <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, + toss the namespace and continue. Use the docbook5 namespaced + stylesheets for DocBook5 if you don't want to use this feature.--> + <xsl:when test="false()"/> + <!-- Can't process unless namespace removed --> + <xsl:when test="false()"/> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:variable name="root.element" select="key('id', $rootid)"/> + <xsl:choose> + <xsl:when test="count($root.element) = 0"> + <xsl:message terminate="yes"> + <xsl:text>ID '</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>' not found in document.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:when test="not(contains($root.elements, concat(' ', local-name($root.element), ' ')))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: Document root element ($rootid=</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>) for FO output </xsl:text> + <xsl:text>must be one of the following elements:</xsl:text> + <xsl:value-of select="$root.elements"/> + </xsl:message> + </xsl:when> + <!-- Otherwise proceed --> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'"> + <xsl:apply-templates select="$root.element" mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="$root.element" mode="process.root"/> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <!-- Otherwise process the document root element --> + <xsl:otherwise> + <xsl:variable name="document.element" select="*[1]"/> + <xsl:choose> + <xsl:when test="not(contains($root.elements, concat(' ', local-name($document.element), ' ')))"> + <xsl:message terminate="yes"> + <xsl:text>ERROR: Document root element for FO output </xsl:text> + <xsl:text>must be one of the following elements:</xsl:text> + <xsl:value-of select="$root.elements"/> + </xsl:message> + </xsl:when> + <!-- Otherwise proceed --> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'"> + <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="$profiled-nodes" mode="process.root"/> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="process.root"> + <xsl:variable name="document.element" select="self::*"/> + + <xsl:call-template name="root.messages"/> + + <xsl:variable name="title"> + <xsl:choose> + <xsl:when test="$document.element/title[1]"> + <xsl:value-of select="$document.element/title[1]"/> + </xsl:when> + <xsl:otherwise>[could not find document title]</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Include all id values in XEP output --> + <xsl:if test="$xep.extensions != 0"> + <xsl:processing-instruction name="xep-pdf-drop-unused-destinations">false</xsl:processing-instruction> + </xsl:if> + + <fo:root xsl:use-attribute-sets="root.properties"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="target" select="/*[1]"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:if test="$xep.extensions != 0"> + <xsl:call-template name="xep-pis"/> + <xsl:call-template name="xep-document-information"/> + </xsl:if> + <xsl:if test="$axf.extensions != 0"> + <xsl:call-template name="axf-document-information"/> + </xsl:if> + + <xsl:call-template name="setup.pagemasters"/> + + <xsl:if test="$fop.extensions != 0"> + <xsl:apply-templates select="$document.element" mode="fop.outline"/> + </xsl:if> + + <xsl:if test="$fop1.extensions != 0"> + <xsl:call-template name="fop1-document-information"/> + <xsl:variable name="bookmarks"> + <xsl:apply-templates select="$document.element" mode="fop1.outline"/> + </xsl:variable> + <xsl:if test="string($bookmarks) != ''"> + <fo:bookmark-tree> + <xsl:copy-of select="$bookmarks"/> + </fo:bookmark-tree> + </xsl:if> + </xsl:if> + + <xsl:if test="$xep.extensions != 0"> + <xsl:variable name="bookmarks"> + <xsl:apply-templates select="$document.element" mode="xep.outline"/> + </xsl:variable> + <xsl:if test="string($bookmarks) != ''"> + <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions"> + <xsl:copy-of select="$bookmarks"/> + </rx:outline> + </xsl:if> + </xsl:if> + + <xsl:if test="$arbortext.extensions != 0 and $ati.xsl11.bookmarks != 0"> + <xsl:variable name="bookmarks"> + <xsl:apply-templates select="$document.element" mode="ati.xsl11.bookmarks"/> + </xsl:variable> + <xsl:if test="string($bookmarks) != ''"> + <fo:bookmark-tree> + <xsl:copy-of select="$bookmarks"/> + </fo:bookmark-tree> + </xsl:if> + </xsl:if> + + <xsl:apply-templates select="$document.element"/> + </fo:root> +</xsl:template> + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <xsl:message> + <xsl:text>Making </xsl:text> + <xsl:value-of select="$page.orientation"/> + <xsl:text> pages on </xsl:text> + <xsl:value-of select="$paper.type"/> + <xsl:text> paper (</xsl:text> + <xsl:value-of select="$page.width"/> + <xsl:text>x</xsl:text> + <xsl:value-of select="$page.height"/> + <xsl:text>)</xsl:text> + </xsl:message> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/ptc.xsl b/3rdParty/DocBook/XSL/fo/ptc.xsl new file mode 100644 index 0000000..a8874d8 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/ptc.xsl @@ -0,0 +1,77 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<!-- ================================================================ --> +<!-- --> +<!-- PTC/Arbortext Code for XSL 1.1 bookmark support --> +<!-- --> +<!-- ================================================================ --> + +<xsl:param name="ati.xsl11.bookmarks" select="1"/> + +<xsl:variable name="ati-a-dia" select= +"'āăąćĉċčďđēĕėęěœĝğġģĥħĩīĭįıĵķĺļľŀłńņňŋōŏőŕŗřśŝşšţťŧũūŭůűųŵŷźżžĀĂĄĆĈĊČĎĐĒĔĖĘĚŒĜĞĠĢĤĦĨĪĬĮİĴĶĹĻĽĿŁŃŅŇŊŌŎŐŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ'"/> + +<xsl:variable name="ati-a-asc" select= +"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/> + +<xsl:template match="*" mode="ati.xsl11.bookmarks"> + <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/> +</xsl:template> + +<xsl:template match="set|book|part|reference|preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry + |sect1|sect2|sect3|sect4|sect5|section" + mode="ati.xsl11.bookmarks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="bookmark-label"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:variable> + + <!-- Put the root element bookmark at the same level as its children --> + <!-- If the object is a set or book, generate a bookmark for the toc --> + + <xsl:choose> + <xsl:when test="self::index and $generate.index = 0"/> + <xsl:when test="parent::*"> + <fo:bookmark internal-destination="{$id}"> + <fo:bookmark-title> + <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/> + </fo:bookmark-title> + <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/> + </fo:bookmark> + </xsl:when> + <xsl:otherwise> + <fo:bookmark internal-destination="{$id}"> + <fo:bookmark-title> + <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/> + </fo:bookmark-title> + </fo:bookmark> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="contains($toc.params, 'toc') + and section|sect1|refentry + |article|bibliography|glossary + |appendix"> + <fo:bookmark internal-destination="toc...{$id}"> + <fo:bookmark-title> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </fo:bookmark-title> + </fo:bookmark> + </xsl:if> + <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/qandaset.xsl b/3rdParty/DocBook/XSL/fo/qandaset.xsl new file mode 100644 index 0000000..cbf118a --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/qandaset.xsl @@ -0,0 +1,395 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: qandaset.xsl 8350 2009-03-17 07:24:29Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="qandaset" name="process.qandaset"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label-length"> + <xsl:call-template name="qandaset.label.length"/> + </xsl:variable> + + <xsl:variable name="toc"> + <xsl:call-template name="pi.dbfo_toc"/> + </xsl:variable> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="content"> + <fo:block id="{$id}"> + <xsl:choose> + <xsl:when test="parent::*"> + <xsl:if test="blockinfo/title|info/title|title"> + <xsl:apply-templates select="(blockinfo/title| + info/title|title)[1]"/> + </xsl:if> + </xsl:when> + <!-- If it is the root element --> + <xsl:otherwise> + <xsl:call-template name="qandaset.titlepage"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') + or $toc = '1'"> + <xsl:call-template name="qandaset.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:if> + + <xsl:call-template name="qandaset.toc.separator"/> + + <xsl:apply-templates select="*[local-name(.) != 'title' + and local-name(.) != 'titleabbrev' + and local-name(.) != 'qandadiv' + and local-name(.) != 'qandaentry']"/> + <xsl:apply-templates select="qandadiv"/> + + <xsl:if test="qandaentry"> + <fo:list-block xsl:use-attribute-sets="list.block.spacing" + provisional-label-separation="0.2em"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:choose> + <xsl:when test="$label-length != ''"> + <xsl:value-of select="$label-length"/> + </xsl:when> + <xsl:otherwise>2.5em</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:apply-templates select="qandaentry"/> + </fo:list-block> + </xsl:if> + </fo:block> + </xsl:variable> + + <xsl:choose> + <xsl:when test="parent::*"> + <xsl:copy-of select="$content"/> + </xsl:when> + <!-- Otherwise create a page sequence --> + <xsl:otherwise> + <xsl:apply-templates select="." mode="page.sequence"> + <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="master-reference" select="'body'"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template name="qandaset.label.length"> + <xsl:param name="deflabel"> + <xsl:apply-templates select="." mode="qanda.defaultlabel"/> + </xsl:param> + + <xsl:variable name="label-width"> + <xsl:call-template name="pi.dbfo_label-width"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$label-width != ''"> + <xsl:value-of select="$label-width"/> + </xsl:when> + <xsl:when test="descendant::label"> + <xsl:call-template name="longest.term"> + <xsl:with-param name="terms" select="descendant::label"/> + <xsl:with-param name="maxlength" select="20"/> + </xsl:call-template> + <xsl:text>em * 0.50</xsl:text> + </xsl:when> + <xsl:when test="contains($deflabel, 'qnumber') and + $qandadiv.autolabel != 0 and + $qanda.inherit.numeration != 0"> + <xsl:text>5em</xsl:text> + </xsl:when> + <xsl:when test="$deflabel ='qnumber' and + $qandadiv.autolabel != 0 and + $qanda.inherit.numeration != 0"> + <xsl:text>4em</xsl:text> + </xsl:when> + <xsl:when test="$deflabel = 'number'"> + <xsl:text>3em</xsl:text> + </xsl:when> + <xsl:otherwise>2.5em</xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="qandaset/blockinfo/title|qandset/info/title|qandaset/title"> + <xsl:variable name="enclsect" select="(ancestor::section + | ancestor::simplesect + | ancestor::sect5 + | ancestor::sect4 + | ancestor::sect3 + | ancestor::sect2 + | ancestor::sect1 + | ancestor::refsect3 + | ancestor::refsect2 + | ancestor::refsect1)[last()]"/> + <xsl:variable name="sectlvl"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$enclsect"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="qanda.heading"> + <xsl:with-param name="level" select="$sectlvl + 1"/> + <xsl:with-param name="marker" select="0"/> + <xsl:with-param name="title"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="qandaset/blockinfo|qandaset/info"> + <!-- what should this template really do? --> + <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="qandadiv"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + + <xsl:variable name="label-length"> + <xsl:call-template name="qandaset.label.length"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/> + <xsl:apply-templates select="*[local-name(.) != 'title' + and local-name(.) != 'titleabbrev' + and local-name(.) != 'qandadiv' + and local-name(.) != 'qandaentry']"/> + <fo:block> + <xsl:apply-templates select="qandadiv"/> + + <xsl:if test="qandaentry"> + <fo:list-block xsl:use-attribute-sets="list.block.spacing" + provisional-label-separation="0.2em"> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:choose> + <xsl:when test="$label-length != ''"> + <xsl:value-of select="$label-length"/> + </xsl:when> + <xsl:otherwise>2.5em</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:apply-templates select="qandaentry"/> + </fo:list-block> + </xsl:if> + </fo:block> + </fo:block> +</xsl:template> + +<xsl:template match="qandadiv/blockinfo/title|qandadiv/info/title|qandadiv/title"> + <xsl:variable name="enclsect" select="(ancestor::section + | ancestor::simplesect + | ancestor::sect5 + | ancestor::sect4 + | ancestor::sect3 + | ancestor::sect2 + | ancestor::sect1 + | ancestor::refsect3 + | ancestor::refsect2 + | ancestor::refsect1)[last()]"/> + <xsl:variable name="sectlvl"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$enclsect"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="qanda.heading"> + <xsl:with-param name="level" select="$sectlvl + 1 + count(ancestor::qandadiv)"/> + <xsl:with-param name="marker" select="0"/> + <xsl:with-param name="title"> + <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/> + <xsl:if test="$qandadiv.autolabel != 0"> + <xsl:apply-templates select="." mode="intralabel.punctuation"/> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="qandaentry"> + <!-- Omit revhistory from fo:list-block because it is a table --> + <xsl:apply-templates select="question|answer"/> +</xsl:template> + +<xsl:template match="question"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="entry.id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="parent::*"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="deflabel"> + <xsl:apply-templates select="." mode="qanda.defaultlabel"/> + </xsl:variable> + + + <xsl:variable name="label.content"> + <xsl:apply-templates select="." mode="label.markup"/> + <xsl:if test="contains($deflabel, 'number') and not(label)"> + <xsl:apply-templates select="." mode="intralabel.punctuation"/> + </xsl:if> + </xsl:variable> + + <fo:list-item id="{$entry.id}" xsl:use-attribute-sets="list.item.spacing"> + <fo:list-item-label id="{$id}" end-indent="label-end()"> + <xsl:if test="string-length($label.content) > 0"> + <fo:block font-weight="bold"> + <xsl:copy-of select="$label.content"/> + </fo:block> + </xsl:if> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <xsl:choose> + <xsl:when test="$deflabel = 'none' and not(label)"> + <fo:block font-weight="bold"> + <xsl:apply-templates select="*[local-name(.)!='label']"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="*[local-name(.)!='label']"/> + </xsl:otherwise> + </xsl:choose> + <!-- Uncomment this line to get revhistory output in the question --> + <!-- <xsl:apply-templates select="preceding-sibling::revhistory"/> --> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<xsl:template match="answer"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="entry.id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="parent::*"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="deflabel"> + <xsl:apply-templates select="." mode="qanda.defaultlabel"/> + </xsl:variable> + + <xsl:variable name="answer.label"> + <xsl:apply-templates select="." mode="label.markup"/> + </xsl:variable> + + <fo:list-item xsl:use-attribute-sets="list.item.spacing"> + <fo:list-item-label id="{$id}" end-indent="label-end()"> + <xsl:choose> + <xsl:when test="string-length($answer.label) > 0"> + <fo:block font-weight="bold"> + <xsl:copy-of select="$answer.label"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block/> + </xsl:otherwise> + </xsl:choose> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <xsl:apply-templates select="*[local-name(.)!='label' and local-name(.) != 'qandaentry']"/> + <!-- * handle nested answer/qandaentry instances --> + <!-- * (bug 1509043 from Daniel Leidert) --> + <xsl:if test="descendant::question"> + <xsl:call-template name="process.qandaset"/> + </xsl:if> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<xsl:template match="*" mode="qanda.defaultlabel"> + <xsl:choose> + <xsl:when test="ancestor-or-self::*[@defaultlabel]"> + <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()] + /@defaultlabel"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$qanda.defaultlabel"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="label"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template name="qanda.heading"> + <xsl:param name="level" select="1"/> + <xsl:param name="marker" select="0"/> + <xsl:param name="title"/> + <xsl:param name="titleabbrev"/> + + <fo:block xsl:use-attribute-sets="qanda.title.properties"> + <xsl:if test="$marker != 0"> + <fo:marker marker-class-name="section.head.marker"> + <xsl:choose> + <xsl:when test="$titleabbrev = ''"> + <xsl:value-of select="$title"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$titleabbrev"/> + </xsl:otherwise> + </xsl:choose> + </fo:marker> + </xsl:if> + <xsl:choose> + <xsl:when test="$level=1"> + <fo:block xsl:use-attribute-sets="qanda.title.level1.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=2"> + <fo:block xsl:use-attribute-sets="qanda.title.level2.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=3"> + <fo:block xsl:use-attribute-sets="qanda.title.level3.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=4"> + <fo:block xsl:use-attribute-sets="qanda.title.level4.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=5"> + <fo:block xsl:use-attribute-sets="qanda.title.level5.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block xsl:use-attribute-sets="qanda.title.level6.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/refentry.xsl b/3rdParty/DocBook/XSL/fo/refentry.xsl new file mode 100644 index 0000000..96e2592 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/refentry.xsl @@ -0,0 +1,637 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: refentry.xsl 7564 2007-11-19 18:38:43Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="reference"> + <xsl:if test="not(partintro)"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}"> + <xsl:call-template name="reference.titlepage"/> + </fo:block> + <!-- Create one page sequence if no pagebreaks needed --> + <xsl:if test="$refentry.pagebreak = 0"> + <xsl:apply-templates select="refentry"/> + </xsl:if> + </fo:flow> + </fo:page-sequence> + </xsl:if> + <xsl:apply-templates select="partintro"/> + <xsl:if test="$refentry.pagebreak != 0"> + <xsl:apply-templates select="refentry"/> + </xsl:if> +</xsl:template> + +<xsl:template match="reference" mode="reference.titlepage.mode"> + <xsl:call-template name="reference.titlepage"/> +</xsl:template> + +<xsl:template match="reference/partintro"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="ancestor::reference"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + <fo:block id="{$id}"> + <xsl:apply-templates select=".." mode="reference.titlepage.mode"/> + </fo:block> + <xsl:if test="title"> + <xsl:call-template name="partintro.titlepage"/> + </xsl:if> + <xsl:apply-templates/> + <!-- Create one page sequence if no pagebreaks needed --> + <xsl:if test="$refentry.pagebreak = 0"> + <xsl:apply-templates select="../refentry"/> + </xsl:if> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template> +<xsl:template match="reference/info"></xsl:template> +<xsl:template match="reference/title"></xsl:template> +<xsl:template match="reference/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="refentry"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <xsl:variable name="refentry.content"> + <fo:block id="{$id}"> + <xsl:apply-templates/> + </fo:block> + </xsl:variable> + + <xsl:choose> + <xsl:when test="not(parent::*) or + (parent::reference and $refentry.pagebreak != 0) or + parent::part"> + <!-- make a page sequence --> + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <xsl:copy-of select="$refentry.content"/> + </fo:flow> + </fo:page-sequence> + </xsl:when> + <xsl:otherwise> + <fo:block> + <xsl:if test="$refentry.pagebreak != 0"> + <xsl:attribute name="break-before">page</xsl:attribute> + </xsl:if> + <xsl:copy-of select="$refentry.content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="refmeta"> +</xsl:template> + +<xsl:template match="manvolnum"> + <xsl:if test="$refentry.xref.manvolnum != 0"> + <xsl:text>(</xsl:text> + <xsl:apply-templates/> + <xsl:text>)</xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="refmiscinfo"> +</xsl:template> + +<xsl:template match="refentrytitle"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<xsl:template match="refnamediv"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + + <!-- if refentry.generate.name is non-zero, then we need to generate a --> + <!-- localized "Name" subheading for this refnamdiv (unless it has a --> + <!-- preceding sibling that is a refnamediv, in which case we have already --> + <!-- generated a "Name" subheading, so we don't need to do it again --> + <xsl:if test="$refentry.generate.name != 0"> + <xsl:choose> + <xsl:when test="preceding-sibling::refnamediv"> + <!-- no generated title on secondary refnamedivs! --> + </xsl:when> + <xsl:otherwise> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" + xsl:use-attribute-sets="refnamediv.titlepage.recto.style" + font-family="{$title.fontset}"> + <!-- Contents of what is now the format.refentry.subheading --> + <!-- template were formerly intended to be used only to --> + <!-- process those subsections of Refentry that have "real" --> + <!-- title children. So as a kludge to get around the fact --> + <!-- that the template still basically "expects" to be --> + <!-- processing that kind of a node, when we call the --> + <!-- template to process generated titles, we must call it --> + <!-- with values for the "offset" and "section" parameters --> + <!-- that are different from the default values in the --> + <!-- format.refentry.subheading template itself. Because --> + <!-- those defaults are the values appropriate for processing --> + <!-- "real" title nodes. --> + <xsl:call-template name="format.refentry.subheading"> + <xsl:with-param name="section" select="self::*"/> + <xsl:with-param name="offset" select="1"/> + <xsl:with-param name="gentext.key" select="'RefName'"/> + </xsl:call-template> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + + <xsl:if test="$refentry.generate.title != 0"> + <xsl:variable name="section.level"> + <xsl:call-template name="refentry.level"> + <xsl:with-param name="node" select="ancestor::refentry"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="reftitle"> + <xsl:choose> + <xsl:when test="../refmeta/refentrytitle"> + <xsl:apply-templates select="../refmeta/refentrytitle"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="refname[1]"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- xsl:use-attribute-sets takes only a Qname, not a variable --> + <xsl:choose> + <xsl:when test="preceding-sibling::refnamediv"> + <!-- no title on secondary refnamedivs! --> + </xsl:when> + <xsl:when test="$section.level = 1"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> + <fo:block xsl:use-attribute-sets="section.title.level1.properties"> + <xsl:value-of select="$reftitle"/> + </fo:block> + </fo:block> + </xsl:when> + <xsl:when test="$section.level = 2"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> + <fo:block xsl:use-attribute-sets="section.title.level2.properties"> + <xsl:value-of select="$reftitle"/> + </fo:block> + </fo:block> + </xsl:when> + <xsl:when test="$section.level = 3"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> + <fo:block xsl:use-attribute-sets="section.title.level3.properties"> + <xsl:value-of select="$reftitle"/> + </fo:block> + </fo:block> + </xsl:when> + <xsl:when test="$section.level = 4"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> + <fo:block xsl:use-attribute-sets="section.title.level4.properties"> + <xsl:value-of select="$reftitle"/> + </fo:block> + </fo:block> + </xsl:when> + <xsl:when test="$section.level = 5"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> + <fo:block xsl:use-attribute-sets="section.title.level5.properties"> + <xsl:value-of select="$reftitle"/> + </fo:block> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> + <fo:block xsl:use-attribute-sets="section.title.level6.properties"> + <xsl:value-of select="$reftitle"/> + </fo:block> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + + <fo:block> + <xsl:if test="not(following-sibling::refnamediv)"> + <xsl:attribute name="space-after">1em</xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </fo:block> +</xsl:template> + +<xsl:template match="refname"> + <xsl:if test="not(preceding-sibling::refdescriptor)"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::refname"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:if> +</xsl:template> + +<xsl:template match="refpurpose"> + <xsl:if test="node()"> + <xsl:text> </xsl:text> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat">em-dash</xsl:with-param> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + </xsl:if> +</xsl:template> + +<xsl:template match="refdescriptor"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="refclass"> + <xsl:if test="$refclass.suppress = 0"> + <fo:block font-weight="bold"> + <xsl:if test="@role"> + <xsl:value-of select="@role"/> + <xsl:text>: </xsl:text> + </xsl:if> + <xsl:apply-templates/> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="refsynopsisdiv"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:if test="not(refsynopsisdivinfo/title|docinfo/title|info/title|title)"> + <!-- * if we there is no appropriate title for this Refsynopsisdiv, --> + <!-- * then we need to call format.refentry.subheading to generate one --> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" + xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" + font-family="{$title.fontset}"> + <!-- Contents of what is now the format.refentry.subheading --> + <!-- template were formerly intended to be used only to --> + <!-- process those subsections of Refentry that have "real" --> + <!-- title children. So as a kludge to get around the fact --> + <!-- that the template still basically "expects" to be --> + <!-- processing that kind of a node, when we call the --> + <!-- template to process generated titles, we must call it --> + <!-- with values for the "offset" and "section" parameters --> + <!-- that are different from the default values in the --> + <!-- format.refentry.subheading template itself. Because --> + <!-- those defaults are the values appropriate for processing --> + <!-- "real" title nodes. --> + <xsl:call-template name="format.refentry.subheading"> + <xsl:with-param name="section" select="parent::*"/> + <xsl:with-param name="offset" select="1"/> + <xsl:with-param name="gentext.key" select="'RefSynopsisDiv'"/> + </xsl:call-template> + </fo:block> + </xsl:if> + <xsl:call-template name="refsynopsisdiv.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsection"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsection.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsect1"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect1.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsect2"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect2.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsect3"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect3.titlepage"/> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsynopsisdiv/title + |refsection/title + |refsect1/title + |refsect2/title + |refsect3/title"> + <!-- nop; titlepage.mode instead --> +</xsl:template> + +<xsl:template match="refsynopsisdiv/title + |refsection/title + |refsect1/title + |refsect2/title + |refsect3/title + |refsynopsisdiv/info/title + |refsection/info/title + |refsect1/info/title + |refsect2/info/title + |refsect3/info/title" + mode="titlepage.mode" + priority="2"> + <xsl:call-template name="format.refentry.subheading"/> +</xsl:template> + +<xsl:template name="format.refentry.subheading"> +<!-- This template is now called to process generated titles for --> +<!-- Refnamediv and Refsynopsisdiv, as well as "real" titles for --> +<!-- Refsynopsisdiv, Refsection, and Refsect[1-3]. --> +<!-- --> +<!-- But the contents of this template were formerly intended to be used --> +<!-- only to process those subsections of Refentry that have "real" title --> +<!-- children. So as a kludge to get around the fact that the template --> +<!-- still basically "expects" to be processing that kind of a node, the --> +<!-- "offset" parameter was added and the "section" variable was changed to --> +<!-- a parameter so that when called for a generated title on a Refnamediv --> +<!-- or Refsynopsisdiv, we can call it like this: --> +<!-- --> +<!-- <xsl:call-template name="format.refentry.subheading"> --> +<!-- <xsl:with-param name="section" select="self::*"/> --> +<!-- <xsl:with-param name="offset" select="1"/> --> +<!-- <xsl:with-param name="gentext.key" select="'RefName'"/> --> +<!-- </xsl:call-template> --> +<!-- --> + <xsl:param name="section" + select="(ancestor::refsynopsisdiv + |ancestor::refsection + |ancestor::refsect1 + |ancestor::refsect2 + |ancestor::refsect3)[last()]"/> + <xsl:param name="offset" select="0"/> + <xsl:param name="gentext.key"/> + + <fo:block keep-with-next.within-column="always"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="title"> + <!-- If we have a non-empty value for the $gentext.key param, then we --> + <!-- generate an appropriate title here. Otherwise, we have a real --> + <!-- title child, so we copy contents of that to the result tree. --> + <xsl:choose> + <xsl:when test="$gentext.key != ''"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="$gentext.key"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$section" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="{$level + 2 + $offset}" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$title"/> + </fotex:bookmark> + </xsl:if> + + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level"> + <xsl:value-of select="count(ancestor::*)-1 + $offset"/> + </xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:value-of select="$title"/> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level + $offset"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> + </fo:block> +</xsl:template> + +<xsl:template match="refsectioninfo|refsection/info"></xsl:template> +<xsl:template match="refsect1info|refsect1/info"></xsl:template> +<xsl:template match="refsect2info|refsect2/info"></xsl:template> +<xsl:template match="refsect3info|refsect3/info"></xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/sections.xsl b/3rdParty/DocBook/XSL/fo/sections.xsl new file mode 100644 index 0000000..4569f2d --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/sections.xsl @@ -0,0 +1,764 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: sections.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="section"> + <xsl:choose> + <xsl:when test="$rootid = @id or $rootid = @xml:id"> + <xsl:call-template name="section.page.sequence"/> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="renderas"> + <xsl:choose> + <xsl:when test="@renderas = 'sect1'">1</xsl:when> + <xsl:when test="@renderas = 'sect2'">2</xsl:when> + <xsl:when test="@renderas = 'sect3'">3</xsl:when> + <xsl:when test="@renderas = 'sect4'">4</xsl:when> + <xsl:when test="@renderas = 'sect5'">5</xsl:when> + <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:choose> + <xsl:when test="$renderas != ''"> + <xsl:value-of select="$renderas"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="section.level"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- xsl:use-attribute-sets takes only a Qname, not a variable --> + <xsl:choose> + <xsl:when test="$level = 1"> + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level1.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="section.content"/> + </xsl:element> + </xsl:when> + <xsl:when test="$level = 2"> + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level2.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="section.content"/> + </xsl:element> + </xsl:when> + <xsl:when test="$level = 3"> + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level3.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="section.content"/> + </xsl:element> + </xsl:when> + <xsl:when test="$level = 4"> + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level4.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="section.content"/> + </xsl:element> + </xsl:when> + <xsl:when test="$level = 5"> + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level5.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="section.content"/> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level6.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="section.content"/> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="section.content"> + <xsl:call-template name="section.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (count(ancestor::section)+1) <= + $generate.section.toc.level"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="/section" name="section.page.sequence"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="section.level1.properties"> + <xsl:call-template name="section.titlepage"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (count(ancestor::section)+1) <= + $generate.section.toc.level"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="section/title + |simplesect/title + |sect1/title + |sect2/title + |sect3/title + |sect4/title + |sect5/title + |section/info/title + |simplesect/info/title + |sect1/info/title + |sect2/info/title + |sect3/info/title + |sect4/info/title + |sect5/info/title + |section/sectioninfo/title + |sect1/sect1info/title + |sect2/sect2info/title + |sect3/sect3info/title + |sect4/sect4info/title + |sect5/sect5info/title" + mode="titlepage.mode" + priority="2"> + + <xsl:variable name="section" + select="(ancestor::section | + ancestor::simplesect | + ancestor::sect1 | + ancestor::sect2 | + ancestor::sect3 | + ancestor::sect4 | + ancestor::sect5)[position() = last()]"/> + + <fo:block keep-with-next.within-column="always"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="renderas"> + <xsl:choose> + <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when> + <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when> + <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when> + <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when> + <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when> + <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:choose> + <xsl:when test="$renderas != ''"> + <xsl:value-of select="$renderas"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$section"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="marker"> + <xsl:choose> + <xsl:when test="$level <= $marker.section.level">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="title"> + <xsl:apply-templates select="$section" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:variable name="marker.title"> + <xsl:apply-templates select="$section" mode="titleabbrev.markup"> + <xsl:with-param name="allow-anchors" select="0"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="{$level + 2}" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$marker.title"/> + </fotex:bookmark> + </xsl:if> + + <xsl:if test="$axf.extensions != 0"> + <xsl:attribute name="axf:outline-level"> + <xsl:value-of select="count(ancestor::*)-1"/> + </xsl:attribute> + <xsl:attribute name="axf:outline-expand">false</xsl:attribute> + <xsl:attribute name="axf:outline-title"> + <xsl:value-of select="normalize-space($title)"/> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level"/> + <xsl:with-param name="title" select="$title"/> + <xsl:with-param name="marker" select="$marker"/> + <xsl:with-param name="marker.title" select="$marker.title"/> + </xsl:call-template> + </fo:block> +</xsl:template> + +<xsl:template match="sect1"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level1.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="sect1.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 1"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="/sect1"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="initial-page-number"> + <xsl:call-template name="initial.page.number"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="force-page-count"> + <xsl:call-template name="force.page.count"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:attribute name="hyphenation-character"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-character'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-push-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="hyphenation-remain-character-count"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="set.flow.properties"> + <xsl:with-param name="element" select="local-name(.)"/> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:call-template> + + <fo:block id="{$id}" + xsl:use-attribute-sets="section.level1.properties"> + <xsl:call-template name="sect1.titlepage"/> + </fo:block> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 1"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="sect2"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level2.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="sect2.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 2"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="sect3"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level3.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="sect3.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 3"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="sect4"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level4.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="sect4.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 4"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="sect5"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}" + use-attribute-sets="section.level5.properties"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="sect5.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 5"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="simplesect"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="simplesect.titlepage"/> + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="sectioninfo"></xsl:template> +<xsl:template match="section/info"></xsl:template> +<xsl:template match="section/title"></xsl:template> +<xsl:template match="section/titleabbrev"></xsl:template> +<xsl:template match="section/subtitle"></xsl:template> + +<xsl:template match="sect1info"></xsl:template> +<xsl:template match="sect1/info"></xsl:template> +<xsl:template match="sect1/title"></xsl:template> +<xsl:template match="sect1/titleabbrev"></xsl:template> +<xsl:template match="sect1/subtitle"></xsl:template> + +<xsl:template match="sect2info"></xsl:template> +<xsl:template match="sect2/info"></xsl:template> +<xsl:template match="sect2/title"></xsl:template> +<xsl:template match="sect2/titleabbrev"></xsl:template> +<xsl:template match="sect2/subtitle"></xsl:template> + +<xsl:template match="sect3info"></xsl:template> +<xsl:template match="sect3/info"></xsl:template> +<xsl:template match="sect3/title"></xsl:template> +<xsl:template match="sect3/titleabbrev"></xsl:template> +<xsl:template match="sect3/subtitle"></xsl:template> + +<xsl:template match="sect4info"></xsl:template> +<xsl:template match="sect4/info"></xsl:template> +<xsl:template match="sect4/title"></xsl:template> +<xsl:template match="sect4/titleabbrev"></xsl:template> +<xsl:template match="sect4/subtitle"></xsl:template> + +<xsl:template match="sect5info"></xsl:template> +<xsl:template match="sect5/info"></xsl:template> +<xsl:template match="sect5/title"></xsl:template> +<xsl:template match="sect5/titleabbrev"></xsl:template> +<xsl:template match="sect5/subtitle"></xsl:template> + +<xsl:template match="simplesect/info"></xsl:template> +<xsl:template match="simplesect/title"></xsl:template> +<xsl:template match="simplesect/titleabbrev"></xsl:template> +<xsl:template match="simplesect/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="section.heading"> + <xsl:param name="level" select="1"/> + <xsl:param name="marker" select="1"/> + <xsl:param name="title"/> + <xsl:param name="marker.title"/> + + <fo:block xsl:use-attribute-sets="section.title.properties"> + <xsl:if test="$marker != 0"> + <fo:marker marker-class-name="section.head.marker"> + <xsl:copy-of select="$marker.title"/> + </fo:marker> + </xsl:if> + + <xsl:choose> + <xsl:when test="$level=1"> + <fo:block xsl:use-attribute-sets="section.title.level1.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=2"> + <fo:block xsl:use-attribute-sets="section.title.level2.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=3"> + <fo:block xsl:use-attribute-sets="section.title.level3.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=4"> + <fo:block xsl:use-attribute-sets="section.title.level4.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=5"> + <fo:block xsl:use-attribute-sets="section.title.level5.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block xsl:use-attribute-sets="section.title.level6.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="bridgehead"> + <xsl:variable name="container" + select="(ancestor::appendix + |ancestor::article + |ancestor::bibliography + |ancestor::chapter + |ancestor::glossary + |ancestor::glossdiv + |ancestor::index + |ancestor::partintro + |ancestor::preface + |ancestor::refsect1 + |ancestor::refsect2 + |ancestor::refsect3 + |ancestor::sect1 + |ancestor::sect2 + |ancestor::sect3 + |ancestor::sect4 + |ancestor::sect5 + |ancestor::section + |ancestor::setindex + |ancestor::simplesect)[last()]"/> + + <xsl:variable name="clevel"> + <xsl:choose> + <xsl:when test="local-name($container) = 'appendix' + or local-name($container) = 'chapter' + or local-name($container) = 'article' + or local-name($container) = 'bibliography' + or local-name($container) = 'glossary' + or local-name($container) = 'index' + or local-name($container) = 'partintro' + or local-name($container) = 'preface' + or local-name($container) = 'setindex'">2</xsl:when> + <xsl:when test="local-name($container) = 'glossdiv'"> + <xsl:value-of select="count(ancestor::glossdiv)+2"/> + </xsl:when> + <xsl:when test="local-name($container) = 'sect1' + or local-name($container) = 'sect2' + or local-name($container) = 'sect3' + or local-name($container) = 'sect4' + or local-name($container) = 'sect5' + or local-name($container) = 'refsect1' + or local-name($container) = 'refsect2' + or local-name($container) = 'refsect3' + or local-name($container) = 'section' + or local-name($container) = 'simplesect'"> + <xsl:variable name="slevel"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$container"/> + </xsl:call-template> + </xsl:variable> + <xsl:value-of select="$slevel + 1"/> + </xsl:when> + <xsl:otherwise>2</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:choose> + <xsl:when test="@renderas = 'sect1'">1</xsl:when> + <xsl:when test="@renderas = 'sect2'">2</xsl:when> + <xsl:when test="@renderas = 'sect3'">3</xsl:when> + <xsl:when test="@renderas = 'sect4'">4</xsl:when> + <xsl:when test="@renderas = 'sect5'">5</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$clevel"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="marker"> + <xsl:choose> + <xsl:when test="$level <= $marker.section.level">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="marker.title"> + <xsl:apply-templates/> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level"/> + <xsl:with-param name="title"> + <xsl:apply-templates/> + </xsl:with-param> + <xsl:with-param name="marker" select="$marker"/> + <xsl:with-param name="marker.title" select="$marker.title"/> + </xsl:call-template> + </fo:block> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/spaces.xsl b/3rdParty/DocBook/XSL/fo/spaces.xsl new file mode 100644 index 0000000..d34c9cd --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/spaces.xsl @@ -0,0 +1,274 @@ +<?xml version='1.0' encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: spaces.xsl 8121 2008-09-13 17:21:11Z mzjn $ + ******************************************************************** + XSL-FO specification treats all space characters like ordinary spaces. + We need to map them to fo:leader with different widths in order to + simulate desired behaviour. + ******************************************************************** --> + +<xsl:template match="text()[namespace-uri(..) = '' or + namespace-uri(..) = 'http://docbook.org/ns/docbook']"> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:call-template name="passivetex.dash.subst"> + <xsl:with-param name="string"> + <xsl:call-template name="space.2000.subst"> + <xsl:with-param name="string" select="."/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2000.subst"> + <xsl:with-param name="string" select="."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:param name="space.enquad.width">0.5em</xsl:param> <!-- U+2000 --> +<xsl:param name="space.emquad.width">1em</xsl:param> <!-- U+2001 --> +<xsl:param name="space.enspace.width">0.5em</xsl:param> <!-- U+2002 --> +<xsl:param name="space.emspace.width">1em</xsl:param> <!-- U+2003 --> +<xsl:param name="space.3emspace.width">0.33em</xsl:param><!-- U+2004 --> +<xsl:param name="space.4emspace.width">0.25em</xsl:param><!-- U+2005 --> +<xsl:param name="space.6emspace.width">0.16em</xsl:param><!-- U+2006 --> +<xsl:param name="space.figspace.width"></xsl:param> <!-- U+2007 --> +<xsl:param name="space.punctspace.width"></xsl:param> <!-- U+2008 --> +<xsl:param name="space.thinspace.width">0.2em</xsl:param><!-- U+2009 --> +<xsl:param name="space.hairspace.width">0.1em</xsl:param><!-- U+200A --> + +<xsl:template name="space.2000.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.enquad.width != ''"> + <xsl:call-template name="space.2001.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.enquad.width}"/> + <xsl:call-template name="space.2000.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2001.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2001.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.emquad.width != ''"> + <xsl:call-template name="space.2002.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.emquad.width}"/> + <xsl:call-template name="space.2001.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2002.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2002.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.enspace.width != ''"> + <xsl:call-template name="space.2003.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.enspace.width}"/> + <xsl:call-template name="space.2002.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2003.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2003.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.emspace.width != ''"> + <xsl:call-template name="space.2004.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.emspace.width}"/> + <xsl:call-template name="space.2003.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2004.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2004.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.3emspace.width != ''"> + <xsl:call-template name="space.2005.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.3emspace.width}"/> + <xsl:call-template name="space.2004.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2005.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2005.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.4emspace.width != ''"> + <xsl:call-template name="space.2006.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.4emspace.width}"/> + <xsl:call-template name="space.2005.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2006.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2006.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.6emspace.width != ''"> + <xsl:call-template name="space.2007.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.6emspace.width}"/> + <xsl:call-template name="space.2006.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2007.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2007.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.figspace.width != ''"> + <xsl:call-template name="space.2008.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.figspace.width}"/> + <xsl:call-template name="space.2007.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2008.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2008.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.punctspace.width != ''"> + <xsl:call-template name="space.2009.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.punctspace.width}"/> + <xsl:call-template name="space.2008.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.2009.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.2009.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.thinspace.width != ''"> + <xsl:call-template name="space.200A.subst"> + <xsl:with-param name="string" select="substring-before($string, ' ')"/> + </xsl:call-template> + <fo:leader leader-length="{$space.thinspace.width}"/> + <xsl:call-template name="space.2009.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="space.200A.subst"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="space.200A.subst"> + <xsl:param name="string"/> + + <xsl:choose> + <xsl:when test="contains($string, ' ') and $space.hairspace.width != ''"> + <xsl:value-of select="substring-before($string, ' ')"/> + <fo:leader leader-length="{$space.hairspace.width}"/> + <xsl:call-template name="space.200A.subst"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/synop.xsl b/3rdParty/DocBook/XSL/fo/synop.xsl new file mode 100644 index 0000000..92afc20 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/synop.xsl @@ -0,0 +1,1007 @@ +<?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY RE " "> +<!ENTITY nbsp " "> +]> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: synop.xsl 8334 2009-03-15 14:26:23Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<!-- synopsis is in verbatim --> + +<!-- ==================================================================== --> + +<xsl:template match="cmdsynopsis"> + <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="cmdsynopsis/command"> + <xsl:call-template name="inline.monoseq"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="cmdsynopsis/command[1]" priority="2"> + <xsl:call-template name="inline.monoseq"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="group|arg" name="group-or-arg"> + <xsl:variable name="choice" select="@choice"/> + <xsl:variable name="rep" select="@rep"/> + <xsl:variable name="sepchar"> + <xsl:choose> + <xsl:when test="ancestor-or-self::*/@sepchar"> + <xsl:value-of select="ancestor-or-self::*/@sepchar"/> + </xsl:when> + <xsl:otherwise> + <xsl:text> </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="preceding-sibling::*"> + <xsl:value-of select="$sepchar"/> + </xsl:if> + <xsl:choose> + <xsl:when test="$choice='plain'"> + <xsl:value-of select="$arg.choice.plain.open.str"/> + </xsl:when> + <xsl:when test="$choice='req'"> + <xsl:value-of select="$arg.choice.req.open.str"/> + </xsl:when> + <xsl:when test="$choice='opt'"> + <xsl:value-of select="$arg.choice.opt.open.str"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$arg.choice.def.open.str"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates/> + <xsl:choose> + <xsl:when test="$rep='repeat'"> + <xsl:value-of select="$arg.rep.repeat.str"/> + </xsl:when> + <xsl:when test="$rep='norepeat'"> + <xsl:value-of select="$arg.rep.norepeat.str"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$arg.rep.def.str"/> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="$choice='plain'"> + <xsl:value-of select="$arg.choice.plain.close.str"/> + </xsl:when> + <xsl:when test="$choice='req'"> + <xsl:value-of select="$arg.choice.req.close.str"/> + </xsl:when> + <xsl:when test="$choice='opt'"> + <xsl:value-of select="$arg.choice.opt.close.str"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$arg.choice.def.close.str"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="group/arg"> + <xsl:variable name="choice" select="@choice"/> + <xsl:variable name="rep" select="@rep"/> + <xsl:if test="preceding-sibling::*"> + <xsl:value-of select="$arg.or.sep"/> + </xsl:if> + <xsl:call-template name="group-or-arg"/> +</xsl:template> + +<xsl:template match="sbr"> + <fo:block/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="synopfragmentref"> + <xsl:variable name="target" select="key('id',@linkend)"/> + <xsl:variable name="snum"> + <xsl:apply-templates select="$target" mode="synopfragment.number"/> + </xsl:variable> + <fo:inline font-style="italic"> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:text>(</xsl:text> + <xsl:value-of select="$snum"/> + <xsl:text>)</xsl:text> + </fo:basic-link> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<xsl:template match="synopfragment" mode="synopfragment.number"> + <xsl:number format="1"/> +</xsl:template> + +<xsl:template match="synopfragment"> + <xsl:variable name="snum"> + <xsl:apply-templates select="." mode="synopfragment.number"/> + </xsl:variable> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:block id="{$id}"> + <xsl:text>(</xsl:text> + <xsl:value-of select="$snum"/> + <xsl:text>)</xsl:text> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="funcsynopsis"> + <xsl:call-template name="informal.object"/> +</xsl:template> + +<xsl:template match="funcsynopsisinfo"> + <fo:block space-after.minimum="0.8em" + space-after.optimum="1em" + space-after.maximum="1.2em"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="funcprototype"> + + <xsl:variable name="style"> + <xsl:call-template name="funcsynopsis.style"/> + </xsl:variable> + + <fo:block font-family="{$monospace.font.family}" + space-before.minimum="0.8em" + space-before.optimum="1em" + space-before.maximum="1.2em"> + <xsl:apply-templates/> + + <xsl:if test="$style='kr'"> + <fo:block + space-before.minimum="0.8em" + space-before.optimum="1em" + space-before.maximum="1.2em"> + <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/> + </fo:block> + </xsl:if> + + </fo:block> +</xsl:template> + +<xsl:template match="funcdef"> + <fo:inline font-family="{$monospace.font.family}"> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<xsl:template match="funcdef/function"> + <xsl:choose> + <xsl:when test="$funcsynopsis.decoration != 0"> + <fo:inline font-weight="bold"> + <xsl:apply-templates/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="void"> + + <xsl:variable name="style"> + <xsl:call-template name="funcsynopsis.style"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$style='ansi'"> + <xsl:text>(void);</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>();</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="varargs"> + <xsl:text>(...);</xsl:text> +</xsl:template> + +<xsl:template match="paramdef"> + + <xsl:variable name="style"> + <xsl:call-template name="funcsynopsis.style"/> + </xsl:variable> + + <xsl:variable name="paramnum"> + <xsl:number count="paramdef" format="1"/> + </xsl:variable> + <xsl:if test="$paramnum=1">(</xsl:if> + <xsl:choose> + <xsl:when test="$style='ansi'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="./parameter"/> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="following-sibling::paramdef"> + <xsl:text>, </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>);</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="paramdef/parameter"> + <xsl:choose> + <xsl:when test="$funcsynopsis.decoration != 0"> + <xsl:call-template name="inline.italicseq"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="following-sibling::parameter"> + <xsl:text>, </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="paramdef" mode="kr-funcsynopsis-mode"> + <fo:block> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="funcparams"> + <xsl:text>(</xsl:text> + <xsl:apply-templates/> + <xsl:text>)</xsl:text> +</xsl:template> + +<!-- Return value of PI or parameter --> +<xsl:template name="funcsynopsis.style"> + <xsl:variable name="pi.style"> + <xsl:call-template name="pi.dbfo_funcsynopsis-style"> + <xsl:with-param name="node" select="ancestor::funcsynopsis/descendant-or-self::*"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$pi.style != ''"> + <xsl:value-of select="$pi.style"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$funcsynopsis.style"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:variable name="default-classsynopsis-language">java</xsl:variable> + +<xsl:template match="classsynopsis + |fieldsynopsis + |methodsynopsis + |constructorsynopsis + |destructorsynopsis"> + <xsl:param name="language"> + <xsl:choose> + <xsl:when test="@language"> + <xsl:value-of select="@language"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$default-classsynopsis-language"/> + </xsl:otherwise> + </xsl:choose> + </xsl:param> + + <!-- + <xsl:message>process <xsl:value-of select="local-name(.)"/> in <xsl:value-of select="$language"/></xsl:message> + --> + + <xsl:choose> + <xsl:when test="$language='java' or $language='Java'"> + <xsl:apply-templates select="." mode="java"/> + </xsl:when> + <xsl:when test="$language='perl' or $language='Perl'"> + <xsl:apply-templates select="." mode="perl"/> + </xsl:when> + <xsl:when test="$language='idl' or $language='IDL'"> + <xsl:apply-templates select="." mode="idl"/> + </xsl:when> + <xsl:when test="$language='cpp' or $language='c++' or $language='C++'"> + <xsl:apply-templates select="." mode="cpp"/> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Unrecognized language on </xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text>: </xsl:text> + <xsl:value-of select="$language"/> + </xsl:message> + <xsl:apply-templates select="."> + <xsl:with-param name="language" + select="$default-classsynopsis-language"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="synop-break"> + <xsl:if test="parent::classsynopsis + or (following-sibling::fieldsynopsis + |following-sibling::methodsynopsis + |following-sibling::constructorsynopsis + |following-sibling::destructorsynopsis)"> + <fo:inline>&RE;</fo:inline> + </xsl:if> +</xsl:template> + +<!-- ===== Java ======================================================== --> + +<xsl:template match="classsynopsis" mode="java"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:apply-templates select="ooclass[1]" mode="java"/> + <xsl:if test="ooclass[preceding-sibling::*]"> + <xsl:text> extends</xsl:text> + <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/> + <xsl:if test="oointerface|ooexception"> + <xsl:text>&RE; </xsl:text> + </xsl:if> + </xsl:if> + <xsl:if test="oointerface"> + <xsl:text>implements</xsl:text> + <xsl:apply-templates select="oointerface" mode="java"/> + <xsl:if test="ooexception"> + <xsl:text>&RE; </xsl:text> + </xsl:if> + </xsl:if> + <xsl:if test="ooexception"> + <xsl:text>throws</xsl:text> + <xsl:apply-templates select="ooexception" mode="java"/> + </xsl:if> + <xsl:text> {&RE;</xsl:text> + <xsl:apply-templates select="constructorsynopsis + |destructorsynopsis + |fieldsynopsis + |methodsynopsis + |classsynopsisinfo" mode="java"/> + <xsl:text>}</xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="classsynopsisinfo" mode="java"> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="ooclass|oointerface|ooexception" mode="java"> + <xsl:choose> + <xsl:when test="preceding-sibling::*"> + <xsl:text>, </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> </xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="modifier|package" mode="java"> + <xsl:apply-templates mode="java"/> + <xsl:if test="following-sibling::*"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="classname" mode="java"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="interfacename" mode="java"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="exceptionname" mode="java"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="fieldsynopsis" mode="java"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text> </xsl:text> + <xsl:apply-templates mode="java"/> + <xsl:text>;</xsl:text> + <xsl:call-template name="synop-break"/> + </fo:block> +</xsl:template> + +<xsl:template match="type" mode="java"> + <xsl:apply-templates mode="java"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="varname" mode="java"> + <xsl:apply-templates mode="java"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="initializer" mode="java"> + <xsl:text>= </xsl:text> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="void" mode="java"> + <xsl:text>void </xsl:text> +</xsl:template> + +<xsl:template match="methodname" mode="java"> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="methodparam" mode="java"> + <xsl:param name="indent">0</xsl:param> + <xsl:if test="preceding-sibling::methodparam"> + <xsl:text>,&RE;</xsl:text> + <xsl:if test="$indent > 0"> + <xsl:call-template name="copy-string"> + <xsl:with-param name="string"> </xsl:with-param> + <xsl:with-param name="count" select="$indent + 1"/> + </xsl:call-template> + </xsl:if> + </xsl:if> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template match="parameter" mode="java"> + <xsl:apply-templates mode="java"/> +</xsl:template> + +<xsl:template mode="java" + match="constructorsynopsis|destructorsynopsis|methodsynopsis"> + <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/> + <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/> + <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/> + <xsl:variable name="decl"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$start-modifiers" mode="java"/> + + <!-- type --> + <xsl:if test="local-name($notmod[1]) != 'methodname'"> + <xsl:apply-templates select="$notmod[1]" mode="java"/> + </xsl:if> + + <xsl:apply-templates select="methodname" mode="java"/> + </xsl:variable> + + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:copy-of select="$decl"/> + <xsl:text>(</xsl:text> + <xsl:apply-templates select="methodparam" mode="java"> + <xsl:with-param name="indent" select="string-length($decl)"/> + </xsl:apply-templates> + <xsl:text>)</xsl:text> + <xsl:if test="exceptionname"> + <xsl:text>&RE; throws </xsl:text> + <xsl:apply-templates select="exceptionname" mode="java"/> + </xsl:if> + <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$end-modifiers" mode="java"/> + </xsl:if> + <xsl:text>;</xsl:text> + </fo:block> + <xsl:call-template name="synop-break"/> +</xsl:template> + +<!-- ===== C++ ========================================================= --> + +<xsl:template match="classsynopsis" mode="cpp"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:apply-templates select="ooclass[1]" mode="cpp"/> + <xsl:if test="ooclass[preceding-sibling::*]"> + <xsl:text>: </xsl:text> + <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/> + <xsl:if test="oointerface|ooexception"> + <xsl:text>&RE; </xsl:text> + </xsl:if> + </xsl:if> + <xsl:if test="oointerface"> + <xsl:text> implements</xsl:text> + <xsl:apply-templates select="oointerface" mode="cpp"/> + <xsl:if test="ooexception"> + <xsl:text>&RE; </xsl:text> + </xsl:if> + </xsl:if> + <xsl:if test="ooexception"> + <xsl:text> throws</xsl:text> + <xsl:apply-templates select="ooexception" mode="cpp"/> + </xsl:if> + <xsl:text> {&RE;</xsl:text> + <xsl:apply-templates select="constructorsynopsis + |destructorsynopsis + |fieldsynopsis + |methodsynopsis + |classsynopsisinfo" mode="cpp"/> + <xsl:text>}</xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="classsynopsisinfo" mode="cpp"> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="ooclass|oointerface|ooexception" mode="cpp"> + <xsl:if test="preceding-sibling::*"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="modifier|package" mode="cpp"> + <xsl:apply-templates mode="cpp"/> + <xsl:if test="following-sibling::*"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="classname" mode="cpp"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="interfacename" mode="cpp"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="exceptionname" mode="cpp"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="fieldsynopsis" mode="cpp"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text> </xsl:text> + <xsl:apply-templates mode="cpp"/> + <xsl:text>;</xsl:text> + </fo:block> + <xsl:call-template name="synop-break"/> +</xsl:template> + +<xsl:template match="type" mode="cpp"> + <xsl:apply-templates mode="cpp"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="varname" mode="cpp"> + <xsl:apply-templates mode="cpp"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="initializer" mode="cpp"> + <xsl:text>= </xsl:text> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="void" mode="cpp"> + <xsl:text>void </xsl:text> +</xsl:template> + +<xsl:template match="methodname" mode="cpp"> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="methodparam" mode="cpp"> + <xsl:if test="preceding-sibling::methodparam"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template match="parameter" mode="cpp"> + <xsl:apply-templates mode="cpp"/> +</xsl:template> + +<xsl:template mode="cpp" + match="constructorsynopsis|destructorsynopsis|methodsynopsis"> + <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/> + <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/> + <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/> + + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$start-modifiers" mode="cpp"/> + + <!-- type --> + <xsl:if test="local-name($notmod[1]) != 'methodname'"> + <xsl:apply-templates select="$notmod[1]" mode="cpp"/> + </xsl:if> + + <xsl:apply-templates select="methodname" mode="cpp"/> + <xsl:text>(</xsl:text> + <xsl:apply-templates select="methodparam" mode="cpp"/> + <xsl:text>)</xsl:text> + <xsl:if test="exceptionname"> + <xsl:text>&RE; throws </xsl:text> + <xsl:apply-templates select="exceptionname" mode="cpp"/> + </xsl:if> + <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$end-modifiers" mode="cpp"/> + </xsl:if> + <xsl:text>;</xsl:text> + </fo:block> + <xsl:call-template name="synop-break"/> +</xsl:template> + +<!-- ===== IDL ========================================================= --> + +<xsl:template match="classsynopsis" mode="idl"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text>interface </xsl:text> + <xsl:apply-templates select="ooclass[1]" mode="idl"/> + <xsl:if test="ooclass[preceding-sibling::*]"> + <xsl:text>: </xsl:text> + <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/> + <xsl:if test="oointerface|ooexception"> + <xsl:text>&RE; </xsl:text> + </xsl:if> + </xsl:if> + <xsl:if test="oointerface"> + <xsl:text> implements</xsl:text> + <xsl:apply-templates select="oointerface" mode="idl"/> + <xsl:if test="ooexception"> + <xsl:text>&RE; </xsl:text> + </xsl:if> + </xsl:if> + <xsl:if test="ooexception"> + <xsl:text> throws</xsl:text> + <xsl:apply-templates select="ooexception" mode="idl"/> + </xsl:if> + <xsl:text> {&RE;</xsl:text> + <xsl:apply-templates select="constructorsynopsis + |destructorsynopsis + |fieldsynopsis + |methodsynopsis + |classsynopsisinfo" mode="idl"/> + <xsl:text>}</xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="classsynopsisinfo" mode="idl"> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="ooclass|oointerface|ooexception" mode="idl"> + <xsl:if test="preceding-sibling::*"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="modifier|package" mode="idl"> + <xsl:apply-templates mode="idl"/> + <xsl:if test="following-sibling::*"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="classname" mode="idl"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="interfacename" mode="idl"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="exceptionname" mode="idl"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="fieldsynopsis" mode="idl"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text> </xsl:text> + <xsl:apply-templates mode="idl"/> + <xsl:text>;</xsl:text> + </fo:block> + <xsl:call-template name="synop-break"/> +</xsl:template> + +<xsl:template match="type" mode="idl"> + <xsl:apply-templates mode="idl"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="varname" mode="idl"> + <xsl:apply-templates mode="idl"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="initializer" mode="idl"> + <xsl:text>= </xsl:text> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="void" mode="idl"> + <xsl:text>void </xsl:text> +</xsl:template> + +<xsl:template match="methodname" mode="idl"> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="methodparam" mode="idl"> + <xsl:if test="preceding-sibling::methodparam"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template match="parameter" mode="idl"> + <xsl:apply-templates mode="idl"/> +</xsl:template> + +<xsl:template mode="idl" + match="constructorsynopsis|destructorsynopsis|methodsynopsis"> + <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/> + <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/> + <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/> + + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$start-modifiers" mode="idl"/> + + <!-- type --> + <xsl:if test="local-name($notmod[1]) != 'methodname'"> + <xsl:apply-templates select="$notmod[1]" mode="idl"/> + </xsl:if> + + <xsl:apply-templates select="methodname" mode="idl"/> + <xsl:text>(</xsl:text> + <xsl:apply-templates select="methodparam" mode="idl"/> + <xsl:text>)</xsl:text> + <xsl:if test="exceptionname"> + <xsl:text>&RE; raises(</xsl:text> + <xsl:apply-templates select="exceptionname" mode="idl"/> + <xsl:text>)</xsl:text> + </xsl:if> + <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$end-modifiers" mode="idl"/> + </xsl:if> + <xsl:text>;</xsl:text> + </fo:block> + <xsl:call-template name="synop-break"/> +</xsl:template> + +<!-- ===== Perl ======================================================== --> + +<xsl:template match="classsynopsis" mode="perl"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text>package </xsl:text> + <xsl:apply-templates select="ooclass[1]" mode="perl"/> + <xsl:text>;&RE;</xsl:text> + + <xsl:if test="ooclass[preceding-sibling::*]"> + <xsl:text>@ISA = (</xsl:text> + <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/> + <xsl:text>);&RE;</xsl:text> + </xsl:if> + + <xsl:apply-templates select="constructorsynopsis + |destructorsynopsis + |fieldsynopsis + |methodsynopsis + |classsynopsisinfo" mode="perl"/> + </fo:block> +</xsl:template> + +<xsl:template match="classsynopsisinfo" mode="perl"> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="ooclass|oointerface|ooexception" mode="perl"> + <xsl:if test="preceding-sibling::*"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="modifier|package" mode="perl"> + <xsl:apply-templates mode="perl"/> + <xsl:if test="following-sibling::*"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="classname" mode="perl"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="interfacename" mode="perl"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="exceptionname" mode="perl"> + <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="fieldsynopsis" mode="perl"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text> </xsl:text> + <xsl:apply-templates mode="perl"/> + <xsl:text>;</xsl:text> + </fo:block> + <xsl:call-template name="synop-break"/> +</xsl:template> + +<xsl:template match="type" mode="perl"> + <xsl:apply-templates mode="perl"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="varname" mode="perl"> + <xsl:apply-templates mode="perl"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="initializer" mode="perl"> + <xsl:text>= </xsl:text> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="void" mode="perl"> + <xsl:text>void </xsl:text> +</xsl:template> + +<xsl:template match="methodname" mode="perl"> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="methodparam" mode="perl"> + <xsl:if test="preceding-sibling::methodparam"> + <xsl:text>, </xsl:text> + </xsl:if> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template match="parameter" mode="perl"> + <xsl:apply-templates mode="perl"/> +</xsl:template> + +<xsl:template mode="perl" + match="constructorsynopsis|destructorsynopsis|methodsynopsis"> + <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/> + <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/> + <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/> + + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:text>sub </xsl:text> + + <xsl:apply-templates select="methodname" mode="perl"/> + <xsl:text> { ... };</xsl:text> + <xsl:call-template name="synop-break"/> + </fo:block> +</xsl:template> + +<!-- Used when not occurring as a child of classsynopsis --> +<xsl:template match="ooclass|oointerface|ooexception"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- * DocBook 5 allows linking elements (link, olink, and xref) --> +<!-- * within the OO *synopsis elements (classsynopsis, fieldsynopsis, --> +<!-- * methodsynopsis, constructorsynopsis, destructorsynopsis) and --> +<!-- * their children. So we need to have mode="java|cpp|idl|perl" --> +<!-- * per-mode matches for those linking elements in order for them --> +<!-- * to be processed as expected. --> + +<xsl:template match="link|olink|xref" mode="java"> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="link|olink|xref" mode="cpp"> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="link|olink|xref" mode="idl"> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="link|olink|xref" mode="perl"> + <xsl:apply-templates select="."/> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/table.xml b/3rdParty/DocBook/XSL/fo/table.xml new file mode 100644 index 0000000..8f9defd --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/table.xml @@ -0,0 +1,135 @@ +<?xml version="1.0"?> + +<reference xml:id="table-templates"><?dbhtml dir="fo"?> + + <info> + <title>Formatting Object Table Reference</title> + <releaseinfo role="meta"> + $Id: table.xsl 8392 2009-04-01 08:47:55Z bobstayton $ + </releaseinfo> + </info> + <partintro xml:id="partintro"> + <title>Introduction</title> + +<para>This is technical reference documentation for the FO + table-processing templates in the DocBook XSL Stylesheets.</para> + + +<para>This is not intended to be user documentation. It is + provided for developers writing customization layers for the + stylesheets.</para> + + </partintro> + +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.calc.column.width"> +<refnamediv> +<refname>calc.column.width</refname> +<refpurpose>Calculate an XSL FO table column width specification from a +CALS table column width specification.</refpurpose> +</refnamediv> +<refsynopsisdiv> +<synopsis><xsl:template name="calc.column.width"> +<xsl:param name="colwidth">1*</xsl:param> + ... +</xsl:template></synopsis> +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>CALS expresses table column widths in the following basic +forms:</para> + + + +<itemizedlist> +<listitem> + +<para><emphasis>99.99units</emphasis>, a fixed length specifier.</para> + +</listitem> +<listitem> + +<para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para> + +</listitem> +<listitem> + +<para><emphasis>99.99*</emphasis>, a relative length specifier.</para> + +</listitem> +<listitem> + +<para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para> + +</listitem> +</itemizedlist> + + + +<para>The CALS units are points (pt), picas (pi), centimeters (cm), +millimeters (mm), and inches (in). These are the same units as XSL, +except that XSL abbreviates picas "pc" instead of "pi". If a length +specifier has no units, the CALS default unit (pt) is assumed.</para> + + + +<para>Relative length specifiers are represented in XSL with the +proportional-column-width() function.</para> + + + +<para>Here are some examples:</para> + + + +<itemizedlist> +<listitem> + +<para>"36pt" becomes "36pt"</para> + +</listitem> +<listitem> + +<para>"3pi" becomes "3pc"</para> + +</listitem> +<listitem> + +<para>"36" becomes "36pt"</para> + +</listitem> +<listitem> + +<para>"3*" becomes "proportional-column-width(3)"</para> + +</listitem> +<listitem> + +<para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para> + +</listitem> +<listitem> + +<para>"1*+2" becomes "proportional-column-width(1)+2pt"</para> + +</listitem> +</itemizedlist> + +</refsect1><refsect1><title>Parameters</title> + +<variablelist> +<varlistentry><term>colwidth</term> +<listitem> + +<para>The CALS column width specification.</para> + +</listitem> +</varlistentry> +</variablelist> + +</refsect1><refsect1><title>Returns</title> + +<para>The XSL column width specification.</para> + +</refsect1></refentry> +</reference> + diff --git a/3rdParty/DocBook/XSL/fo/table.xsl b/3rdParty/DocBook/XSL/fo/table.xsl new file mode 100644 index 0000000..352dfa9 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/table.xsl @@ -0,0 +1,1621 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:rx="http://www.renderx.com/XSL/Extensions" + xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" + xmlns:xtbl="com.nwalsh.xalan.Table" + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" + exclude-result-prefixes="doc stbl xtbl lxslt ptbl" + version='1.0'> + +<xsl:include href="../common/table.xsl"/> + +<!-- ******************************************************************** + $Id: table.xsl 8392 2009-04-01 08:47:55Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<doc:reference xmlns="" xml:id="table-templates"> + <?dbhtml dir="fo"?> + <info> + <title>Formatting Object Table Reference</title> + <releaseinfo role="meta"> + $Id: table.xsl 8392 2009-04-01 08:47:55Z bobstayton $ + </releaseinfo> + </info> + <partintro xml:id="partintro"> + <title>Introduction</title> + <para>This is technical reference documentation for the FO + table-processing templates in the DocBook XSL Stylesheets.</para> + <para>This is not intended to be user documentation. It is + provided for developers writing customization layers for the + stylesheets.</para> + </partintro> +</doc:reference> + +<!-- ==================================================================== --> + +<lxslt:component prefix="xtbl" + functions="adjustColumnWidths"/> + +<!-- ==================================================================== --> + +<xsl:template name="make.table.content"> + <xsl:choose> + <xsl:when test="tgroup|mediaobject|graphic"> + <xsl:call-template name="calsTable"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="htmlTable"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="calsTable"> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:for-each select="tgroup"> + + <fo:table xsl:use-attribute-sets="table.table.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"> + <xsl:value-of select="$keep.together"/> + </xsl:attribute> + </xsl:if> + <xsl:call-template name="table.frame"/> + <xsl:if test="following-sibling::tgroup"> + <xsl:attribute name="border-bottom-width">0pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="padding-bottom">0pt</xsl:attribute> + <xsl:attribute name="margin-bottom">0pt</xsl:attribute> + <xsl:attribute name="space-after">0pt</xsl:attribute> + <xsl:attribute name="space-after.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="preceding-sibling::tgroup"> + <xsl:attribute name="border-top-width">0pt</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="padding-top">0pt</xsl:attribute> + <xsl:attribute name="margin-top">0pt</xsl:attribute> + <xsl:attribute name="space-before">0pt</xsl:attribute> + <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:apply-templates select="."/> + </fo:table> + + <xsl:for-each select="mediaobject|graphic"> + <xsl:apply-templates select="."/> + </xsl:for-each> + + </xsl:for-each> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- Placeholder template enables wrapping a fo:table in + another table for purposes of layout or applying + extensions such as XEP table-omit-initial-header to + create "continued" titles on page breaks. --> +<xsl:template name="table.layout"> + <xsl:param name="table.content" select="NOTANODE"/> + + <xsl:copy-of select="$table.content"/> +</xsl:template> + +<xsl:template name="table.block"> + <xsl:param name="table.layout" select="NOTANODE"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="param.placement" + select="substring-after(normalize-space( + $formal.title.placement), concat(local-name(.), ' '))"/> + + <xsl:variable name="placement"> + <xsl:choose> + <xsl:when test="contains($param.placement, ' ')"> + <xsl:value-of select="substring-before($param.placement, ' ')"/> + </xsl:when> + <xsl:when test="$param.placement = ''">before</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$param.placement"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="self::table"> + <fo:block id="{$id}" + xsl:use-attribute-sets="table.properties"> + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"> + <xsl:value-of select="$keep.together"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$placement = 'before'"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:if> + <xsl:copy-of select="$table.layout"/> + <xsl:call-template name="table.footnote.block"/> + <xsl:if test="$placement != 'before'"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:if> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="informaltable.properties"> + <xsl:copy-of select="$table.layout"/> + <xsl:call-template name="table.footnote.block"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + + +</xsl:template> + +<!-- Output a table's footnotes in a block --> +<xsl:template name="table.footnote.block"> + <xsl:if test=".//footnote"> + <fo:block keep-with-previous.within-column="always"> + <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/> + </fo:block> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="table.container"> + <xsl:param name="table.block"/> + <xsl:choose> + <xsl:when test="@orient='land' and + $fop.extensions = 0 and + $passivetex.extensions = 0" > + <fo:block-container reference-orientation="90" + padding="6pt" + xsl:use-attribute-sets="list.block.spacing"> + <xsl:attribute name="width"> + <xsl:call-template name="table.width"/> + </xsl:attribute> + <fo:block start-indent="0pt" end-indent="0pt"> + <xsl:copy-of select="$table.block"/> + </fo:block> + </fo:block-container> + </xsl:when> + <xsl:when test="@pgwide = 1"> + <fo:block xsl:use-attribute-sets="pgwide.properties"> + <xsl:copy-of select="$table.block"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$table.block"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="empty.table.cell"> + <xsl:param name="colnum" select="0"/> + + <xsl:variable name="rowsep"> + <xsl:choose> + <!-- If this is the last row, rowsep never applies (except when + the ancestor tgroup has a following sibling tgroup) --> + <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row + or ancestor-or-self::thead/following-sibling::tbody + or ancestor-or-self::tbody/preceding-sibling::tfoot) + and not(ancestor::tgroup/following-sibling::tgroup)"> + <xsl:value-of select="0"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> + <xsl:with-param name="row" select="ancestor-or-self::row[1]"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="attribute" select="'rowsep'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="colsep"> + <xsl:choose> + <!-- If this is the last column, colsep never applies. --> + <xsl:when test="number($colnum) >= ancestor::tgroup/@cols">0</xsl:when> + <xsl:otherwise> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> + <xsl:with-param name="row" select="ancestor-or-self::row[1]"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="attribute" select="'colsep'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:table-cell text-align="center" + display-align="center" + xsl:use-attribute-sets="table.cell.padding"> + <xsl:if test="$xep.extensions != 0"> + <!-- Suggested by RenderX to workaround a bug in their implementation --> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> + </xsl:if> + <xsl:if test="$rowsep > 0"> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'bottom'"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="$colsep > 0 and number($colnum) < ancestor::tgroup/@cols"> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'end'"/> + </xsl:call-template> + </xsl:if> + + <!-- fo:table-cell should not be empty --> + <fo:block/> + </fo:table-cell> +</xsl:template> + +<!-- ==================================================================== --> +<xsl:template name="table.frame"> + <xsl:param name="frame"> + <xsl:choose> + <xsl:when test="../@frame"> + <xsl:value-of select="../@frame"/> + </xsl:when> + <xsl:when test="$default.table.frame != ''"> + <xsl:value-of select="$default.table.frame"/> + </xsl:when> + <xsl:otherwise>all</xsl:otherwise> + </xsl:choose> + </xsl:param> + + + <xsl:choose> + <xsl:when test="$frame='all'"> + <xsl:attribute name="border-start-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-end-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-start-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-end-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-start-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-end-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='bottom'"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='sides'"> + <xsl:attribute name="border-start-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-end-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="border-start-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-end-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-start-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-end-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='lhs'"> + <xsl:attribute name="border-start-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="border-start-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-start-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='rhs'"> + <xsl:attribute name="border-end-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="border-end-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-end-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='top'"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="border-top-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='topbot'"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-top-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-width"> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$frame='none'"> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Impossible frame on table: </xsl:text> + <xsl:value-of select="$frame"/> + </xsl:message> + <xsl:attribute name="border-start-style">none</xsl:attribute> + <xsl:attribute name="border-end-style">none</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="border"> + <xsl:param name="side" select="'start'"/> + + <xsl:attribute name="border-{$side}-width"> + <xsl:value-of select="$table.cell.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-{$side}-style"> + <xsl:value-of select="$table.cell.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-{$side}-color"> + <xsl:value-of select="$table.cell.border.color"/> + </xsl:attribute> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="tgroup" name="tgroup"> + <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'"> + <xsl:message terminate="yes"> + <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="table.width"> + <xsl:call-template name="table.width"/> + </xsl:variable> + + <xsl:variable name="colspecs"> + <xsl:choose> + <xsl:when test="$use.extensions != 0 + and $tablecolumns.extension != 0"> + <xsl:call-template name="generate.colgroup.raw"> + <xsl:with-param name="cols" select="@cols"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate.colgroup"> + <xsl:with-param name="cols" select="@cols"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <xsl:if test="count($prop-columns) != 0 or + $fop.extensions != 0 or + $fop1.extensions != 0 or + $passivetex.extensions != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + + <xsl:attribute name="width"> + <xsl:value-of select="$table.width"/> + </xsl:attribute> + + <xsl:choose> + <xsl:when test="$use.extensions != 0 + and $tablecolumns.extension != 0"> + <xsl:choose> + <xsl:when test="function-available('stbl:adjustColumnWidths')"> + <xsl:copy-of select="stbl:adjustColumnWidths($colspecs)"/> + </xsl:when> + <xsl:when test="function-available('xtbl:adjustColumnWidths')"> + <xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/> + </xsl:when> + <xsl:when test="function-available('ptbl:adjustColumnWidths')"> + <xsl:copy-of select="ptbl:adjustColumnWidths($colspecs)"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No adjustColumnWidths function available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$colspecs"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates select="thead"/> + <xsl:apply-templates select="tfoot"/> + <xsl:apply-templates select="tbody"/> +</xsl:template> + +<xsl:template match="colspec"></xsl:template> + +<xsl:template name="table.width"> + + <xsl:variable name="numcols"> + <xsl:call-template name="widest-html-row"> + <xsl:with-param name="rows" select=".//tr"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="explicit.table.width"> + <xsl:choose> + <xsl:when test="self::entrytbl"> + <xsl:call-template name="pi.dbfo_table-width"/> + </xsl:when> + <xsl:when test="self::table or self::informaltable"> + <xsl:call-template name="pi.dbfo_table-width"/> + </xsl:when> + <xsl:otherwise> + <!-- * no dbfo@table-width PI as a child of this table, so check --> + <!-- * the parent of this table to see if the table has any --> + <!-- * sibling dbfo@table-width PIs (FIXME: 2007-07 MikeSmith: we --> + <!-- * should really instead be checking here just to see if the --> + <!-- * first preceding sibling of this table is a --> + <!-- * dbfo@table-width PI) --> + <xsl:call-template name="pi.dbfo_table-width"> + <xsl:with-param name="node" select=".."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="column.sum"> + <xsl:choose> + <!-- CALS table --> + <xsl:when test="tgroup/@cols"> + <!-- change context to the first tgroup --> + <xsl:for-each select="tgroup[1]"> + <xsl:if test="count(colspec) = @cols"> + <xsl:for-each select="colspec"> + <xsl:if test="position() != 1"> + <xsl:text> + </xsl:text> + </xsl:if> + <xsl:choose> + <xsl:when test="not(@colwidth)">NOWIDTH</xsl:when> + <xsl:when test="contains(@colwidth, '*')">NOWIDTH</xsl:when> + <xsl:otherwise> + <xsl:value-of select="@colwidth"/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <!-- HTML table --> + <xsl:if test="count(col|colgroup/col) = $numcols"> + <xsl:for-each select="col|colgroup/col"> + <xsl:if test="position() != 1"> + <xsl:text> + </xsl:text> + </xsl:if> + <xsl:choose> + <xsl:when test="not(@width)">NOWIDTH</xsl:when> + <xsl:when test="contains(@width, '%')">NOWIDTH</xsl:when> + <xsl:otherwise> + <xsl:value-of select="@width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="column.sum.width"> + <xsl:if test="not(contains($column.sum, 'NOWIDTH'))"> + <xsl:value-of select="$column.sum"/> + </xsl:if> + </xsl:variable> + + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + + <xsl:variable name="table.width"> + <xsl:choose> + <xsl:when test="$explicit.table.width != ''"> + <xsl:value-of select="$explicit.table.width"/> + </xsl:when> + <xsl:when test="$column.sum.width != ''"> + <xsl:value-of select="$column.sum.width"/> + </xsl:when> + <xsl:when test="$default.table.width = ''"> + <xsl:choose> + <!-- These processors don't support table-layout="auto" --> + <xsl:when test="$fop.extensions != 0 or + $fop1.extensions != 0 or + $passivetex.extensions != 0"> + <xsl:text>100%</xsl:text> + </xsl:when> + <!-- Proportional columns imply 100% width --> + <xsl:when test="count($prop-columns) != 0"> + <xsl:text>100%</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>auto</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$default.table.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:value-of select="$table.width"/> + +</xsl:template> + +<xsl:template match="spanspec"></xsl:template> + +<xsl:template match="thead"> + <xsl:variable name="tgroup" select="parent::*"/> + + <fo:table-header start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="row[1]"> + <xsl:with-param name="spans"> + <xsl:call-template name="blank.spans"> + <xsl:with-param name="cols" select="../@cols"/> + </xsl:call-template> + </xsl:with-param> + </xsl:apply-templates> + </fo:table-header> +</xsl:template> + +<xsl:template match="tfoot"> + <xsl:variable name="tgroup" select="parent::*"/> + + <fo:table-footer start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="row[1]"> + <xsl:with-param name="spans"> + <xsl:call-template name="blank.spans"> + <xsl:with-param name="cols" select="../@cols"/> + </xsl:call-template> + </xsl:with-param> + </xsl:apply-templates> + + </fo:table-footer> +</xsl:template> + +<xsl:template match="tbody"> + <xsl:variable name="tgroup" select="parent::*"/> + + <fo:table-body start-indent="0pt" end-indent="0pt"> + <xsl:apply-templates select="row[1]"> + <xsl:with-param name="spans"> + <xsl:call-template name="blank.spans"> + <xsl:with-param name="cols" select="../@cols"/> + </xsl:call-template> + </xsl:with-param> + </xsl:apply-templates> + </fo:table-body> +</xsl:template> + +<xsl:template match="row"> + <xsl:param name="spans"/> + + <xsl:choose> + <xsl:when test="contains($spans, '0')"> + <xsl:call-template name="normal-row"> + <xsl:with-param name="spans" select="$spans"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <!-- + <xsl:message> + <xsl:text>Ignoring row: </xsl:text> + <xsl:value-of select="$spans"/> + <xsl:text> = </xsl:text> + <xsl:call-template name="consume-row"> + <xsl:with-param name="spans" select="$spans"/> + </xsl:call-template> + </xsl:message> + --> + + <xsl:if test="normalize-space(.//text()) != ''"> + <xsl:message>Warning: overlapped row contains content!</xsl:message> + </xsl:if> + + <fo:table-row> + <xsl:comment> This row intentionally left blank </xsl:comment> + <fo:table-cell><fo:block/></fo:table-cell> + </fo:table-row> + + <xsl:apply-templates select="following-sibling::row[1]"> + <xsl:with-param name="spans"> + <xsl:call-template name="consume-row"> + <xsl:with-param name="spans" select="$spans"/> + </xsl:call-template> + </xsl:with-param> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="normal-row"> + <xsl:param name="spans"/> + + <fo:table-row> + <xsl:call-template name="table.row.properties"/> + <xsl:call-template name="anchor"/> + + <xsl:apply-templates select="(entry|entrytbl)[1]"> + <xsl:with-param name="spans" select="$spans"/> + </xsl:apply-templates> + </fo:table-row> + + <xsl:if test="following-sibling::row"> + <xsl:variable name="nextspans"> + <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span"> + <xsl:with-param name="spans" select="$spans"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:apply-templates select="following-sibling::row[1]"> + <xsl:with-param name="spans" select="$nextspans"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<!-- customize this template to add row properties --> +<xsl:template name="table.row.properties"> + + <xsl:variable name="row-height"> + <xsl:if test="processing-instruction('dbfo')"> + <xsl:call-template name="pi.dbfo_row-height"/> + </xsl:if> + </xsl:variable> + + <xsl:if test="$row-height != ''"> + <xsl:attribute name="block-progression-dimension"> + <xsl:value-of select="$row-height"/> + </xsl:attribute> + </xsl:if> + + <xsl:variable name="bgcolor"> + <xsl:call-template name="pi.dbfo_bgcolor"/> + </xsl:variable> + + <xsl:if test="$bgcolor != ''"> + <xsl:attribute name="background-color"> + <xsl:value-of select="$bgcolor"/> + </xsl:attribute> + </xsl:if> + + <!-- Keep header row with next row --> + <xsl:if test="ancestor::thead"> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + </xsl:if> + +</xsl:template> + +<xsl:template match="entry|entrytbl" name="entry"> + <xsl:param name="col" select="1"/> + <xsl:param name="spans"/> + + <xsl:variable name="row" select="parent::row"/> + <xsl:variable name="group" select="$row/parent::*[1]"/> + <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/> + + <xsl:variable name="empty.cell" select="count(node()) = 0"/> + + <xsl:variable name="named.colnum"> + <xsl:call-template name="entry.colnum"/> + </xsl:variable> + + <xsl:variable name="entry.colnum"> + <xsl:choose> + <xsl:when test="$named.colnum > 0"> + <xsl:value-of select="$named.colnum"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$col"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="entry.colspan"> + <xsl:choose> + <xsl:when test="@spanname or @namest"> + <xsl:call-template name="calculate.colspan"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="following.spans"> + <xsl:call-template name="calculate.following.spans"> + <xsl:with-param name="colspan" select="$entry.colspan"/> + <xsl:with-param name="spans" select="$spans"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="rowsep"> + <xsl:choose> + <!-- If this is the last row, rowsep never applies (except when + the ancestor tgroup has a following sibling tgroup) --> + <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row + or ancestor-or-self::thead/following-sibling::tbody + or ancestor-or-self::tbody/preceding-sibling::tfoot) + and not(ancestor::tgroup/following-sibling::tgroup)"> + <xsl:value-of select="0"/> + </xsl:when> + <!-- Check for morerows too --> + <xsl:when test="(@morerows and count(ancestor-or-self::row[1]/ + following-sibling::row) = @morerows ) + and not (ancestor-or-self::thead/following-sibling::tbody + or ancestor-or-self::tbody/preceding-sibling::tfoot) + and not(ancestor::tgroup/following-sibling::tgroup)"> + <xsl:value-of select="0"/> + </xsl:when> + + <xsl:otherwise> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="colnum" select="$entry.colnum"/> + <xsl:with-param name="attribute" select="'rowsep'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + +<!-- + <xsl:message><xsl:value-of select="."/>: <xsl:value-of select="$rowsep"/></xsl:message> +--> + + <xsl:variable name="colsep"> + <xsl:choose> + <!-- If this is the last column, colsep never applies. --> + <xsl:when test="$following.spans = ''">0</xsl:when> + <xsl:otherwise> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="colnum" select="$entry.colnum"/> + <xsl:with-param name="attribute" select="'colsep'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="valign"> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="colnum" select="$entry.colnum"/> + <xsl:with-param name="attribute" select="'valign'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="align"> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="colnum" select="$entry.colnum"/> + <xsl:with-param name="attribute" select="'align'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="char"> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="colnum" select="$entry.colnum"/> + <xsl:with-param name="attribute" select="'char'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="charoff"> + <xsl:call-template name="inherited.table.attribute"> + <xsl:with-param name="entry" select="."/> + <xsl:with-param name="colnum" select="$entry.colnum"/> + <xsl:with-param name="attribute" select="'charoff'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))"> + <xsl:call-template name="entry"> + <xsl:with-param name="col" select="$col+1"/> + <xsl:with-param name="spans" select="substring-after($spans,':')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="number($entry.colnum) > $col"> + <xsl:call-template name="empty.table.cell"> + <xsl:with-param name="colnum" select="$col"/> + </xsl:call-template> + <xsl:call-template name="entry"> + <xsl:with-param name="col" select="$col+1"/> + <xsl:with-param name="spans" select="substring-after($spans,':')"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:variable name="cell.content"> + <fo:block> + <xsl:call-template name="table.cell.block.properties"/> + + <!-- are we missing any indexterms? --> + <xsl:if test="not(preceding-sibling::entry) + and not(parent::row/preceding-sibling::row)"> + <!-- this is the first entry of the first row --> + <xsl:if test="ancestor::thead or + (ancestor::tbody + and not(ancestor::tbody/preceding-sibling::thead + or ancestor::tbody/preceding-sibling::tbody))"> + <!-- of the thead or the first tbody --> + <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/> + </xsl:if> + </xsl:if> + + <!-- + <xsl:text>(</xsl:text> + <xsl:value-of select="$rowsep"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$colsep"/> + <xsl:text>)</xsl:text> + --> + <xsl:choose> + <xsl:when test="$empty.cell"> + <xsl:text> </xsl:text> + </xsl:when> + <xsl:when test="self::entrytbl"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table xsl:use-attribute-sets="table.table.properties"> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:call-template name="tgroup"/> + </fo:table> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </xsl:variable> + + <xsl:variable name="cell-orientation"> + <xsl:call-template name="pi.dbfo_orientation"> + <xsl:with-param name="node" select="ancestor-or-self::entry"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="row-orientation"> + <xsl:call-template name="pi.dbfo_orientation"> + <xsl:with-param name="node" select="ancestor-or-self::row"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="cell-width"> + <xsl:call-template name="pi.dbfo_rotated-width"> + <xsl:with-param name="node" select="ancestor-or-self::entry"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="row-width"> + <xsl:call-template name="pi.dbfo_rotated-width"> + <xsl:with-param name="node" select="ancestor-or-self::row"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="orientation"> + <xsl:choose> + <xsl:when test="$cell-orientation != ''"> + <xsl:value-of select="$cell-orientation"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$row-orientation"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="rotated-width"> + <xsl:choose> + <xsl:when test="$cell-width != ''"> + <xsl:value-of select="$cell-width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$row-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="bgcolor"> + <xsl:call-template name="pi.dbfo_bgcolor"> + <xsl:with-param name="node" select="ancestor-or-self::entry"/> + </xsl:call-template> + </xsl:variable> + + <fo:table-cell xsl:use-attribute-sets="table.cell.padding"> + <xsl:call-template name="table.cell.properties"> + <xsl:with-param name="bgcolor.pi" select="$bgcolor"/> + <xsl:with-param name="rowsep.inherit" select="$rowsep"/> + <xsl:with-param name="colsep.inherit" select="$colsep"/> + <xsl:with-param name="col" select="$col"/> + <xsl:with-param name="valign.inherit" select="$valign"/> + <xsl:with-param name="align.inherit" select="$align"/> + <xsl:with-param name="char.inherit" select="$char"/> + </xsl:call-template> + + <xsl:call-template name="anchor"/> + + <xsl:if test="@morerows"> + <xsl:attribute name="number-rows-spanned"> + <xsl:value-of select="@morerows+1"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="$entry.colspan > 1"> + <xsl:attribute name="number-columns-spanned"> + <xsl:value-of select="$entry.colspan"/> + </xsl:attribute> + </xsl:if> + +<!-- + <xsl:if test="@charoff"> + <xsl:attribute name="charoff"> + <xsl:value-of select="@charoff"/> + </xsl:attribute> + </xsl:if> +--> + + <xsl:choose> + <xsl:when test="$fop.extensions = 0 and $passivetex.extensions = 0 + and $orientation != ''"> + <fo:block-container reference-orientation="{$orientation}"> + <xsl:if test="$rotated-width != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="$rotated-width"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$cell.content"/> + </fo:block-container> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$cell.content"/> + </xsl:otherwise> + </xsl:choose> + </fo:table-cell> + + <xsl:choose> + <xsl:when test="following-sibling::entry|following-sibling::entrytbl"> + <xsl:apply-templates select="(following-sibling::entry + |following-sibling::entrytbl)[1]"> + <xsl:with-param name="col" select="$col+$entry.colspan"/> + <xsl:with-param name="spans" select="$following.spans"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="finaltd"> + <xsl:with-param name="spans" select="$following.spans"/> + <xsl:with-param name="col" select="$col+$entry.colspan"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Expand this template to add properties to any fo:table-cell --> +<xsl:template name="table.cell.properties"> + <xsl:param name="bgcolor.pi" select="''"/> + <xsl:param name="rowsep.inherit" select="1"/> + <xsl:param name="colsep.inherit" select="1"/> + <xsl:param name="col" select="1"/> + <xsl:param name="valign.inherit" select="''"/> + <xsl:param name="align.inherit" select="''"/> + <xsl:param name="char.inherit" select="''"/> + + <xsl:choose> + <xsl:when test="ancestor::tgroup"> + <xsl:if test="$bgcolor.pi != ''"> + <xsl:attribute name="background-color"> + <xsl:value-of select="$bgcolor.pi"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="$rowsep.inherit > 0"> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'bottom'"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="$colsep.inherit > 0 and + $col < (ancestor::tgroup/@cols|ancestor::entrytbl/@cols)[last()]"> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'end'"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="$valign.inherit != ''"> + <xsl:attribute name="display-align"> + <xsl:choose> + <xsl:when test="$valign.inherit='top'">before</xsl:when> + <xsl:when test="$valign.inherit='middle'">center</xsl:when> + <xsl:when test="$valign.inherit='bottom'">after</xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Unexpected valign value: </xsl:text> + <xsl:value-of select="$valign.inherit"/> + <xsl:text>, center used.</xsl:text> + </xsl:message> + <xsl:text>center</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + + <xsl:choose> + <xsl:when test="$align.inherit = 'char' and $char.inherit != ''"> + <xsl:attribute name="text-align"> + <xsl:value-of select="$char.inherit"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="$align.inherit != ''"> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align.inherit"/> + </xsl:attribute> + </xsl:when> + </xsl:choose> + + </xsl:when> + <xsl:otherwise> + <!-- HTML table --> + <xsl:if test="$bgcolor.pi != ''"> + <xsl:attribute name="background-color"> + <xsl:value-of select="$bgcolor.pi"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="$align.inherit != ''"> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align.inherit"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="$valign.inherit != ''"> + <xsl:attribute name="display-align"> + <xsl:choose> + <xsl:when test="$valign.inherit='top'">before</xsl:when> + <xsl:when test="$valign.inherit='middle'">center</xsl:when> + <xsl:when test="$valign.inherit='bottom'">after</xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Unexpected valign value: </xsl:text> + <xsl:value-of select="$valign.inherit"/> + <xsl:text>, center used.</xsl:text> + </xsl:message> + <xsl:text>center</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name="html.table.cell.rules"/> + + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<!-- Expand this template to add properties to any cell's block --> +<xsl:template name="table.cell.block.properties"> + <!-- highlight this entry? --> + <xsl:if test="ancestor::thead or ancestor::tfoot"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + </xsl:if> +</xsl:template> + +<xsl:template match="entry|entrytbl" name="sentry" mode="span"> + <xsl:param name="col" select="1"/> + <xsl:param name="spans"/> + + <xsl:variable name="entry.colnum"> + <xsl:call-template name="entry.colnum"/> + </xsl:variable> + + <xsl:variable name="entry.colspan"> + <xsl:choose> + <xsl:when test="@spanname or @namest"> + <xsl:call-template name="calculate.colspan"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="following.spans"> + <xsl:call-template name="calculate.following.spans"> + <xsl:with-param name="colspan" select="$entry.colspan"/> + <xsl:with-param name="spans" select="$spans"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))"> + <xsl:value-of select="substring-before($spans,':')-1"/> + <xsl:text>:</xsl:text> + <xsl:call-template name="sentry"> + <xsl:with-param name="col" select="$col+1"/> + <xsl:with-param name="spans" select="substring-after($spans,':')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="number($entry.colnum) > $col"> + <xsl:text>0:</xsl:text> + <xsl:call-template name="sentry"> + <xsl:with-param name="col" select="$col + 1"/> + <xsl:with-param name="spans" select="substring-after($spans,':')"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:call-template name="copy-string"> + <xsl:with-param name="count" select="$entry.colspan"/> + <xsl:with-param name="string"> + <xsl:choose> + <xsl:when test="@morerows"> + <xsl:value-of select="@morerows"/> + </xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + <xsl:text>:</xsl:text> + </xsl:with-param> + </xsl:call-template> + + <xsl:choose> + <xsl:when test="following-sibling::entry|following-sibling::entrytbl"> + <xsl:apply-templates select="(following-sibling::entry + |following-sibling::entrytbl)[1]" + mode="span"> + <xsl:with-param name="col" select="$col+$entry.colspan"/> + <xsl:with-param name="spans" select="$following.spans"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="sfinaltd"> + <xsl:with-param name="spans" select="$following.spans"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="generate.colgroup.raw"> + <xsl:param name="cols" select="1"/> + <xsl:param name="count" select="1"/> + + <xsl:choose> + <xsl:when test="$count>$cols"></xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate.col.raw"> + <xsl:with-param name="countcol" select="$count"/> + </xsl:call-template> + <xsl:call-template name="generate.colgroup.raw"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="count" select="$count+1"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="generate.colgroup"> + <xsl:param name="cols" select="1"/> + <xsl:param name="count" select="1"/> + + <xsl:choose> + <xsl:when test="$count>$cols"></xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate.col"> + <xsl:with-param name="countcol" select="$count"/> + </xsl:call-template> + <xsl:call-template name="generate.colgroup"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="count" select="$count+1"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="generate.col.raw"> + <!-- generate the table-column for column countcol --> + <xsl:param name="countcol">1</xsl:param> + <xsl:param name="colspecs" select="./colspec"/> + <xsl:param name="count">1</xsl:param> + <xsl:param name="colnum">1</xsl:param> + + <xsl:choose> + <xsl:when test="$count>count($colspecs)"> + <fo:table-column column-number="{$countcol}"/> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="colspec" select="$colspecs[$count=position()]"/> + + <xsl:variable name="colspec.colnum"> + <xsl:choose> + <xsl:when test="$colspec/@colnum"> + <xsl:value-of select="$colspec/@colnum"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$colnum"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="colspec.colwidth"> + <xsl:choose> + <xsl:when test="$colspec/@colwidth"> + <xsl:value-of select="$colspec/@colwidth"/> + </xsl:when> + <xsl:otherwise>1*</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$colspec.colnum=$countcol"> + <fo:table-column column-number="{$countcol}"> + <xsl:attribute name="column-width"> + <xsl:value-of select="$colspec.colwidth"/> + </xsl:attribute> + </fo:table-column> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate.col.raw"> + <xsl:with-param name="countcol" select="$countcol"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="count" select="$count+1"/> + <xsl:with-param name="colnum"> + <xsl:choose> + <xsl:when test="$colspec/@colnum"> + <xsl:value-of select="$colspec/@colnum + 1"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$colnum + 1"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="generate.col"> + <!-- generate the table-column for column countcol --> + <xsl:param name="countcol">1</xsl:param> + <xsl:param name="colspecs" select="./colspec"/> + <xsl:param name="count">1</xsl:param> + <xsl:param name="colnum">1</xsl:param> + + <xsl:choose> + <xsl:when test="$count>count($colspecs)"> + <fo:table-column column-number="{$countcol}"> + <xsl:variable name="colwidth"> + <xsl:call-template name="calc.column.width"/> + </xsl:variable> + <xsl:if test="$colwidth != 'proportional-column-width(1)'"> + <xsl:attribute name="column-width"> + <xsl:value-of select="$colwidth"/> + </xsl:attribute> + </xsl:if> + </fo:table-column> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="colspec" select="$colspecs[$count=position()]"/> + + <xsl:variable name="colspec.colnum"> + <xsl:choose> + <xsl:when test="$colspec/@colnum"> + <xsl:value-of select="$colspec/@colnum"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$colnum"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="colspec.colwidth"> + <xsl:choose> + <xsl:when test="$colspec/@colwidth"> + <xsl:value-of select="$colspec/@colwidth"/> + </xsl:when> + <xsl:otherwise>1*</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$colspec.colnum=$countcol"> + <fo:table-column column-number="{$countcol}"> + <xsl:variable name="colwidth"> + <xsl:call-template name="calc.column.width"> + <xsl:with-param name="colwidth"> + <xsl:value-of select="$colspec.colwidth"/> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + <xsl:if test="$colwidth != 'proportional-column-width(1)'"> + <xsl:attribute name="column-width"> + <xsl:value-of select="$colwidth"/> + </xsl:attribute> + </xsl:if> + </fo:table-column> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate.col"> + <xsl:with-param name="countcol" select="$countcol"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="count" select="$count+1"/> + <xsl:with-param name="colnum"> + <xsl:choose> + <xsl:when test="$colspec/@colnum"> + <xsl:value-of select="$colspec/@colnum + 1"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$colnum + 1"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<doc:template name="calc.column.width" xmlns=""> +<refpurpose>Calculate an XSL FO table column width specification from a +CALS table column width specification.</refpurpose> + +<refdescription> +<para>CALS expresses table column widths in the following basic +forms:</para> + +<itemizedlist> +<listitem> +<para><emphasis>99.99units</emphasis>, a fixed length specifier.</para> +</listitem> +<listitem> +<para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para> +</listitem> +<listitem> +<para><emphasis>99.99*</emphasis>, a relative length specifier.</para> +</listitem> +<listitem> +<para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para> +</listitem> +</itemizedlist> + +<para>The CALS units are points (pt), picas (pi), centimeters (cm), +millimeters (mm), and inches (in). These are the same units as XSL, +except that XSL abbreviates picas "pc" instead of "pi". If a length +specifier has no units, the CALS default unit (pt) is assumed.</para> + +<para>Relative length specifiers are represented in XSL with the +proportional-column-width() function.</para> + +<para>Here are some examples:</para> + +<itemizedlist> +<listitem> +<para>"36pt" becomes "36pt"</para> +</listitem> +<listitem> +<para>"3pi" becomes "3pc"</para> +</listitem> +<listitem> +<para>"36" becomes "36pt"</para> +</listitem> +<listitem> +<para>"3*" becomes "proportional-column-width(3)"</para> +</listitem> +<listitem> +<para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para> +</listitem> +<listitem> +<para>"1*+2" becomes "proportional-column-width(1)+2pt"</para> +</listitem> +</itemizedlist> +</refdescription> + +<refparameter> +<variablelist> +<varlistentry><term>colwidth</term> +<listitem> +<para>The CALS column width specification.</para> +</listitem> +</varlistentry> +</variablelist> +</refparameter> + +<refreturn> +<para>The XSL column width specification.</para> +</refreturn> +</doc:template> + +<xsl:template name="calc.column.width"> + <xsl:param name="colwidth">1*</xsl:param> + + <!-- Ok, the colwidth could have any one of the following forms: --> + <!-- 1* = proportional width --> + <!-- * = same as 1* --> + <!-- 1unit = 1.0 units wide --> + <!-- 1 = 1pt wide --> + <!-- 1*+1unit = proportional width + some fixed width --> + <!-- 1*+1 = proportional width + some fixed width --> + + <!-- If it has a proportional width, translate it to XSL --> + <xsl:if test="contains($colwidth, '*')"> + <xsl:text>proportional-column-width(</xsl:text> + <xsl:choose> + <xsl:when test="substring-before($colwidth, '*') != ''"> + <xsl:value-of select="substring-before($colwidth, '*')"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>1.00</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:text>)</xsl:text> + </xsl:if> + + <!-- Now grab the non-proportional part of the specification --> + <xsl:variable name="width-units"> + <xsl:choose> + <xsl:when test="contains($colwidth, '*')"> + <xsl:value-of + select="normalize-space(substring-after($colwidth, '*'))"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space($colwidth)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Ok, now the width-units could have any one of the following forms: --> + <!-- = <empty string> --> + <!-- 1unit = 1.0 units wide --> + <!-- 1 = 1pt wide --> + <!-- with an optional leading sign --> + + <!-- Grab the width part by blanking out the units part and discarding --> + <!-- whitespace. It's not pretty, but it works. --> + <xsl:variable name="width" + select="normalize-space(translate($width-units, + '+-0123456789.abcdefghijklmnopqrstuvwxyz', + '+-0123456789.'))"/> + + <!-- Grab the units part by blanking out the width part and discarding --> + <!-- whitespace. It's not pretty, but it works. --> + <xsl:variable name="units" + select="normalize-space(translate($width-units, + 'abcdefghijklmnopqrstuvwxyz+-0123456789.', + 'abcdefghijklmnopqrstuvwxyz'))"/> + + <!-- Output the width --> + <xsl:value-of select="$width"/> + + <!-- Output the units, translated appropriately --> + <xsl:choose> + <xsl:when test="$units = 'pi'">pc</xsl:when> + <xsl:when test="$units = '' and $width != ''">pt</xsl:when> + <xsl:otherwise><xsl:value-of select="$units"/></xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/task.xsl b/3rdParty/DocBook/XSL/fo/task.xsl new file mode 100644 index 0000000..c864bc6 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/task.xsl @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<!-- ******************************************************************** + $Id: task.xsl 8011 2008-05-23 15:14:57Z mzjn $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:template match="task"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="param.placement" + select="substring-after(normalize-space($formal.title.placement), + concat(local-name(.), ' '))"/> + + <xsl:variable name="placement"> + <xsl:choose> + <xsl:when test="contains($param.placement, ' ')"> + <xsl:value-of select="substring-before($param.placement, ' ')"/> + </xsl:when> + <xsl:when test="$param.placement = ''">before</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$param.placement"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="preamble" + select="*[not(self::title + or self::titleabbrev)]"/> + + <xsl:variable name="keep.together"> + <xsl:call-template name="pi.dbfo_keep-together"/> + </xsl:variable> + + <fo:block id="{$id}" + xsl:use-attribute-sets="formal.object.properties"> + + <xsl:if test="$keep.together != ''"> + <xsl:attribute name="keep-together.within-column"><xsl:value-of + select="$keep.together"/></xsl:attribute> + </xsl:if> + + <xsl:call-template name="anchor"/> + + <xsl:if test="title and $placement = 'before'"> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + + <xsl:apply-templates select="$preamble"/> + + <xsl:if test="title and $placement != 'before'"> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="task/title"> + <!-- nop --> +</xsl:template> + +<xsl:template match="tasksummary"> + <xsl:call-template name="semiformal.object"/> +</xsl:template> + +<xsl:template match="tasksummary/title"/> + +<xsl:template match="taskprerequisites"> + <xsl:call-template name="semiformal.object"/> +</xsl:template> + +<xsl:template match="taskprerequisites/title"/> + +<xsl:template match="taskrelated"> + <xsl:call-template name="semiformal.object"/> +</xsl:template> + +<xsl:template match="taskrelated/title"/> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/titlepage.templates.xml b/3rdParty/DocBook/XSL/fo/titlepage.templates.xml new file mode 100644 index 0000000..e3434bc --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/titlepage.templates.xml @@ -0,0 +1,1354 @@ +<!DOCTYPE t:templates [ +<!ENTITY hsize0 "10pt"> +<!ENTITY hsize1 "12pt"> +<!ENTITY hsize2 "14.4pt"> +<!ENTITY hsize3 "17.28pt"> +<!ENTITY hsize4 "20.736pt"> +<!ENTITY hsize5 "24.8832pt"> +<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 --> +<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 --> +<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 --> +<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 --> +<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 --> +<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 --> +]> +<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0" + xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + +<!-- ******************************************************************** + $Id: titlepage.templates.xml 8341 2009-03-16 03:00:56Z bobstayton $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<t:titlepage t:element="article" t:wrapper="fo:block" + font-family="{$title.fontset}"> + + <t:titlepage-content t:side="recto" + start-indent="0pt" + text-align="center"> + + <title t:named-template="component.title" + param:node="ancestor-or-self::article[1]" + keep-with-next.within-column="always" + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle/> + + <corpauthor space-before="0.5em" + font-size="&hsize2;"/> + <authorgroup space-before="0.5em" + font-size="&hsize2;"/> + <author space-before="0.5em" + font-size="&hsize2;"/> + + <!-- If you add editor, include this t:predicate attribute + because only the first editor generates the list of editors. + <editor t:predicate="[position() = 1]"/> + --> + <othercredit space-before="0.5em"/> + <releaseinfo space-before="0.5em"/> + <copyright space-before="0.5em"/> + <legalnotice text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.fontset}"/> + <pubdate space-before="0.5em"/> + <revision space-before="0.5em"/> + <revhistory space-before="0.5em"/> + <abstract space-before="0.5em" + text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="set" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:named-template="division.title" + param:node="ancestor-or-self::set[1]" + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}" + text-align="center"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="book" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:named-template="division.title" + param:node="ancestor-or-self::book[1]" + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.fontset}"/> + <subtitle + text-align="center" + font-size="&hsize4;" + space-before="&hsize4space;" + font-family="{$title.fontset}"/> + <corpauthor font-size="&hsize3;" + keep-with-next.within-column="always" + space-before="2in"/> + <authorgroup space-before="2in"/> + <author font-size="&hsize3;" + space-before="&hsize2space;" + keep-with-next.within-column="always"/> + <!-- If you add editor, include this t:predicate attribute + because only the first editor generates the list of editors. + <editor t:predicate="[position() = 1]"/> + --> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + <title + t:named-template="book.verso.title" + font-size="&hsize2;" + font-weight="bold" + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup t:named-template="verso.authorgroup"/> + <author/> + <!-- If you add editor, include this t:predicate attribute + because only the first editor generates the list of editors. + <editor t:predicate="[position() = 1]"/> + --> + <othercredit/> + <releaseinfo space-before="0.5em"/> + <pubdate space-before="1em"/> + <copyright/> + <abstract/> + <legalnotice font-size="8pt"/> + </t:titlepage-content> + + <t:titlepage-separator> + <fo:block break-after="page"/> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + <fo:block break-after="page"/> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="part" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:named-template="division.title" + param:node="ancestor-or-self::part[1]" + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.fontset}"/> + <subtitle + text-align="center" + font-size="&hsize4;" + space-before="&hsize4space;" + font-weight='bold' + font-style='italic' + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="partintro" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + text-align="center" + font-size="&hsize5;" + font-weight="bold" + space-before="1em" + font-family="{$title.fontset}"/> + <subtitle + text-align="center" + font-size="&hsize2;" + font-weight="bold" + font-style="italic" + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="reference" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:named-template="division.title" + param:node="ancestor-or-self::reference[1]" + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}" + text-align="center"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsection" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect1" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect2" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect3" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="dedication" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::dedication[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<!-- Same formatting as dedication --> + <t:titlepage t:element="acknowledgements" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::acknowledgements[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + + +<!-- ==================================================================== --> + + <t:titlepage t:element="preface" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::preface[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="chapter" t:wrapper="fo:block" + font-family="{$title.fontset}"> + <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}"> + <title t:named-template="component.title" + param:node="ancestor-or-self::chapter[1]" + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle space-before="0.5em" + font-style="italic" + font-size="&hsize2;" + font-weight="bold"/> + + <corpauthor space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <authorgroup space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <author space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="appendix" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:named-template="component.title" + param:node="ancestor-or-self::appendix[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-weight="bold" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="section" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect1" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect2" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect3" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect4" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect5" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="simplesect" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="bibliography" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::bibliography[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="bibliodiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:named-template="component.title" + param:node="ancestor-or-self::bibliodiv[1]" + margin-left="{$title.margin.left}" + font-size="&hsize4;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="glossary" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::glossary[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="glossdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:named-template="component.title" + param:node="ancestor-or-self::glossdiv[1]" + margin-left="{$title.margin.left}" + font-size="&hsize4;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="index" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::index[1]" + param:pagewide="1" + margin-left="0pt" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <!-- The indexdiv.title template is used so that manual and --> + <!-- automatically generated indexdiv titles get the same --> + <!-- formatting. --> + + <t:titlepage t:element="indexdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:force="1" + t:named-template="indexdiv.title" + param:title="title"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="setindex" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::setindex[1]" + param:pagewide="1" + margin-left="0pt" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="colophon" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::colophon[1]" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="sidebar" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.fontset}" + font-weight="bold"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> +<t:titlepage t:element="qandaset" t:wrapper="fo:block" + font-family="{$title.fontset}"> + + <t:titlepage-content t:side="recto" + start-indent="0pt" + text-align="center"> + + <title t:named-template="component.title" + param:node="ancestor-or-self::qandaset[1]" + keep-with-next.within-column="always" + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle/> + + <corpauthor space-before="0.5em" + font-size="&hsize2;"/> + <authorgroup space-before="0.5em" + font-size="&hsize2;"/> + <author space-before="0.5em" + font-size="&hsize2;"/> + + <othercredit space-before="0.5em"/> + <releaseinfo space-before="0.5em"/> + <copyright space-before="0.5em"/> + <legalnotice text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.fontset}"/> + <pubdate space-before="0.5em"/> + <revision space-before="0.5em"/> + <revhistory space-before="0.5em"/> + <abstract space-before="0.5em" + text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="table.of.contents" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'TableofContents'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.tables" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofTables'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.figures" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofFigures'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.examples" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofExamples'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.equations" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofEquations'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofProcedures'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofUnknown'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + start-indent="0pt" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + +</t:templates> diff --git a/3rdParty/DocBook/XSL/fo/titlepage.templates.xsl b/3rdParty/DocBook/XSL/fo/titlepage.templates.xsl new file mode 100644 index 0000000..0b9cafa --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/titlepage.templates.xsl @@ -0,0 +1,5182 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl"> + +<!-- This stylesheet was created by template/titlepage.xsl--> + +<xsl:template name="article.titlepage.recto"> + <xsl:choose> + <xsl:when test="articleinfo/title"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/> + </xsl:when> + <xsl:when test="artheader/title"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="articleinfo/subtitle"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/> + </xsl:when> + <xsl:when test="artheader/subtitle"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/> + <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="article.titlepage.verso"> +</xsl:template> + +<xsl:template name="article.titlepage.separator"> +</xsl:template> + +<xsl:template name="article.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="article.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="article.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}"> + <xsl:variable name="recto.content"> + <xsl:call-template name="article.titlepage.before.recto"/> + <xsl:call-template name="article.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="article.titlepage.before.verso"/> + <xsl:call-template name="article.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="article.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="article.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="article.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::article[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}"> +<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="set.titlepage.recto"> + <xsl:choose> + <xsl:when test="setinfo/title"> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="setinfo/subtitle"> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/> + <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="set.titlepage.verso"> +</xsl:template> + +<xsl:template name="set.titlepage.separator"> +</xsl:template> + +<xsl:template name="set.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="set.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="set.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="set.titlepage.before.recto"/> + <xsl:call-template name="set.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="set.titlepage.before.verso"/> + <xsl:call-template name="set.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="set.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="set.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="set.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="division.title"> +<xsl:with-param name="node" select="ancestor-or-self::set[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style"> +<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="book.titlepage.recto"> + <xsl:choose> + <xsl:when test="bookinfo/title"> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="bookinfo/subtitle"> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/> + <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/> +</xsl:template> + +<xsl:template name="book.titlepage.verso"> + <xsl:choose> + <xsl:when test="bookinfo/title"> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/> + <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/> +</xsl:template> + +<xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/> +</xsl:template> + +<xsl:template name="book.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/> +</xsl:template> + +<xsl:template name="book.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="book.titlepage.before.recto"/> + <xsl:call-template name="book.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="book.titlepage.before.verso"/> + <xsl:call-template name="book.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="book.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="book.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="book.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="book.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="division.title"> +<xsl:with-param name="node" select="ancestor-or-self::book[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next.within-column="always" space-before="2in"> +<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in"> +<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="book.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next.within-column="always"> +<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="title" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="book.verso.title"> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style"> +<xsl:call-template name="verso.authorgroup"> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt"> +<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="part.titlepage.recto"> + <xsl:choose> + <xsl:when test="partinfo/title"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="partinfo/subtitle"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="part.titlepage.verso"> +</xsl:template> + +<xsl:template name="part.titlepage.separator"> +</xsl:template> + +<xsl:template name="part.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="part.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="part.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="part.titlepage.before.recto"/> + <xsl:call-template name="part.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="part.titlepage.before.verso"/> + <xsl:call-template name="part.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="part.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="part.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="part.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="part.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="division.title"> +<xsl:with-param name="node" select="ancestor-or-self::part[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="partintro.titlepage.recto"> + <xsl:choose> + <xsl:when test="partintroinfo/title"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="partintroinfo/subtitle"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/> + <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="partintro.titlepage.verso"> +</xsl:template> + +<xsl:template name="partintro.titlepage.separator"> +</xsl:template> + +<xsl:template name="partintro.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="partintro.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="partintro.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="partintro.titlepage.before.recto"/> + <xsl:call-template name="partintro.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="partintro.titlepage.before.verso"/> + <xsl:call-template name="partintro.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="partintro.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="partintro.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="partintro.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style"> +<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="reference.titlepage.recto"> + <xsl:choose> + <xsl:when test="referenceinfo/title"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="referenceinfo/subtitle"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/> + <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="reference.titlepage.verso"> +</xsl:template> + +<xsl:template name="reference.titlepage.separator"> +</xsl:template> + +<xsl:template name="reference.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="reference.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="reference.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="reference.titlepage.before.recto"/> + <xsl:call-template name="reference.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="reference.titlepage.before.verso"/> + <xsl:call-template name="reference.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="reference.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="reference.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="reference.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="division.title"> +<xsl:with-param name="node" select="ancestor-or-self::reference[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style"> +<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsynopsisdivinfo/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/> + <xsl:call-template name="refsynopsisdiv.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/> + <xsl:call-template name="refsynopsisdiv.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="refsynopsisdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsection.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsectioninfo/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsection.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsection.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsection.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsection.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsection.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="refsection.titlepage.before.recto"/> + <xsl:call-template name="refsection.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="refsection.titlepage.before.verso"/> + <xsl:call-template name="refsection.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="refsection.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsection.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsection.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsection.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect1.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect1info/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect1.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect1.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="refsect1.titlepage.before.recto"/> + <xsl:call-template name="refsect1.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="refsect1.titlepage.before.verso"/> + <xsl:call-template name="refsect1.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="refsect1.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect1.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect1.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect2.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect2info/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect2.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect2.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="refsect2.titlepage.before.recto"/> + <xsl:call-template name="refsect2.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="refsect2.titlepage.before.verso"/> + <xsl:call-template name="refsect2.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="refsect2.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect2.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect2.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect3.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect3info/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect3.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect3.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="refsect3.titlepage.before.recto"/> + <xsl:call-template name="refsect3.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="refsect3.titlepage.before.verso"/> + <xsl:call-template name="refsect3.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="refsect3.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect3.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect3.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="dedication.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="dedicationinfo/subtitle"> + <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="dedication.titlepage.verso"> +</xsl:template> + +<xsl:template name="dedication.titlepage.separator"> +</xsl:template> + +<xsl:template name="dedication.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="dedication.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="dedication.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="dedication.titlepage.before.recto"/> + <xsl:call-template name="dedication.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="dedication.titlepage.before.verso"/> + <xsl:call-template name="dedication.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="dedication.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="dedication.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="dedication.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="acknowledgements.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="acknowledgementsinfo/subtitle"> + <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="acknowledgements.titlepage.verso"> +</xsl:template> + +<xsl:template name="acknowledgements.titlepage.separator"> +</xsl:template> + +<xsl:template name="acknowledgements.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="acknowledgements.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="acknowledgements.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="acknowledgements.titlepage.before.recto"/> + <xsl:call-template name="acknowledgements.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="acknowledgements.titlepage.before.verso"/> + <xsl:call-template name="acknowledgements.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="acknowledgements.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="acknowledgements.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="acknowledgements.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="preface.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::preface[1]"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="prefaceinfo/subtitle"> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/> + <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="preface.titlepage.verso"> +</xsl:template> + +<xsl:template name="preface.titlepage.separator"> +</xsl:template> + +<xsl:template name="preface.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="preface.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="preface.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="preface.titlepage.before.recto"/> + <xsl:call-template name="preface.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="preface.titlepage.before.verso"/> + <xsl:call-template name="preface.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="preface.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="preface.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="preface.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style"> +<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="chapter.titlepage.recto"> + <xsl:choose> + <xsl:when test="chapterinfo/title"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="chapterinfo/subtitle"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/> + <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="chapter.titlepage.verso"> +</xsl:template> + +<xsl:template name="chapter.titlepage.separator"> +</xsl:template> + +<xsl:template name="chapter.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="chapter.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="chapter.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}"> + <xsl:variable name="recto.content"> + <xsl:call-template name="chapter.titlepage.before.recto"/> + <xsl:call-template name="chapter.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="chapter.titlepage.before.verso"/> + <xsl:call-template name="chapter.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="chapter.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="chapter.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="chapter.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="appendix.titlepage.recto"> + <xsl:choose> + <xsl:when test="appendixinfo/title"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="appendixinfo/subtitle"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/> + <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="appendix.titlepage.verso"> +</xsl:template> + +<xsl:template name="appendix.titlepage.separator"> +</xsl:template> + +<xsl:template name="appendix.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="appendix.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="appendix.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="appendix.titlepage.before.recto"/> + <xsl:call-template name="appendix.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="appendix.titlepage.before.verso"/> + <xsl:call-template name="appendix.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="appendix.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="appendix.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="appendix.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style"> +<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="section.titlepage.recto"> + <xsl:choose> + <xsl:when test="sectioninfo/title"> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sectioninfo/subtitle"> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/> + <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="section.titlepage.verso"> +</xsl:template> + +<xsl:template name="section.titlepage.separator"> +</xsl:template> + +<xsl:template name="section.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="section.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="section.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="section.titlepage.before.recto"/> + <xsl:call-template name="section.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="section.titlepage.before.verso"/> + <xsl:call-template name="section.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="section.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="section.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="section.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style"> +<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="sect1.titlepage.recto"> + <xsl:choose> + <xsl:when test="sect1info/title"> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sect1info/subtitle"> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/> + <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="sect1.titlepage.verso"> +</xsl:template> + +<xsl:template name="sect1.titlepage.separator"> +</xsl:template> + +<xsl:template name="sect1.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="sect1.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="sect1.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="sect1.titlepage.before.recto"/> + <xsl:call-template name="sect1.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="sect1.titlepage.before.verso"/> + <xsl:call-template name="sect1.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="sect1.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="sect1.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="sect1.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="sect2.titlepage.recto"> + <xsl:choose> + <xsl:when test="sect2info/title"> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sect2info/subtitle"> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/> + <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="sect2.titlepage.verso"> +</xsl:template> + +<xsl:template name="sect2.titlepage.separator"> +</xsl:template> + +<xsl:template name="sect2.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="sect2.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="sect2.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="sect2.titlepage.before.recto"/> + <xsl:call-template name="sect2.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="sect2.titlepage.before.verso"/> + <xsl:call-template name="sect2.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="sect2.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="sect2.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="sect2.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="sect3.titlepage.recto"> + <xsl:choose> + <xsl:when test="sect3info/title"> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sect3info/subtitle"> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/> + <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="sect3.titlepage.verso"> +</xsl:template> + +<xsl:template name="sect3.titlepage.separator"> +</xsl:template> + +<xsl:template name="sect3.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="sect3.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="sect3.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="sect3.titlepage.before.recto"/> + <xsl:call-template name="sect3.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="sect3.titlepage.before.verso"/> + <xsl:call-template name="sect3.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="sect3.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="sect3.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="sect3.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="sect4.titlepage.recto"> + <xsl:choose> + <xsl:when test="sect4info/title"> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sect4info/subtitle"> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/> + <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="sect4.titlepage.verso"> +</xsl:template> + +<xsl:template name="sect4.titlepage.separator"> +</xsl:template> + +<xsl:template name="sect4.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="sect4.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="sect4.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="sect4.titlepage.before.recto"/> + <xsl:call-template name="sect4.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="sect4.titlepage.before.verso"/> + <xsl:call-template name="sect4.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="sect4.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="sect4.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="sect4.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="sect5.titlepage.recto"> + <xsl:choose> + <xsl:when test="sect5info/title"> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sect5info/subtitle"> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/> + <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="sect5.titlepage.verso"> +</xsl:template> + +<xsl:template name="sect5.titlepage.separator"> +</xsl:template> + +<xsl:template name="sect5.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="sect5.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="sect5.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="sect5.titlepage.before.recto"/> + <xsl:call-template name="sect5.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="sect5.titlepage.before.verso"/> + <xsl:call-template name="sect5.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="sect5.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="sect5.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="sect5.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style"> +<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="simplesect.titlepage.recto"> + <xsl:choose> + <xsl:when test="simplesectinfo/title"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="simplesectinfo/subtitle"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/> + <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="simplesect.titlepage.verso"> +</xsl:template> + +<xsl:template name="simplesect.titlepage.separator"> +</xsl:template> + +<xsl:template name="simplesect.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="simplesect.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="simplesect.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="simplesect.titlepage.before.recto"/> + <xsl:call-template name="simplesect.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="simplesect.titlepage.before.verso"/> + <xsl:call-template name="simplesect.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="simplesect.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="simplesect.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="simplesect.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style"> +<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="bibliography.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="bibliographyinfo/subtitle"> + <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="bibliography.titlepage.verso"> +</xsl:template> + +<xsl:template name="bibliography.titlepage.separator"> +</xsl:template> + +<xsl:template name="bibliography.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="bibliography.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="bibliography.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="bibliography.titlepage.before.recto"/> + <xsl:call-template name="bibliography.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="bibliography.titlepage.before.verso"/> + <xsl:call-template name="bibliography.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="bibliography.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="bibliography.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="bibliography.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="bibliodivinfo/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="bibliodivinfo/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="bibliodiv.titlepage.before.recto"/> + <xsl:call-template name="bibliodiv.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="bibliodiv.titlepage.before.verso"/> + <xsl:call-template name="bibliodiv.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="bibliodiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="bibliodiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="bibliodiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="glossary.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="glossaryinfo/subtitle"> + <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="glossary.titlepage.verso"> +</xsl:template> + +<xsl:template name="glossary.titlepage.separator"> +</xsl:template> + +<xsl:template name="glossary.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="glossary.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="glossary.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="glossary.titlepage.before.recto"/> + <xsl:call-template name="glossary.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="glossary.titlepage.before.verso"/> + <xsl:call-template name="glossary.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="glossary.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="glossary.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="glossary.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="glossdivinfo/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="glossdivinfo/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="glossdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="glossdiv.titlepage.before.recto"/> + <xsl:call-template name="glossdiv.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="glossdiv.titlepage.before.verso"/> + <xsl:call-template name="glossdiv.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="glossdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="glossdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="glossdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="index.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::index[1]"/> +<xsl:with-param name="pagewide" select="1"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="indexinfo/subtitle"> + <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="index.titlepage.verso"> +</xsl:template> + +<xsl:template name="index.titlepage.separator"> +</xsl:template> + +<xsl:template name="index.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="index.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="index.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="index.titlepage.before.recto"/> + <xsl:call-template name="index.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="index.titlepage.before.verso"/> + <xsl:call-template name="index.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="index.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="index.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="index.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style"> +<xsl:call-template name="indexdiv.title"> +<xsl:with-param name="title" select="title"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="indexdivinfo/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="indexdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="indexdiv.titlepage.before.recto"/> + <xsl:call-template name="indexdiv.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="indexdiv.titlepage.before.verso"/> + <xsl:call-template name="indexdiv.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="indexdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="indexdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="indexdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="setindex.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/> +<xsl:with-param name="pagewide" select="1"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="setindexinfo/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="setindex.titlepage.verso"> +</xsl:template> + +<xsl:template name="setindex.titlepage.separator"> +</xsl:template> + +<xsl:template name="setindex.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="setindex.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="setindex.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="setindex.titlepage.before.recto"/> + <xsl:call-template name="setindex.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="setindex.titlepage.before.verso"/> + <xsl:call-template name="setindex.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="setindex.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="setindex.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="setindex.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="colophon.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="colophoninfo/subtitle"> + <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="colophon.titlepage.verso"> +</xsl:template> + +<xsl:template name="colophon.titlepage.separator"> +</xsl:template> + +<xsl:template name="colophon.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="colophon.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="colophon.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="colophon.titlepage.before.recto"/> + <xsl:call-template name="colophon.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="colophon.titlepage.before.verso"/> + <xsl:call-template name="colophon.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="colophon.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="colophon.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="colophon.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="sidebar.titlepage.recto"> + <xsl:choose> + <xsl:when test="sidebarinfo/title"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="sidebarinfo/subtitle"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="sidebar.titlepage.verso"> +</xsl:template> + +<xsl:template name="sidebar.titlepage.separator"> +</xsl:template> + +<xsl:template name="sidebar.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="sidebar.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="sidebar.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="sidebar.titlepage.before.recto"/> + <xsl:call-template name="sidebar.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="sidebar.titlepage.before.verso"/> + <xsl:call-template name="sidebar.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="sidebar.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="sidebar.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="sidebar.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold"> +<xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}"> +<xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="qandaset.titlepage.recto"> + <xsl:choose> + <xsl:when test="qandasetinfo/title"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/> + </xsl:when> + <xsl:when test="blockinfo/title"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/> + </xsl:when> + <xsl:when test="info/title"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="qandasetinfo/subtitle"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/> + </xsl:when> + <xsl:when test="blockinfo/subtitle"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/> + </xsl:when> + <xsl:when test="info/subtitle"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/> + <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/> +</xsl:template> + +<xsl:template name="qandaset.titlepage.verso"> +</xsl:template> + +<xsl:template name="qandaset.titlepage.separator"> +</xsl:template> + +<xsl:template name="qandaset.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="qandaset.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="qandaset.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}"> + <xsl:variable name="recto.content"> + <xsl:call-template name="qandaset.titlepage.before.recto"/> + <xsl:call-template name="qandaset.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="qandaset.titlepage.before.verso"/> + <xsl:call-template name="qandaset.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="qandaset.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="qandaset.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="qandaset.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}"> +<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="table.of.contents.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'TableofContents'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="table.of.contents.titlepage.verso"> +</xsl:template> + +<xsl:template name="table.of.contents.titlepage.separator"> +</xsl:template> + +<xsl:template name="table.of.contents.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="table.of.contents.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="table.of.contents.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="table.of.contents.titlepage.before.recto"/> + <xsl:call-template name="table.of.contents.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="table.of.contents.titlepage.before.verso"/> + <xsl:call-template name="table.of.contents.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="table.of.contents.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="table.of.contents.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="table.of.contents.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template name="list.of.tables.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofTables'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.tables.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.tables.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.tables.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.tables.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.tables.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="list.of.tables.titlepage.before.recto"/> + <xsl:call-template name="list.of.tables.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="list.of.tables.titlepage.before.verso"/> + <xsl:call-template name="list.of.tables.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="list.of.tables.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.tables.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.tables.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template name="list.of.figures.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofFigures'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.figures.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.figures.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.figures.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.figures.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.figures.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="list.of.figures.titlepage.before.recto"/> + <xsl:call-template name="list.of.figures.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="list.of.figures.titlepage.before.verso"/> + <xsl:call-template name="list.of.figures.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="list.of.figures.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.figures.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.figures.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template name="list.of.examples.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofExamples'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.examples.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.examples.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.examples.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.examples.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.examples.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="list.of.examples.titlepage.before.recto"/> + <xsl:call-template name="list.of.examples.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="list.of.examples.titlepage.before.verso"/> + <xsl:call-template name="list.of.examples.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="list.of.examples.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.examples.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.examples.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template name="list.of.equations.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofEquations'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.equations.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.equations.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.equations.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.equations.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.equations.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="list.of.equations.titlepage.before.recto"/> + <xsl:call-template name="list.of.equations.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="list.of.equations.titlepage.before.verso"/> + <xsl:call-template name="list.of.equations.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="list.of.equations.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.equations.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.equations.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofProcedures'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="list.of.procedures.titlepage.before.recto"/> + <xsl:call-template name="list.of.procedures.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="list.of.procedures.titlepage.before.verso"/> + <xsl:call-template name="list.of.procedures.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="list.of.procedures.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template name="list.of.unknowns.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofUnknown'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.unknowns.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.unknowns.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.unknowns.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.unknowns.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.unknowns.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:variable name="recto.content"> + <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/> + <xsl:call-template name="list.of.unknowns.titlepage.recto"/> + </xsl:variable> + <xsl:variable name="recto.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count > 0)"> + <fo:block><xsl:copy-of select="$recto.content"/></fo:block> + </xsl:if> + <xsl:variable name="verso.content"> + <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/> + <xsl:call-template name="list.of.unknowns.titlepage.verso"/> + </xsl:variable> + <xsl:variable name="verso.elements.count"> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')"> + <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count > 0)"> + <fo:block><xsl:copy-of select="$verso.content"/></fo:block> + </xsl:if> + <xsl:call-template name="list.of.unknowns.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +</xsl:stylesheet> + diff --git a/3rdParty/DocBook/XSL/fo/titlepage.xsl b/3rdParty/DocBook/XSL/fo/titlepage.xsl new file mode 100644 index 0000000..188efee --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/titlepage.xsl @@ -0,0 +1,760 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: titlepage.xsl 8346 2009-03-16 07:09:41Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:attribute-set name="book.titlepage.recto.style"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.fontset"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size">12pt</xsl:attribute> + <xsl:attribute name="text-align">center</xsl:attribute> +</xsl:attribute-set> + +<xsl:attribute-set name="book.titlepage.verso.style"> + <xsl:attribute name="font-size">10pt</xsl:attribute> +</xsl:attribute-set> + +<xsl:attribute-set name="article.titlepage.recto.style"/> +<xsl:attribute-set name="article.titlepage.verso.style"/> + +<xsl:attribute-set name="set.titlepage.recto.style"/> +<xsl:attribute-set name="set.titlepage.verso.style"/> + +<xsl:attribute-set name="part.titlepage.recto.style"> + <xsl:attribute name="text-align">center</xsl:attribute> +</xsl:attribute-set> + +<xsl:attribute-set name="part.titlepage.verso.style"/> + +<xsl:attribute-set name="partintro.titlepage.recto.style"/> +<xsl:attribute-set name="partintro.titlepage.verso.style"/> + +<xsl:attribute-set name="reference.titlepage.recto.style"/> +<xsl:attribute-set name="reference.titlepage.verso.style"/> + +<xsl:attribute-set name="dedication.titlepage.recto.style"/> +<xsl:attribute-set name="dedication.titlepage.verso.style"/> + +<xsl:attribute-set name="acknowledgements.titlepage.recto.style"/> +<xsl:attribute-set name="acknowledgements.titlepage.verso.style"/> + +<xsl:attribute-set name="preface.titlepage.recto.style"/> +<xsl:attribute-set name="preface.titlepage.verso.style"/> + +<xsl:attribute-set name="chapter.titlepage.recto.style"/> +<xsl:attribute-set name="chapter.titlepage.verso.style"/> + +<xsl:attribute-set name="appendix.titlepage.recto.style"/> +<xsl:attribute-set name="appendix.titlepage.verso.style"/> + +<xsl:attribute-set name="bibliography.titlepage.recto.style"/> +<xsl:attribute-set name="bibliography.titlepage.verso.style"/> + +<xsl:attribute-set name="bibliodiv.titlepage.recto.style"/> +<xsl:attribute-set name="bibliodiv.titlepage.verso.style"/> + +<xsl:attribute-set name="glossary.titlepage.recto.style"/> +<xsl:attribute-set name="glossary.titlepage.verso.style"/> + +<xsl:attribute-set name="glossdiv.titlepage.recto.style"/> +<xsl:attribute-set name="glossdiv.titlepage.verso.style"/> + +<xsl:attribute-set name="index.titlepage.recto.style"/> +<xsl:attribute-set name="index.titlepage.verso.style"/> + +<xsl:attribute-set name="setindex.titlepage.recto.style"/> +<xsl:attribute-set name="setindex.titlepage.verso.style"/> + +<xsl:attribute-set name="indexdiv.titlepage.recto.style"/> +<xsl:attribute-set name="indexdiv.titlepage.verso.style"/> + +<xsl:attribute-set name="colophon.titlepage.recto.style"/> +<xsl:attribute-set name="colophon.titlepage.verso.style"/> + +<xsl:attribute-set name="sidebar.titlepage.recto.style"/> +<xsl:attribute-set name="sidebar.titlepage.verso.style"/> + +<xsl:attribute-set name="qandaset.titlepage.recto.style"/> +<xsl:attribute-set name="qandaset.titlepage.verso.style"/> + +<xsl:attribute-set name="section.titlepage.recto.style"> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> +</xsl:attribute-set> + +<xsl:attribute-set name="section.titlepage.verso.style"> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set> + +<xsl:attribute-set name="sect1.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="sect1.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="sect2.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="sect2.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="sect3.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="sect3.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="sect4.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="sect4.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="sect5.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="sect5.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="simplesect.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="simplesect.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refnamediv.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refnamediv.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsynopsisdiv.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsynopsisdiv.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsection.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsection.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect1.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect1.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect2.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect2.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect3.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect3.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="table.of.contents.titlepage.recto.style"/> +<xsl:attribute-set name="table.of.contents.titlepage.verso.style"/> + +<xsl:attribute-set name="list.of.tables.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/> + +<xsl:attribute-set name="list.of.figures.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/> + +<xsl:attribute-set name="list.of.equations.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/> + +<xsl:attribute-set name="list.of.examples.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/> + +<xsl:attribute-set name="list.of.procedures.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.procedures.contents.titlepage.verso.style"/> + +<xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="titlepage.mode"> + <!-- if an element isn't found in this mode, try the default mode --> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="abbrev" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="abstract" mode="titlepage.mode"> + <fo:block xsl:use-attribute-sets="abstract.properties"> + <fo:block xsl:use-attribute-sets="abstract.title.properties"> + <xsl:choose> + <xsl:when test="title|info/title"> + <xsl:apply-templates select="title|info/title"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Abstract'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </fo:block> + <xsl:apply-templates select="*[not(self::title)]" mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="abstract/title" mode="titlepage.mode"/> + +<xsl:template match="abstract/title" mode="titlepage.abstract.title.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="address" mode="titlepage.mode"> + <!-- use the normal address handling code --> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="affiliation" mode="titlepage.mode"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="artpagenums" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="author" mode="titlepage.mode"> + <fo:block> + <xsl:call-template name="anchor"/> + <xsl:call-template name="person.name"/> + <xsl:if test="affiliation/orgname"> + <xsl:text>, </xsl:text> + <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/> + </xsl:if> + <xsl:if test="email|affiliation/address/email"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="(email|affiliation/address/email)[1]"/> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="authorblurb" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="authorgroup" mode="titlepage.mode"> + <fo:wrapper> + <xsl:call-template name="anchor"/> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:wrapper> +</xsl:template> + +<xsl:template match="authorinitials" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="bibliomisc" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="bibliomset" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="collab" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="confgroup" mode="titlepage.mode"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="confdates" mode="titlepage.mode"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="conftitle" mode="titlepage.mode"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="confnum" mode="titlepage.mode"> + <!-- suppress --> +</xsl:template> + +<xsl:template match="contractnum" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="contractsponsor" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="contrib" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="copyright" mode="titlepage.mode"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Copyright'"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat">copyright</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="copyright.years"> + <xsl:with-param name="years" select="year"/> + <xsl:with-param name="print.ranges" select="$make.year.ranges"/> + <xsl:with-param name="single.year.ranges" + select="$make.single.year.ranges"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="holder" mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="year" mode="titlepage.mode"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="holder" mode="titlepage.mode"> + <xsl:apply-templates/> + <xsl:if test="position() < last()"> + <xsl:text>, </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="corpauthor" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="corpcredit" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="corpname" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="date" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="edition" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Edition'"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="editor" mode="titlepage.mode"> + <!-- The first editor is dealt with in the following template, + which in turn displays all editors of the same mode. --> +</xsl:template> + +<xsl:template match="editor[1]" priority="2" mode="titlepage.mode"> + <xsl:call-template name="gentext.edited.by"/> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="person.name.list"> + <xsl:with-param name="person.list" select="../editor"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="firstname" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="graphic" mode="titlepage.mode"> + <!-- use the normal graphic handling code --> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="honorific" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="isbn" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="issn" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="biblioid" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="itermset" mode="titlepage.mode"> + <!-- discard --> +</xsl:template> + +<xsl:template match="invpartnumber" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="issuenum" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="jobtitle" mode="titlepage.mode"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="keywordset" mode="titlepage.mode"> +</xsl:template> + +<xsl:template match="legalnotice" mode="titlepage.mode"> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:if test="title"> <!-- FIXME: add param for using default title? --> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="legalnotice/title" mode="titlepage.mode"> +</xsl:template> + +<xsl:template match="lineage" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="modespec" mode="titlepage.mode"> + <!-- discard --> +</xsl:template> + +<xsl:template match="orgdiv" mode="titlepage.mode"> + <xsl:if test="preceding-sibling::*[1][self::orgname]"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="orgname" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="othercredit" mode="titlepage.mode"> + <xsl:variable name="contrib" select="string(contrib)"/> + <xsl:choose> + <xsl:when test="contrib"> + <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode" select="contrib"/> + <xsl:text>: </xsl:text> + <xsl:call-template name="person.name"/> + <xsl:apply-templates mode="titlepage.mode" select="affiliation"/> + <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/> + </fo:block> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <fo:block><xsl:call-template name="person.name"/></fo:block> + <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="othercredit" mode="titlepage.othercredits"> + <xsl:text>, </xsl:text> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="othername" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="pagenums" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="printhistory" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="productname" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="productnumber" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="pubdate" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="publisher" mode="titlepage.mode"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<xsl:template match="publishername" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="pubsnumber" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="releaseinfo" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revhistory" mode="titlepage.mode"> + + <xsl:variable name="explicit.table.width"> + <xsl:call-template name="pi.dbfo_table-width"/> + </xsl:variable> + + <xsl:variable name="table.width"> + <xsl:choose> + <xsl:when test="$explicit.table.width != ''"> + <xsl:value-of select="$explicit.table.width"/> + </xsl:when> + <xsl:when test="$default.table.width = ''"> + <xsl:text>100%</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$default.table.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:table table-layout="fixed" width="{$table.width}" xsl:use-attribute-sets="revhistory.table.properties"> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="3" column-width="proportional-column-width(1)"/> + <fo:table-body start-indent="0pt" end-indent="0pt"> + <fo:table-row> + <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block xsl:use-attribute-sets="revhistory.title.properties"> + <xsl:choose> + <xsl:when test="title|info/title"> + <xsl:apply-templates select="title|info/title" mode="titlepage.mode"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'RevHistory'"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </fo:table-cell> + </fo:table-row> + <xsl:apply-templates select="*[not(self::title)]" mode="titlepage.mode"/> + </fo:table-body> + </fo:table> + +</xsl:template> + + +<xsl:template match="revhistory/revision" mode="titlepage.mode"> + <xsl:variable name="revnumber" select="revnumber"/> + <xsl:variable name="revdate" select="date"/> + <xsl:variable name="revauthor" select="authorinitials|author"/> + <xsl:variable name="revremark" select="revremark|revdescription"/> + <fo:table-row> + <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:if test="$revnumber"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Revision'"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/> + </xsl:if> + </fo:block> + </fo:table-cell> + <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/> + </fo:block> + </fo:table-cell> + <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:for-each select="$revauthor"> + <xsl:apply-templates select="." mode="titlepage.mode"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </fo:block> + </fo:table-cell> + </fo:table-row> + <xsl:if test="$revremark"> + <fo:table-row> + <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties"> + <fo:block> + <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/> + </fo:block> + </fo:table-cell> + </fo:table-row> + </xsl:if> +</xsl:template> + +<xsl:template match="revision/revnumber" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/date" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/authorinitials" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/author" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/revremark" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/revdescription" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="seriesvolnums" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="shortaffil" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subjectset" mode="titlepage.mode"> + <!-- discard --> +</xsl:template> + +<xsl:template match="subtitle" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="surname" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="titleabbrev" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="volumenum" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<!-- ==================================================================== --> +<!-- Book templates --> + +<!-- Note: these templates cannot use *.titlepage.recto.mode or + *.titlepage.verso.mode. If they do then subsequent use of a custom + titlepage.templates.xml file will not work correctly. --> + +<!-- book recto --> + +<xsl:template match="bookinfo/authorgroup|book/info/authorgroup" + mode="titlepage.mode" priority="2"> + <fo:block> + <xsl:call-template name="anchor"/> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<!-- book verso --> + +<xsl:template name="book.verso.title"> + <fo:block> + <xsl:apply-templates mode="titlepage.mode"/> + + <xsl:if test="following-sibling::subtitle + |following-sibling::info/subtitle + |following-sibling::bookinfo/subtitle"> + <xsl:text>: </xsl:text> + + <xsl:apply-templates select="(following-sibling::subtitle + |following-sibling::info/subtitle + |following-sibling::bookinfo/subtitle)[1]" + mode="book.verso.subtitle.mode"/> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="book.verso.subtitle.mode"> + <xsl:apply-templates mode="titlepage.mode"/> + <xsl:if test="following-sibling::subtitle"> + <xsl:text>: </xsl:text> + <xsl:apply-templates select="following-sibling::subtitle[1]" + mode="book.verso.subtitle.mode"/> + </xsl:if> +</xsl:template> + +<xsl:template name="verso.authorgroup"> + <fo:block> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'by'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:call-template name="person.name.list"> + <xsl:with-param name="person.list" select="author|corpauthor|editor"/> + </xsl:call-template> + </fo:block> + <xsl:apply-templates select="othercredit" mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="bookinfo/author|book/info/author" + mode="titlepage.mode" priority="2"> + <fo:block> + <xsl:call-template name="person.name"/> + </fo:block> +</xsl:template> + +<xsl:template match="bookinfo/corpauthor|book/info/corpauthor" + mode="titlepage.mode" priority="2"> + <fo:block> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="bookinfo/pubdate|book/info/pubdate" + mode="titlepage.mode" priority="2"> + <fo:block> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'pubdate'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates mode="titlepage.mode"/> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/toc.xsl b/3rdParty/DocBook/XSL/fo/toc.xsl new file mode 100644 index 0000000..cf32724 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/toc.xsl @@ -0,0 +1,332 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> + +<!-- ******************************************************************** + $Id: toc.xsl 8323 2009-03-12 22:52:17Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<!-- only set, book and part puts toc in its own page sequence --> + +<xsl:template match="set/toc | book/toc | part/toc"> + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="parent::*"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <!-- Do not output the toc element if one is already generated + by the use of $generate.toc parameter, or if + generating a source toc is turned off --> + <xsl:if test="not(contains($toc.params, 'toc')) and + ($process.source.toc != 0 or $process.empty.source.toc != 0)"> + <!-- Don't generate a page sequence unless there is content --> + <xsl:variable name="content"> + <xsl:choose> + <xsl:when test="* and $process.source.toc != 0"> + <xsl:apply-templates /> + </xsl:when> + <xsl:when test="count(*) = 0 and $process.empty.source.toc != 0"> + <!-- trick to switch context node to parent element --> + <xsl:for-each select="parent::*"> + <xsl:choose> + <xsl:when test="self::set"> + <xsl:call-template name="set.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="self::book"> + <xsl:call-template name="division.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="self::part"> + <xsl:call-template name="division.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> + </xsl:for-each> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:if test="string-length(normalize-space($content)) != 0"> + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="gentext-key" select="'TableofContents'"/> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </xsl:if> + </xsl:if> +</xsl:template> + +<xsl:template match="chapter/toc | appendix/toc | preface/toc | article/toc"> + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="parent::*"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <!-- Do not output the toc element if one is already generated + by the use of $generate.toc parameter, or if + generating a source toc is turned off --> + <xsl:if test="not(contains($toc.params, 'toc')) and + ($process.source.toc != 0 or $process.empty.source.toc != 0)"> + <xsl:choose> + <xsl:when test="* and $process.source.toc != 0"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:when test="count(*) = 0 and $process.empty.source.toc != 0"> + <!-- trick to switch context node to section element --> + <xsl:for-each select="parent::*"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + </xsl:choose> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> +</xsl:template> + +<xsl:template match="section/toc + |sect1/toc + |sect2/toc + |sect3/toc + |sect4/toc + |sect5/toc"> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="parent::*"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <!-- Do not output the toc element if one is already generated + by the use of $generate.toc parameter, or if + generating a source toc is turned off --> + <xsl:if test="not(contains($toc.params, 'toc')) and + ($process.source.toc != 0 or $process.empty.source.toc != 0)"> + <xsl:choose> + <xsl:when test="* and $process.source.toc != 0"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:when test="count(*) = 0 and $process.empty.source.toc != 0"> + <!-- trick to switch context node to section element --> + <xsl:for-each select="parent::*"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" + select="contains($toc.params, 'title')"/> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + </xsl:choose> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="tocpart|tocchap + |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"> + <xsl:apply-templates select="tocentry"/> + <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"> + <fo:block start-indent="{count(ancestor::*)*2}pc"> + <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="tocentry|lotentry|tocdiv|tocfront|tocback"> + <fo:block text-align-last="justify" + end-indent="2pc" + last-line-end-indent="-2pc"> + <fo:inline keep-with-next.within-line="always"> + <xsl:choose> + <xsl:when test="@linkend"> + <fo:basic-link internal-destination="{@linkend}"> + <xsl:apply-templates/> + </fo:basic-link> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </fo:inline> + + <xsl:choose> + <xsl:when test="@linkend"> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="dots" + keep-with-next.within-line="always"/> + <xsl:text> </xsl:text> + <fo:basic-link internal-destination="{@linkend}"> + <xsl:choose> + <xsl:when test="@pagenum"> + <xsl:value-of select="@pagenum"/> + </xsl:when> + <xsl:otherwise> + <fo:page-number-citation ref-id="{@linkend}"/> + </xsl:otherwise> + </xsl:choose> + </fo:basic-link> + </fo:inline> + </xsl:when> + <xsl:when test="@pagenum"> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="dots" + keep-with-next.within-line="always"/> + <xsl:text> </xsl:text> + <xsl:value-of select="@pagenum"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <!-- just the leaders, what else can I do? --> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="space" + keep-with-next.within-line="always"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<xsl:template match="toc/title"> + <fo:block font-weight="bold"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="toc/subtitle"> + <fo:block font-weight="bold"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="toc/titleabbrev"> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- A lot element must have content, because there is no attribute + to select what kind of list should be generated --> +<xsl:template match="book/lot | part/lot"> + <!-- Don't generate a page sequence unless there is content --> + <xsl:variable name="content"> + <xsl:choose> + <xsl:when test="* and $process.source.toc != 0"> + <xsl:apply-templates /> + </xsl:when> + <xsl:when test="not(child::*) and $process.empty.source.toc != 0"> + <xsl:call-template name="process.empty.lot"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:if test="string-length(normalize-space($content)) != 0"> + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="page.sequence"> + <xsl:with-param name="master-reference" + select="$lot-master-reference"/> + <xsl:with-param name="element" select="'toc'"/> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template match="chapter/lot | appendix/lot | preface/lot | article/lot"> + <xsl:choose> + <xsl:when test="* and $process.source.toc != 0"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + <xsl:call-template name="component.toc.separator"/> + </xsl:when> + <xsl:when test="not(child::*) and $process.empty.source.toc != 0"> + <xsl:call-template name="process.empty.lot"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="section/lot + |sect1/lot + |sect2/lot + |sect3/lot + |sect4/lot + |sect5/lot"> + <xsl:choose> + <xsl:when test="* and $process.source.toc != 0"> + <fo:block> + <xsl:apply-templates/> + </fo:block> + <xsl:call-template name="section.toc.separator"/> + </xsl:when> + <xsl:when test="not(child::*) and $process.empty.source.toc != 0"> + <xsl:call-template name="process.empty.lot"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="process.empty.lot"> + <!-- An empty lot element does not provide any information to indicate + what should be included in it. You can customize this + template to generate a lot based on @role or something --> + <xsl:message> + <xsl:text>Warning: don't know what to generate for </xsl:text> + <xsl:text>lot that has no children.</xsl:text> + </xsl:message> +</xsl:template> + +<xsl:template match="lot/title"> + <fo:block font-weight="bold"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="lot/subtitle"> + <fo:block font-weight="bold"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="lot/titleabbrev"> +</xsl:template> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/verbatim.xsl b/3rdParty/DocBook/XSL/fo/verbatim.xsl new file mode 100644 index 0000000..098489a --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/verbatim.xsl @@ -0,0 +1,465 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" + xmlns:xverb="com.nwalsh.xalan.Verbatim" + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:exsl="http://exslt.org/common" + exclude-result-prefixes="sverb xverb lxslt exsl" + version='1.0'> + +<!-- ******************************************************************** + $Id: verbatim.xsl 8344 2009-03-16 06:35:43Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- XSLTHL highlighting is turned off by default. See highlighting/README + for instructions on how to turn on XSLTHL --> +<xsl:template name="apply-highlighting"> + <xsl:apply-templates/> +</xsl:template> + +<lxslt:component prefix="xverb" + functions="numberLines"/> + +<xsl:template match="programlisting|screen|synopsis"> + <xsl:param name="suppress-numbers" select="'0'"/> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="content"> + <xsl:choose> + <xsl:when test="$suppress-numbers = '0' + and @linenumbering = 'numbered' + and $use.extensions != '0' + and $linenumbering.extension != '0'"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf"> + <xsl:choose> + <xsl:when test="$highlight.source != 0"> + <xsl:call-template name="apply-highlighting"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$highlight.source != 0"> + <xsl:call-template name="apply-highlighting"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="block.content"> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block id="{$id}" + xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> + <xsl:choose> + <xsl:when test="$hyphenate.verbatim != 0 and + $exsl.node.set.available != 0"> + <xsl:apply-templates select="exsl:node-set($content)" + mode="hyphenate.verbatim"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$content"/> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:choose> + <xsl:when test="$hyphenate.verbatim != 0 and + $exsl.node.set.available != 0"> + <xsl:apply-templates select="exsl:node-set($content)" + mode="hyphenate.verbatim"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$content"/> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <!-- Need a block-container for these features --> + <xsl:when test="@width != '' or + (self::programlisting and + starts-with($writing.mode, 'rl'))"> + <fo:block-container start-indent="0pt" end-indent="0pt"> + <xsl:if test="@width != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="concat(@width, '*', $monospace.verbatim.font.width)"/> + </xsl:attribute> + </xsl:if> + <!-- All known program code is left-to-right --> + <xsl:if test="self::programlisting and + starts-with($writing.mode, 'rl')"> + <xsl:attribute name="writing-mode">lr-tb</xsl:attribute> + </xsl:if> + <xsl:copy-of select="$block.content"/> + </fo:block-container> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$block.content"/> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template match="literallayout"> + <xsl:param name="suppress-numbers" select="'0'"/> + + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="content"> + <xsl:choose> + <xsl:when test="$suppress-numbers = '0' + and @linenumbering = 'numbered' + and $use.extensions != '0' + and $linenumbering.extension != '0'"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="@class='monospaced'"> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block id="{$id}" + xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> + + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block id="{$id}" + xsl:use-attribute-sets="verbatim.properties shade.verbatim.style"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="address"> + <xsl:param name="suppress-numbers" select="'0'"/> + + <xsl:variable name="content"> + <xsl:choose> + <xsl:when test="$suppress-numbers = '0' + and @linenumbering = 'numbered' + and $use.extensions != '0' + and $linenumbering.extension != '0'"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:block xsl:use-attribute-sets="verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> +</xsl:template> + +<xsl:template name="number.rtf.lines"> + <xsl:param name="rtf" select="''"/> + <xsl:param name="pi.context" select="."/> + + <!-- Save the global values --> + <xsl:variable name="global.linenumbering.everyNth" + select="$linenumbering.everyNth"/> + + <xsl:variable name="global.linenumbering.separator" + select="$linenumbering.separator"/> + + <xsl:variable name="global.linenumbering.width" + select="$linenumbering.width"/> + + <!-- Extract the <?dbfo linenumbering.*?> PI values --> + <xsl:variable name="pi.linenumbering.everyNth"> + <xsl:call-template name="pi.dbfo_linenumbering.everyNth"> + <xsl:with-param name="node" select="$pi.context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="pi.linenumbering.separator"> + <xsl:call-template name="pi.dbfo_linenumbering.separator"> + <xsl:with-param name="node" select="$pi.context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="pi.linenumbering.width"> + <xsl:call-template name="pi.dbfo_linenumbering.width"> + <xsl:with-param name="node" select="$pi.context"/> + </xsl:call-template> + </xsl:variable> + + <!-- Construct the 'in-context' values --> + <xsl:variable name="linenumbering.everyNth"> + <xsl:choose> + <xsl:when test="$pi.linenumbering.everyNth != ''"> + <xsl:value-of select="$pi.linenumbering.everyNth"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$global.linenumbering.everyNth"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="linenumbering.separator"> + <xsl:choose> + <xsl:when test="$pi.linenumbering.separator != ''"> + <xsl:value-of select="$pi.linenumbering.separator"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$global.linenumbering.separator"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="linenumbering.width"> + <xsl:choose> + <xsl:when test="$pi.linenumbering.width != ''"> + <xsl:value-of select="$pi.linenumbering.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$global.linenumbering.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="linenumbering.startinglinenumber"> + <xsl:choose> + <xsl:when test="$pi.context/@startinglinenumber"> + <xsl:value-of select="$pi.context/@startinglinenumber"/> + </xsl:when> + <xsl:when test="$pi.context/@continuation='continues'"> + <xsl:variable name="lastLine"> + <xsl:choose> + <xsl:when test="$pi.context/self::programlisting"> + <xsl:call-template name="lastLineNumber"> + <xsl:with-param name="listings" + select="preceding::programlisting[@linenumbering='numbered']"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$pi.context/self::screen"> + <xsl:call-template name="lastLineNumber"> + <xsl:with-param name="listings" + select="preceding::screen[@linenumbering='numbered']"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$pi.context/self::literallayout"> + <xsl:call-template name="lastLineNumber"> + <xsl:with-param name="listings" + select="preceding::literallayout[@linenumbering='numbered']"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$pi.context/self::address"> + <xsl:call-template name="lastLineNumber"> + <xsl:with-param name="listings" + select="preceding::address[@linenumbering='numbered']"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$pi.context/self::synopsis"> + <xsl:call-template name="lastLineNumber"> + <xsl:with-param name="listings" + select="preceding::synopsis[@linenumbering='numbered']"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Unexpected verbatim environment: </xsl:text> + <xsl:value-of select="local-name(.)"/> + </xsl:message> + <xsl:value-of select="0"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:value-of select="$lastLine + 1"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="function-available('sverb:numberLines')"> + <xsl:copy-of select="sverb:numberLines($rtf)"/> + </xsl:when> + <xsl:when test="function-available('xverb:numberLines')"> + <xsl:copy-of select="xverb:numberLines($rtf)"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No numberLines function available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ======================================================================== --> + +<xsl:template name="lastLineNumber"> + <xsl:param name="listings"/> + <xsl:param name="number" select="0"/> + + <xsl:variable name="lines"> + <xsl:call-template name="countLines"> + <xsl:with-param name="listing" select="string($listings[1])"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="not($listings)"> + <xsl:value-of select="$number"/> + </xsl:when> + <xsl:when test="$listings[1]/@startinglinenumber"> + <xsl:value-of select="$number + $listings[1]/@startinglinenumber + $lines - 1"/> + </xsl:when> + <xsl:when test="$listings[1]/@continuation='continues'"> + <xsl:call-template name="lastLineNumber"> + <xsl:with-param name="listings" select="listings[position() > 1]"/> + <xsl:with-param name="number" select="$number + $lines"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$lines"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="countLines"> + <xsl:param name="listing"/> + <xsl:param name="count" select="1"/> + + <xsl:choose> + <xsl:when test="contains($listing, ' ')"> + <xsl:call-template name="countLines"> + <xsl:with-param name="listing" select="substring-after($listing, ' ')"/> + <xsl:with-param name="count" select="$count + 1"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$count"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ======================================================================== --> + +<xsl:template match="node()|@*" mode="hyphenate.verbatim"> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates mode="hyphenate.verbatim"/> + </xsl:copy> +</xsl:template> + +<xsl:template match="text()" mode="hyphenate.verbatim" priority="2"> + <xsl:call-template name="hyphenate.verbatim.block"> + <xsl:with-param name="content" select="."/> + </xsl:call-template> +</xsl:template> + +<xsl:template name="hyphenate.verbatim.block"> + <xsl:param name="content" select="''"/> + <xsl:param name="count" select="1"/> + + <!-- recurse on lines first to keep recursion depth reasonable --> + <xsl:choose> + <xsl:when test="contains($content, '
')"> + <xsl:variable name="line" select="substring-before($content, '
')"/> + <xsl:variable name="rest" select="substring-after($content, '
')"/> + <xsl:call-template name="hyphenate.verbatim"> + <xsl:with-param name="content" select="concat($line, '
')"/> + </xsl:call-template> + <xsl:call-template name="hyphenate.verbatim.block"> + <xsl:with-param name="content" select="$rest"/> + <xsl:with-param name="count" select="$count + 1"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="hyphenate.verbatim"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<xsl:template name="hyphenate.verbatim"> + <xsl:param name="content"/> + <xsl:variable name="head" select="substring($content, 1, 1)"/> + <xsl:variable name="tail" select="substring($content, 2)"/> + <xsl:choose> + <!-- Place soft-hyphen after space or non-breakable space. --> + <xsl:when test="$head = ' ' or $head = ' '"> + <xsl:text> </xsl:text> + <xsl:text>­</xsl:text> + </xsl:when> + <xsl:when test="$hyphenate.verbatim.characters != '' and + translate($head, $hyphenate.verbatim.characters, '') = '' and not($tail = '')"> + <xsl:value-of select="$head"/> + <xsl:text>­</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$head"/> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="$tail"> + <xsl:call-template name="hyphenate.verbatim"> + <xsl:with-param name="content" select="$tail"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/xep.xsl b/3rdParty/DocBook/XSL/fo/xep.xsl new file mode 100644 index 0000000..14ce59f --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/xep.xsl @@ -0,0 +1,180 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:rx="http://www.renderx.com/XSL/Extensions" + version='1.0'> + +<!-- ******************************************************************** + $Id: xep.xsl 7531 2007-10-17 18:06:49Z dcramer $ + ******************************************************************** + (c) Stephane Bline Peregrine Systems 2001 + Implementation of xep extensions: + * Pdf bookmarks (based on the XEP 2.5 implementation) + * Document information (XEP 2.5 meta information extensions) + ******************************************************************** --> + +<!-- FIXME: Norm, I changed things so that the top-level element (book or set) + does not appear in the TOC. Is this the right thing? --> + +<xsl:template name="xep-document-information"> + <rx:meta-info> + <xsl:variable name="authors" + select="(//author|//editor|//corpauthor|//authorgroup)[1]"/> + <xsl:if test="$authors"> + <xsl:variable name="author"> + <xsl:choose> + <xsl:when test="$authors[self::authorgroup]"> + <xsl:call-template name="person.name.list"> + <xsl:with-param name="person.list" + select="$authors/*[self::author|self::corpauthor| + self::othercredit|self::editor]"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$authors[self::corpauthor]"> + <xsl:value-of select="$authors"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"> + <xsl:with-param name="node" select="$authors"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:element name="rx:meta-field"> + <xsl:attribute name="name">author</xsl:attribute> + <xsl:attribute name="value"> + <xsl:value-of select="normalize-space($author)"/> + </xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:variable name="title"> + <xsl:apply-templates select="/*[1]" mode="label.markup"/> + <xsl:apply-templates select="/*[1]" mode="title.markup"/> + </xsl:variable> + + <xsl:element name="rx:meta-field"> + <xsl:attribute name="name">creator</xsl:attribute> + <xsl:attribute name="value"> + <xsl:text>DocBook </xsl:text> + <xsl:value-of select="$DistroTitle"/> + <xsl:text> V</xsl:text> + <xsl:value-of select="$VERSION"/> + </xsl:attribute> + </xsl:element> + + <xsl:element name="rx:meta-field"> + <xsl:attribute name="name">title</xsl:attribute> + <xsl:attribute name="value"> + <xsl:value-of select="normalize-space($title)"/> + </xsl:attribute> + </xsl:element> + + <xsl:if test="//keyword"> + <xsl:element name="rx:meta-field"> + <xsl:attribute name="name">keywords</xsl:attribute> + <xsl:attribute name="value"> + <xsl:for-each select="//keyword"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:if test="//subjectterm"> + <xsl:element name="rx:meta-field"> + <xsl:attribute name="name">subject</xsl:attribute> + <xsl:attribute name="value"> + <xsl:for-each select="//subjectterm"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </xsl:element> + </xsl:if> + </rx:meta-info> +</xsl:template> + +<!-- ******************************************************************** + Pdf bookmarks + ******************************************************************** --> + +<xsl:template match="*" mode="xep.outline"> + <xsl:apply-templates select="*" mode="xep.outline"/> +</xsl:template> + +<xsl:template match="set|book|part|reference|preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry|refsynopsisdiv + |refsect1|refsect2|refsect3|refsection + |sect1|sect2|sect3|sect4|sect5|section" + mode="xep.outline"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="bookmark-label"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:variable> + + <!-- Put the root element bookmark at the same level as its children --> + <!-- If the object is a set or book, generate a bookmark for the toc --> + <xsl:choose> + <xsl:when test="self::index and $generate.index = 0"/> + <xsl:when test="parent::*"> + <rx:bookmark internal-destination="{$id}"> + <rx:bookmark-label> + <xsl:value-of select="normalize-space($bookmark-label)"/> + </rx:bookmark-label> + <xsl:apply-templates select="*" mode="xep.outline"/> + </rx:bookmark> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$bookmark-label != ''"> + <rx:bookmark internal-destination="{$id}"> + <rx:bookmark-label> + <xsl:value-of select="normalize-space($bookmark-label)"/> + </rx:bookmark-label> + </rx:bookmark> + </xsl:if> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="contains($toc.params, 'toc') + and set|book|part|reference|section|sect1|refentry + |article|bibliography|glossary|chapter + |appendix"> + <rx:bookmark internal-destination="toc...{$id}"> + <rx:bookmark-label> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </rx:bookmark-label> + </rx:bookmark> + </xsl:if> + <xsl:apply-templates select="*" mode="xep.outline"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="xep-pis"> + <xsl:if test="$crop.marks != 0"> + <xsl:processing-instruction name="xep-pdf-crop-mark-width"><xsl:value-of select="$crop.mark.width"/></xsl:processing-instruction> + <xsl:processing-instruction name="xep-pdf-crop-offset"><xsl:value-of select="$crop.mark.offset"/></xsl:processing-instruction> + <xsl:processing-instruction name="xep-pdf-bleed"><xsl:value-of select="$crop.mark.bleed"/></xsl:processing-instruction> + </xsl:if> + + <xsl:call-template name="user-xep-pis"/> +</xsl:template> + +<!-- Placeholder for user defined PIs --> +<xsl:template name="user-xep-pis"/> + +</xsl:stylesheet> diff --git a/3rdParty/DocBook/XSL/fo/xref.xsl b/3rdParty/DocBook/XSL/fo/xref.xsl new file mode 100644 index 0000000..518fce9 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/xref.xsl @@ -0,0 +1,1519 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:exsl="http://exslt.org/common" + xmlns:xlink='http://www.w3.org/1999/xlink' + exclude-result-prefixes="exsl xlink" + version='1.0'> + +<!-- ******************************************************************** + $Id: xref.xsl 8398 2009-04-07 14:40:25Z dcramer $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- Use internal variable for olink xlink role for consistency --> +<xsl:variable + name="xolink.role">http://docbook.org/xlink/role/olink</xsl:variable> + +<!-- ==================================================================== --> + +<xsl:template match="anchor"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:inline id="{$id}"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="xref" name="xref"> + <xsl:param name="xhref" select="@xlink:href"/> + <!-- is the @xlink:href a local idref link? --> + <xsl:param name="xlink.idref"> + <xsl:if test="starts-with($xhref,'#') + and (not(contains($xhref,'(')) + or starts-with($xhref, '#xpointer(id('))"> + <xsl:call-template name="xpointer.idref"> + <xsl:with-param name="xpointer" select="$xhref"/> + </xsl:call-template> + </xsl:if> + </xsl:param> + <xsl:param name="xlink.targets" select="key('id',$xlink.idref)"/> + <xsl:param name="linkend.targets" select="key('id',@linkend)"/> + <xsl:param name="target" select="($xlink.targets | $linkend.targets)[1]"/> + <xsl:param name="refelem" select="local-name($target)"/> + + <xsl:variable name="xrefstyle"> + <xsl:choose> + <xsl:when test="@role and not(@xrefstyle) + and $use.role.as.xrefstyle != 0"> + <xsl:value-of select="@role"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@xrefstyle"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="content"> + <fo:inline xsl:use-attribute-sets="xref.properties"> + <xsl:choose> + <xsl:when test="@endterm"> + <xsl:variable name="etargets" select="key('id',@endterm)"/> + <xsl:variable name="etarget" select="$etargets[1]"/> + <xsl:choose> + <xsl:when test="count($etarget) = 0"> + <xsl:message> + <xsl:value-of select="count($etargets)"/> + <xsl:text>Endterm points to nonexistent ID: </xsl:text> + <xsl:value-of select="@endterm"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$etarget" mode="endterm"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$target/@xreflabel"> + <xsl:call-template name="xref.xreflabel"> + <xsl:with-param name="target" select="$target"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="$target"> + <xsl:if test="not(parent::citation)"> + <xsl:apply-templates select="$target" mode="xref-to-prefix"/> + </xsl:if> + + <xsl:apply-templates select="$target" mode="xref-to"> + <xsl:with-param name="referrer" select="."/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + </xsl:apply-templates> + + <xsl:if test="not(parent::citation)"> + <xsl:apply-templates select="$target" mode="xref-to-suffix"/> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>ERROR: xref linking to </xsl:text> + <xsl:value-of select="@linkend|@xlink:href"/> + <xsl:text> has no generated link text.</xsl:text> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:otherwise> + </xsl:choose> + </fo:inline> + </xsl:variable> + + <!-- Convert it into an active link --> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + + <!-- Add standard page reference? --> + <xsl:choose> + <xsl:when test="not($target)"> + <!-- page numbers only for local targets --> + </xsl:when> + <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:') + and contains($xrefstyle, 'nopage')"> + <!-- negative xrefstyle in instance turns it off --> + </xsl:when> + <!-- positive xrefstyle already handles it --> + <xsl:when test="not(starts-with(normalize-space($xrefstyle), 'select:') + and (contains($xrefstyle, 'page') + or contains($xrefstyle, 'Page'))) + and ( $insert.xref.page.number = 'yes' + or $insert.xref.page.number = '1') + or (local-name($target) = 'para' and + $xrefstyle = '')"> + <xsl:apply-templates select="$target" mode="page.citation"> + <xsl:with-param name="id" select="$target/@id|$target/@xml:id"/> + </xsl:apply-templates> + </xsl:when> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<!-- Handled largely like an xref --> +<!-- To be done: add support for begin, end, and units attributes --> +<xsl:template match="biblioref" name="biblioref"> + <xsl:variable name="targets" select="key('id',@linkend)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:variable name="refelem" select="local-name($target)"/> + + <xsl:call-template name="check.id.unique"> + <xsl:with-param name="linkend" select="@linkend"/> + </xsl:call-template> + + <xsl:choose> + <xsl:when test="$refelem=''"> + <xsl:message> + <xsl:text>XRef to nonexistent id: </xsl:text> + <xsl:value-of select="@linkend"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:when> + + <xsl:when test="@endterm"> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:variable name="etargets" select="key('id',@endterm)"/> + <xsl:variable name="etarget" select="$etargets[1]"/> + <xsl:choose> + <xsl:when test="count($etarget) = 0"> + <xsl:message> + <xsl:value-of select="count($etargets)"/> + <xsl:text>Endterm points to nonexistent ID: </xsl:text> + <xsl:value-of select="@endterm"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$etarget" mode="endterm"/> + </xsl:otherwise> + </xsl:choose> + </fo:basic-link> + </xsl:when> + + <xsl:when test="$target/@xreflabel"> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:call-template name="xref.xreflabel"> + <xsl:with-param name="target" select="$target"/> + </xsl:call-template> + </fo:basic-link> + </xsl:when> + + <xsl:otherwise> + <xsl:if test="not(parent::citation)"> + <xsl:apply-templates select="$target" mode="xref-to-prefix"/> + </xsl:if> + + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:apply-templates select="$target" mode="xref-to"> + <xsl:with-param name="referrer" select="."/> + <xsl:with-param name="xrefstyle"> + <xsl:choose> + <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0"> + <xsl:value-of select="@role"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@xrefstyle"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:apply-templates> + </fo:basic-link> + + <xsl:if test="not(parent::citation)"> + <xsl:apply-templates select="$target" mode="xref-to-suffix"/> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="endterm"> + <!-- Process the children of the endterm element --> + <xsl:variable name="endterm"> + <xsl:apply-templates select="child::node()"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$exsl.node.set.available != 0"> + <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$endterm"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="remove-ids"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:choose> + <xsl:when test="name(.) != 'id'"> + <xsl:copy/> + </xsl:when> + <xsl:otherwise> + <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:apply-templates mode="remove-ids"/> + </xsl:copy> +</xsl:template> + +<!--- ==================================================================== --> + +<xsl:template match="*" mode="xref-to-prefix"/> +<xsl:template match="*" mode="xref-to-suffix"/> + +<xsl:template match="*" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + + <xsl:if test="$verbose != 0"> + <xsl:message> + <xsl:text>Don't know what gentext to create for xref to: "</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>"</xsl:text> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="title" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <!-- if you xref to a title, xref to the parent... --> + <xsl:choose> + <!-- FIXME: how reliable is this? --> + <xsl:when test="contains(local-name(parent::*), 'info')"> + <xsl:apply-templates select="parent::*[2]" mode="xref-to"> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="parent::*" mode="xref-to"> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="abstract|article|authorblurb|bibliodiv|bibliomset + |biblioset|blockquote|calloutlist|caution|colophon + |constraintdef|formalpara|glossdiv|important|indexdiv + |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain + |msgrel|msgset|msgsub|note|orderedlist|partintro + |productionset|qandadiv|refsynopsisdiv|segmentedlist + |set|setindex|sidebar|tip|toc|variablelist|warning" + mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <!-- catch-all for things with (possibly optional) titles --> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="author|editor|othercredit|personname" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="authorgroup" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:call-template name="person.name.list"/> +</xsl:template> + +<xsl:template match="figure|example|table|equation" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="procedure" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="task" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="cmdsynopsis" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="(.//command)[1]" mode="xref"/> +</xsl:template> + +<xsl:template match="funcsynopsis" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="(.//function)[1]" mode="xref"/> +</xsl:template> + +<xsl:template match="dedication|acknowledgements|preface|chapter|appendix" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="bibliography" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix"> + <xsl:text>[</xsl:text> +</xsl:template> + +<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix"> + <xsl:text>]</xsl:text> +</xsl:template> + +<xsl:template match="biblioentry|bibliomixed" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <!-- handles both biblioentry and bibliomixed --> + <xsl:choose> + <xsl:when test="string(.) = ''"> + <xsl:variable name="bib" select="document($bibliography.collection,.)"/> + <xsl:variable name="id" select="(@id|@xml:id)[1]"/> + <xsl:variable name="entry" select="$bib/bibliography/ + *[@id=$id or @xml:id=$id][1]"/> + <xsl:choose> + <xsl:when test="$entry"> + <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + </xsl:when> + <xsl:when test="local-name($entry/*[1]) = 'abbrev'"> + <xsl:apply-templates select="$entry/*[1]"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="(@id|@xml:id)[1]"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>No bibliography entry: </xsl:text> + <xsl:value-of select="$id"/> + <xsl:text> found in </xsl:text> + <xsl:value-of select="$bibliography.collection"/> + </xsl:message> + <xsl:value-of select="(@id|@xml:id)[1]"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + </xsl:when> + <xsl:when test="local-name(*[1]) = 'abbrev'"> + <xsl:apply-templates select="*[1]"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="(@id|@xml:id)[1]"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="glossary" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="glossentry" mode="xref-to"> + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="(acronym|abbrev)[1]"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm[1]" mode="xref-to"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm[1]" mode="xref-to"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="glossterm|firstterm" mode="xref-to"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="index" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="listitem" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="section|simplesect + |sect1|sect2|sect3|sect4|sect5 + |refsect1|refsect2|refsect3|refsection" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + <!-- What about "in Chapter X"? --> +</xsl:template> + +<xsl:template match="bridgehead" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + <!-- What about "in Chapter X"? --> +</xsl:template> + +<xsl:template match="qandaset" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="qandadiv" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="qandaentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="question[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="question|answer" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:choose> + <xsl:when test="string-length(label) != 0"> + <xsl:apply-templates select="." mode="label.markup"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="part|reference" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="refentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:choose> + <xsl:when test="refmeta/refentrytitle"> + <xsl:apply-templates select="refmeta/refentrytitle"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="refnamediv/refname[1]"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="refmeta/manvolnum"/> +</xsl:template> + +<xsl:template match="refnamediv" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="refname[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="refname" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="step" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Step'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="." mode="number"/> +</xsl:template> + +<xsl:template match="varlistentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="term[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="varlistentry/term" mode="xref-to"> + <xsl:param name="verbose" select="1"/> + <!-- to avoid the comma that will be generated if there are several terms --> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="co" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="callout-bug"/> +</xsl:template> + +<xsl:template match="area|areaset" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:call-template name="callout-bug"> + <xsl:with-param name="conum"> + <xsl:apply-templates select="." mode="conumber"/> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="book" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + +<!-- These are elements for which no link text exists, so an xref to one + uses the xrefstyle attribute if specified, or if not it falls back + to the container element's link text --> +<xsl:template match="para|phrase|simpara|anchor|quote" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose"/> + + <xsl:variable name="context" select="(ancestor::simplesect + |ancestor::section + |ancestor::sect1 + |ancestor::sect2 + |ancestor::sect3 + |ancestor::sect4 + |ancestor::sect5 + |ancestor::refsection + |ancestor::refsect1 + |ancestor::refsect2 + |ancestor::refsect3 + |ancestor::chapter + |ancestor::appendix + |ancestor::preface + |ancestor::partintro + |ancestor::dedication + |ancestor::acknowledgements + |ancestor::colophon + |ancestor::bibliography + |ancestor::index + |ancestor::glossary + |ancestor::glossentry + |ancestor::listitem + |ancestor::varlistentry)[last()]"/> + + <xsl:choose> + <xsl:when test="$xrefstyle != ''"> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$context" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="indexterm" mode="xref-to"> + <xsl:value-of select="primary"/> +</xsl:template> + +<xsl:template match="primary|secondary|tertiary" mode="xref-to"> + <xsl:value-of select="."/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="link" name="link"> + <xsl:param name="linkend" select="@linkend"/> + <xsl:param name="targets" select="key('id',$linkend)"/> + <xsl:param name="target" select="$targets[1]"/> + + <xsl:variable name="xrefstyle"> + <xsl:choose> + <xsl:when test="@role and not(@xrefstyle) + and $use.role.as.xrefstyle != 0"> + <xsl:value-of select="@role"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@xrefstyle"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="content"> + <fo:inline xsl:use-attribute-sets="xref.properties"> + <xsl:choose> + <xsl:when test="count(child::node()) > 0"> + <!-- If it has content, use it --> + <xsl:apply-templates/> + </xsl:when> + <!-- look for an endterm --> + <xsl:when test="@endterm"> + <xsl:variable name="etargets" select="key('id',@endterm)"/> + <xsl:variable name="etarget" select="$etargets[1]"/> + <xsl:choose> + <xsl:when test="count($etarget) = 0"> + <xsl:message> + <xsl:value-of select="count($etargets)"/> + <xsl:text>Endterm points to nonexistent ID: </xsl:text> + <xsl:value-of select="@endterm"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$etarget" mode="endterm"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <!-- Use the xlink:href if no other text --> + <xsl:when test="@xlink:href"> + <xsl:call-template name="hyphenate-url"> + <xsl:with-param name="url" select="@xlink:href"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Link element has no content and no Endterm. </xsl:text> + <xsl:text>Nothing to show in the link to </xsl:text> + <xsl:value-of select="$target"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:otherwise> + </xsl:choose> + </fo:inline> + </xsl:variable> + + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="linkend" select="$linkend"/> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + + <!-- Add standard page reference? --> + <xsl:choose> + <!-- page numbering on link only enabled for @linkend --> + <!-- There is no link element in DB5 with xlink:href --> + <xsl:when test="not($linkend)"> + </xsl:when> + <!-- negative xrefstyle in instance turns it off --> + <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:') + and contains($xrefstyle, 'nopage')"> + </xsl:when> + <xsl:when test="(starts-with(normalize-space($xrefstyle), 'select:') + and $insert.link.page.number = 'maybe' + and (contains($xrefstyle, 'page') + or contains($xrefstyle, 'Page'))) + or ( $insert.link.page.number = 'yes' + or $insert.link.page.number = '1') + or local-name($target) = 'para'"> + <xsl:apply-templates select="$target" mode="page.citation"> + <xsl:with-param name="id" select="$linkend"/> + </xsl:apply-templates> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="ulink" name="ulink"> + <xsl:param name="url" select="@url"/> + + <xsl:variable name ="ulink.url"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$url"/> + </xsl:call-template> + </xsl:variable> + + <fo:basic-link xsl:use-attribute-sets="xref.properties" + external-destination="{$ulink.url}"> + <xsl:choose> + <xsl:when test="count(child::node())=0"> + <xsl:call-template name="hyphenate-url"> + <xsl:with-param name="url" select="$url"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </fo:basic-link> + <!-- * Call the template for determining whether the URL for this --> + <!-- * hyperlink is displayed, and how to display it (either inline or --> + <!-- * as a numbered footnote). --> + <xsl:call-template name="hyperlink.url.display"> + <xsl:with-param name="url" select="$url"/> + <xsl:with-param name="ulink.url" select="$ulink.url"/> + </xsl:call-template> +</xsl:template> + +<xsl:template name="hyperlink.url.display"> + <!-- * This template is called for all external hyperlinks (ulinks and --> + <!-- * for all simple xlinks); it determines whether the URL for the --> + <!-- * hyperlink is displayed, and how to display it (either inline or --> + <!-- * as a numbered footnote). --> + <xsl:param name="url"/> + <xsl:param name="ulink.url"> + <!-- * ulink.url is just the value of the URL wrapped in 'url(...)' --> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$url"/> + </xsl:call-template> + </xsl:param> + + <xsl:if test="count(child::node()) != 0 + and string(.) != $url + and $ulink.show != 0"> + <!-- * Display the URL for this hyperlink only if it is non-empty, --> + <!-- * and the value of its content is not a URL that is the same as --> + <!-- * URL it links to, and if ulink.show is non-zero. --> + <xsl:choose> + <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)"> + <!-- * ulink.show and ulink.footnote are both non-zero; that --> + <!-- * means we display the URL as a footnote (instead of inline) --> + <fo:footnote> + <xsl:call-template name="ulink.footnote.number"/> + <fo:footnote-body xsl:use-attribute-sets="footnote.properties"> + <fo:block> + <xsl:call-template name="ulink.footnote.number"/> + <xsl:text> </xsl:text> + <fo:basic-link external-destination="{$ulink.url}"> + <xsl:value-of select="$url"/> + </fo:basic-link> + </fo:block> + </fo:footnote-body> + </fo:footnote> + </xsl:when> + <xsl:otherwise> + <!-- * ulink.show is non-zero, but ulink.footnote is not; that --> + <!-- * means we display the URL inline --> + <fo:inline hyphenate="false"> + <!-- * put square brackets around the URL --> + <xsl:text> [</xsl:text> + <fo:basic-link external-destination="{$ulink.url}"> + <xsl:call-template name="hyphenate-url"> + <xsl:with-param name="url" select="$url"/> + </xsl:call-template> + </fo:basic-link> + <xsl:text>]</xsl:text> + </fo:inline> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + +</xsl:template> + +<xsl:template name="ulink.footnote.number"> + <fo:inline xsl:use-attribute-sets="footnote.mark.properties"> + <xsl:choose> + <xsl:when test="$fop.extensions != 0"> + <xsl:attribute name="vertical-align">super</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="baseline-shift">super</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:variable name="fnum"> + <!-- * Determine the footnote number to display for this hyperlink, --> + <!-- * by counting all foonotes, ulinks, and any elements that have --> + <!-- * an xlink:href attribute that meets the following criteria: --> + <!-- * --> + <!-- * - the content of the element is not a URI that is the same --> + <!-- * URI as the value of the href attribute --> + <!-- * - the href attribute is not an internal ID reference (does --> + <!-- * not start with a hash sign) --> + <!-- * - the href is not part of an olink reference (the element --> + <!-- * - does not have an xlink:role attribute that indicates it is --> + <!-- * an olink, and the href does not contain a hash sign) --> + <!-- * - the element either has no xlink:type attribute or has --> + <!-- * an xlink:type attribute whose value is 'simple' --> + <!-- FIXME: list in @from is probably not complete --> + <xsl:number level="any" + from="chapter|appendix|preface|article|refentry|bibliography[not(parent::article)]" + count="footnote[not(@label)][not(ancestor::tgroup)] + |ulink[node()][@url != .][not(ancestor::footnote)] + |*[node()][@xlink:href][not(@xlink:href = .)][not(starts-with(@xlink:href,'#'))] + [not(contains(@xlink:href,'#') and @xlink:role = $xolink.role)] + [not(@xlink:type) or @xlink:type='simple'] + [not(ancestor::footnote)]" + format="1"/> + </xsl:variable> + <xsl:choose> + <xsl:when test="string-length($footnote.number.symbols) >= $fnum"> + <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number value="$fnum" format="{$footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> + </fo:inline> +</xsl:template> + +<xsl:template name="hyphenate-url"> + <xsl:param name="url" select="''"/> + <xsl:choose> + <xsl:when test="$ulink.hyphenate = ''"> + <xsl:value-of select="$url"/> + </xsl:when> + <xsl:when test="string-length($url) > 1"> + <xsl:variable name="char" select="substring($url, 1, 1)"/> + <xsl:value-of select="$char"/> + <xsl:if test="contains($ulink.hyphenate.chars, $char)"> + <!-- Do not hyphen in-between // --> + <xsl:if test="not($char = '/' and substring($url,2,1) = '/')"> + <xsl:copy-of select="$ulink.hyphenate"/> + </xsl:if> + </xsl:if> + <!-- recurse to the next character --> + <xsl:call-template name="hyphenate-url"> + <xsl:with-param name="url" select="substring($url, 2)"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$url"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="olink" name="olink"> + <!-- olink content may be passed in from xlink olink --> + <xsl:param name="content" select="NOTANELEMENT"/> + + <xsl:call-template name="anchor"/> + + <xsl:variable name="localinfo" select="@localinfo"/> + + <xsl:choose> + <!-- olinks resolved by stylesheet and target database --> + <xsl:when test="@targetdoc or @targetptr or + (@xlink:role=$xolink.role and + contains(@xlink:href, '#') )" > + + <xsl:variable name="targetdoc.att"> + <xsl:choose> + <xsl:when test="@targetdoc != ''"> + <xsl:value-of select="@targetdoc"/> + </xsl:when> + <xsl:when test="@xlink:role=$xolink.role and + contains(@xlink:href, '#')" > + <xsl:value-of select="substring-before(@xlink:href, '#')"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="targetptr.att"> + <xsl:choose> + <xsl:when test="@targetptr != ''"> + <xsl:value-of select="@targetptr"/> + </xsl:when> + <xsl:when test="@xlink:role=$xolink.role and + contains(@xlink:href, '#')" > + <xsl:value-of select="substring-after(@xlink:href, '#')"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="olink.lang"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="xref-context" select="true()"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="target.database.filename"> + <xsl:call-template name="select.target.database"> + <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/> + <xsl:with-param name="targetptr.att" select="$targetptr.att"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="target.database" + select="document($target.database.filename, /)"/> + + <xsl:if test="$olink.debug != 0"> + <xsl:message> + <xsl:text>Olink debug: root element of target.database is '</xsl:text> + <xsl:value-of select="local-name($target.database/*[1])"/> + <xsl:text>'.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="olink.key"> + <xsl:call-template name="select.olink.key"> + <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/> + <xsl:with-param name="targetptr.att" select="$targetptr.att"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="string-length($olink.key) = 0"> + <xsl:message> + <xsl:text>Error: unresolved olink: </xsl:text> + <xsl:text>targetdoc/targetptr = '</xsl:text> + <xsl:value-of select="$targetdoc.att"/> + <xsl:text>/</xsl:text> + <xsl:value-of select="$targetptr.att"/> + <xsl:text>'.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="href"> + <xsl:call-template name="make.olink.href"> + <xsl:with-param name="olink.key" select="$olink.key"/> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </xsl:variable> + + <!-- Olink that points to internal id can be a link --> + <xsl:variable name="linkend"> + <xsl:call-template name="olink.as.linkend"> + <xsl:with-param name="olink.key" select="$olink.key"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="hottext"> + <xsl:choose> + <xsl:when test="string-length($content) != 0"> + <xsl:copy-of select="$content"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="olink.hottext"> + <xsl:with-param name="olink.key" select="$olink.key"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="olink.docname.citation"> + <xsl:call-template name="olink.document.citation"> + <xsl:with-param name="olink.key" select="$olink.key"/> + <xsl:with-param name="target.database" select="$target.database"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="olink.page.citation"> + <xsl:call-template name="olink.page.citation"> + <xsl:with-param name="olink.key" select="$olink.key"/> + <xsl:with-param name="target.database" select="$target.database"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + <xsl:with-param name="linkend" select="$linkend"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$linkend != ''"> + <fo:basic-link internal-destination="{$linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:copy-of select="$hottext"/> + <xsl:copy-of select="$olink.page.citation"/> + </fo:basic-link> + </xsl:when> + <xsl:when test="$href != ''"> + <xsl:choose> + <xsl:when test="$xep.extensions != 0"> + <fo:basic-link external-destination="url({$href})" + xsl:use-attribute-sets="olink.properties"> + <xsl:copy-of select="$hottext"/> + </fo:basic-link> + <xsl:copy-of select="$olink.page.citation"/> + <xsl:copy-of select="$olink.docname.citation"/> + </xsl:when> + <xsl:when test="$axf.extensions != 0"> + <fo:basic-link external-destination="{$href}" + xsl:use-attribute-sets="olink.properties"> + <xsl:copy-of select="$hottext"/> + </fo:basic-link> + <xsl:copy-of select="$olink.page.citation"/> + <xsl:copy-of select="$olink.docname.citation"/> + </xsl:when> + <xsl:otherwise> + <fo:basic-link external-destination="{$href}" + xsl:use-attribute-sets="olink.properties"> + <xsl:copy-of select="$hottext"/> + </fo:basic-link> + <xsl:copy-of select="$olink.page.citation"/> + <xsl:copy-of select="$olink.docname.citation"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$hottext"/> + <xsl:copy-of select="$olink.page.citation"/> + <xsl:copy-of select="$olink.docname.citation"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <!-- olink never implemented in FO for old olink entity syntax --> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="insert.olink.docname.markup"> + <xsl:param name="docname" select="''"/> + + <fo:inline font-style="italic"> + <xsl:value-of select="$docname"/> + </fo:inline> + +</xsl:template> + +<!-- This prevents error message when processing olinks with xrefstyle --> +<xsl:template match="olink" mode="object.xref.template"/> + + +<xsl:template name="olink.as.linkend"> + <xsl:param name="olink.key" select="''"/> + <xsl:param name="olink.lang" select="''"/> + <xsl:param name="target.database" select="NotANode"/> + + <xsl:variable name="targetdoc"> + <xsl:value-of select="substring-before($olink.key, '/')"/> + </xsl:variable> + + <xsl:variable name="targetptr"> + <xsl:value-of + select="substring-before(substring-after($olink.key, '/'), '/')"/> + </xsl:variable> + + <xsl:variable name="target.lang"> + <xsl:variable name="candidate"> + <xsl:for-each select="$target.database" > + <xsl:value-of + select="key('targetptr-key', $olink.key)[1]/@lang" /> + </xsl:for-each> + </xsl:variable> + <xsl:choose> + <xsl:when test="$candidate != ''"> + <xsl:value-of select="$candidate"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$olink.lang"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$current.docid = $targetdoc and + $olink.lang = $target.lang"> + <xsl:variable name="targets" select="key('id',$targetptr)"/> + <xsl:variable name="target" select="$targets[1]"/> + <xsl:if test="$target"> + <xsl:value-of select="$targetptr"/> + </xsl:if> + </xsl:if> + +</xsl:template> + + +<xsl:template name="olink.outline"> + <xsl:param name="outline.base.uri"/> + <xsl:param name="localinfo"/> + <xsl:param name="return" select="href"/> + + <xsl:message terminate="yes">Fatal error: olink.outline template: what is this supposed to do?</xsl:message> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="title.xref"> + <xsl:param name="target" select="."/> + <xsl:choose> + <xsl:when test="local-name($target) = 'figure' + or local-name($target) = 'example' + or local-name($target) = 'equation' + or local-name($target) = 'table' + or local-name($target) = 'dedication' + or local-name($target) = 'acknowledgements' + or local-name($target) = 'preface' + or local-name($target) = 'bibliography' + or local-name($target) = 'glossary' + or local-name($target) = 'index' + or local-name($target) = 'setindex' + or local-name($target) = 'colophon'"> + <xsl:call-template name="gentext.startquote"/> + <xsl:apply-templates select="$target" mode="title.markup"/> + <xsl:call-template name="gentext.endquote"/> + </xsl:when> + <xsl:otherwise> + <fo:inline font-style="italic"> + <xsl:apply-templates select="$target" mode="title.markup"/> + </fo:inline> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="number.xref"> + <xsl:param name="target" select="."/> + <xsl:apply-templates select="$target" mode="label.markup"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="xref.xreflabel"> + <!-- called to process an xreflabel...you might use this to make --> + <!-- xreflabels come out in the right font for different targets, --> + <!-- for example. --> + <xsl:param name="target" select="."/> + <xsl:value-of select="$target/@xreflabel"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="title" mode="xref"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="command" mode="xref"> + <xsl:call-template name="inline.boldseq"/> +</xsl:template> + +<xsl:template match="function" mode="xref"> + <xsl:call-template name="inline.monoseq"/> +</xsl:template> + +<xsl:template match="*" mode="page.citation"> + <xsl:param name="id" select="'???'"/> + + <fo:basic-link internal-destination="{$id}" + xsl:use-attribute-sets="xref.properties"> + <fo:inline keep-together.within-line="always"> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'page.citation'"/> + <xsl:with-param name="context" select="'xref'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </fo:inline> + </fo:basic-link> +</xsl:template> + +<xsl:template match="*" mode="pagenumber.markup"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <fo:page-number-citation ref-id="{$id}"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="insert.title.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="title"/> + + <xsl:choose> + <!-- FIXME: what about the case where titleabbrev is inside the info? --> + <xsl:when test="$purpose = 'xref' and titleabbrev"> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="chapter|appendix" mode="insert.title.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="title"/> + + <xsl:choose> + <xsl:when test="$purpose = 'xref'"> + <fo:inline font-style="italic"> + <xsl:copy-of select="$title"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="insert.subtitle.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="subtitle"/> + + <xsl:copy-of select="$subtitle"/> +</xsl:template> + +<xsl:template match="*" mode="insert.label.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="label"/> + + <xsl:copy-of select="$label"/> +</xsl:template> + +<xsl:template match="*" mode="insert.pagenumber.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="pagenumber"/> + + <xsl:copy-of select="$pagenumber"/> +</xsl:template> + +<xsl:template match="*" mode="insert.direction.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="direction"/> + + <xsl:copy-of select="$direction"/> +</xsl:template> + +<xsl:template match="olink" mode="pagenumber.markup"> + <!-- Local olinks can use page-citation --> + <xsl:variable name="targetdoc.att" select="@targetdoc"/> + <xsl:variable name="targetptr.att" select="@targetptr"/> + + <xsl:variable name="olink.lang"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="xref-context" select="true()"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="target.database.filename"> + <xsl:call-template name="select.target.database"> + <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/> + <xsl:with-param name="targetptr.att" select="$targetptr.att"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="target.database" + select="document($target.database.filename, /)"/> + + <xsl:if test="$olink.debug != 0"> + <xsl:message> + <xsl:text>Olink debug: root element of target.database is '</xsl:text> + <xsl:value-of select="local-name($target.database/*[1])"/> + <xsl:text>'.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="olink.key"> + <xsl:call-template name="select.olink.key"> + <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/> + <xsl:with-param name="targetptr.att" select="$targetptr.att"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </xsl:variable> + + <!-- Olink that points to internal id can be a link --> + <xsl:variable name="linkend"> + <xsl:call-template name="olink.as.linkend"> + <xsl:with-param name="olink.key" select="$olink.key"/> + <xsl:with-param name="olink.lang" select="$olink.lang"/> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$linkend != ''"> + <fo:page-number-citation ref-id="{$linkend}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>Olink error: no page number linkend for local olink '</xsl:text> + <xsl:value-of select="$olink.key"/> + <xsl:text>'</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> |