mirror of
https://github.com/Poltern/lfs-ru.git
synced 2024-10-18 20:00:21 +03:00
Add stylesheets
This commit is contained in:
parent
f37e370c34
commit
9aa2709650
87
stylesheets/dump-commands.xsl
Normal file
87
stylesheets/dump-commands.xsl
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:exsl="http://exslt.org/common"
|
||||||
|
extension-element-prefixes="exsl"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- XSLT stylesheet to extract commands from [B,H]LFS books. -->
|
||||||
|
|
||||||
|
<xsl:variable name="newline">
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates select="//sect1"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="sect1">
|
||||||
|
<!-- The dirs names -->
|
||||||
|
<xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
|
||||||
|
<xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
|
||||||
|
<xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
|
||||||
|
<xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
|
||||||
|
<!-- The file names -->
|
||||||
|
<xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
|
||||||
|
<xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
|
||||||
|
<xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
|
||||||
|
<!-- The build order -->
|
||||||
|
<xsl:variable name="position" select="position()"/>
|
||||||
|
<xsl:variable name="order">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="string-length($position) = 1">
|
||||||
|
<xsl:text>00</xsl:text>
|
||||||
|
<xsl:value-of select="$position"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="string-length($position) = 2">
|
||||||
|
<xsl:text>0</xsl:text>
|
||||||
|
<xsl:value-of select="$position"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$position"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<!-- Creating dirs and files -->
|
||||||
|
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
|
||||||
|
<xsl:apply-templates select=".//screen"/>
|
||||||
|
</exsl:document>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="screen">
|
||||||
|
<xsl:if test="child::* = userinput">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role = 'root'">
|
||||||
|
<xsl:text># Run this as root</xsl:text>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
<xsl:apply-templates select="userinput"/>
|
||||||
|
<xsl:text># End root commands</xsl:text>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="userinput"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="userinput">
|
||||||
|
<xsl:if test=".//replaceable">
|
||||||
|
<xsl:text># This block must be edited to suit your needs.</xsl:text>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
<xsl:if test=".//replaceable">
|
||||||
|
<xsl:text># End of editable block.</xsl:text>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="replaceable">
|
||||||
|
<xsl:text>**EDITME</xsl:text>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<xsl:text>EDITME**</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
13
stylesheets/lfs-chunked.xsl
Normal file
13
stylesheets/lfs-chunked.xsl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- LFS top-level chunk templates. -->
|
||||||
|
<xsl:import href="lfs-xsl/chunkfast.xsl"/>
|
||||||
|
|
||||||
|
<!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
|
||||||
|
<xsl:param name="book-type">lfs</xsl:param>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
13
stylesheets/lfs-nochunks.xsl
Normal file
13
stylesheets/lfs-nochunks.xsl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- LFS top-level no-chunk templates. -->
|
||||||
|
<xsl:import href="lfs-xsl/nochunks.xsl"/>
|
||||||
|
|
||||||
|
<!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
|
||||||
|
<xsl:param name="book-type">lfs</xsl:param>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
13
stylesheets/lfs-pdf.xsl
Normal file
13
stylesheets/lfs-pdf.xsl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- LFS top-level pdf templates. -->
|
||||||
|
<xsl:import href="lfs-xsl/pdf.xsl"/>
|
||||||
|
|
||||||
|
<!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
|
||||||
|
<xsl:param name="book-type">lfs</xsl:param>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
49
stylesheets/lfs-xsl/chunk-master.xsl
Normal file
49
stylesheets/lfs-xsl/chunk-master.xsl
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Top-level chunked code for normal processing.
|
||||||
|
Import customized output templates.
|
||||||
|
Include customized chunk templates.
|
||||||
|
Replaces {docbook-xsl}/xhtml/chunk.xsl -->
|
||||||
|
|
||||||
|
<!-- Our master non-chunking presentation templates -->
|
||||||
|
<xsl:import href="chunk-slave.xsl"/>
|
||||||
|
|
||||||
|
<!-- Upstream chunk code named templates -->
|
||||||
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-common.xsl"/>
|
||||||
|
|
||||||
|
<!-- Upstream chunk code match templates -->
|
||||||
|
<xsl:include href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-code.xsl"/>
|
||||||
|
|
||||||
|
<!-- Customized chunk templates -->
|
||||||
|
<xsl:include href="xhtml/lfs-index.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-legalnotice.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-navigational.xsl"/>
|
||||||
|
|
||||||
|
<!-- sect1:
|
||||||
|
Prevent creation of dummy sect1 files used to emulate sub-chapters.
|
||||||
|
The original template is in {docbook-xsl}/xhtml/chunk-code.xsl
|
||||||
|
It also matches other sect* tags. The code for those tags are
|
||||||
|
unchanged. -->
|
||||||
|
<xsl:template match="sect1">
|
||||||
|
<xsl:variable name="ischunk">
|
||||||
|
<xsl:call-template name="chunk"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role = 'dummy'"/>
|
||||||
|
<xsl:when test="not(parent::*)">
|
||||||
|
<xsl:call-template name="process-chunk-element"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$ischunk = 0">
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="process-chunk-element"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
61
stylesheets/lfs-xsl/chunk-slave.xsl
Normal file
61
stylesheets/lfs-xsl/chunk-slave.xsl
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Second level chunked output template.
|
||||||
|
Sets global params and include customized elements templates. -->
|
||||||
|
|
||||||
|
<!-- Upstream XHTML presentation templates -->
|
||||||
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
|
||||||
|
|
||||||
|
<!-- Use ISO-8859-1 for output instead of default UTF-8 -->
|
||||||
|
<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
|
||||||
|
|
||||||
|
<!-- Including our customized elements templates -->
|
||||||
|
<xsl:include href="common.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-admon.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-mixed.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-sections.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-titles.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-toc.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-xref.xsl"/>
|
||||||
|
|
||||||
|
<xsl:param name="html.stylesheet" select="'stylesheets/lfs.css'"/>
|
||||||
|
<!-- Print CSS Stylesheet -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
|
||||||
|
<xsl:template name='user.head.content'>
|
||||||
|
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Drop some unwanted style attributes -->
|
||||||
|
<xsl:param name="ulink.target" select="''"/>
|
||||||
|
<xsl:param name="css.decoration" select="0"/>
|
||||||
|
|
||||||
|
<!-- No XML declaration -->
|
||||||
|
<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
|
||||||
|
|
||||||
|
<!-- Control generation of ToCs and LoTs -->
|
||||||
|
<xsl:param name="generate.toc">
|
||||||
|
book toc,title
|
||||||
|
preface toc
|
||||||
|
part toc
|
||||||
|
chapter toc
|
||||||
|
appendix nop
|
||||||
|
sect1 nop
|
||||||
|
sect2 nop
|
||||||
|
sect3 nop
|
||||||
|
sect4 nop
|
||||||
|
sect5 nop
|
||||||
|
section nop
|
||||||
|
</xsl:param>
|
||||||
|
|
||||||
|
<!-- How deep should recursive sections appear in the TOC? -->
|
||||||
|
<xsl:param name="toc.section.depth">1</xsl:param>
|
||||||
|
|
||||||
|
<!-- How deep, at most, should each TOC be? -->
|
||||||
|
<xsl:param name="toc.max.depth">3</xsl:param>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
71
stylesheets/lfs-xsl/chunkfast.xsl
Normal file
71
stylesheets/lfs-xsl/chunkfast.xsl
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:exsl="http://exslt.org/common"
|
||||||
|
xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
|
||||||
|
version="1.0"
|
||||||
|
exclude-result-prefixes="cf exsl">
|
||||||
|
|
||||||
|
<!-- Top-level chunked code for fast processing.
|
||||||
|
Import standart customized chunk code.
|
||||||
|
Replaces {docbook-xsl}/xhtml/chunkfast.xsl
|
||||||
|
|
||||||
|
Note: Using this file as the top-level for chunked output implies that
|
||||||
|
profiling must be done on a previous step. -->
|
||||||
|
|
||||||
|
<!-- Our master chunking templates -->
|
||||||
|
<xsl:import href="chunk-master.xsl"/>
|
||||||
|
|
||||||
|
<!-- Use chunk.fast code? 1 = yes, 0 = no -->
|
||||||
|
<xsl:param name="chunk.fast" select="1"/>
|
||||||
|
|
||||||
|
<!-- The code below was copied as-is from {docbook-xsl}/xhtml/chunkfast.xsl -->
|
||||||
|
|
||||||
|
<xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
|
||||||
|
|
||||||
|
<xsl:template name="process-chunk-element">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
|
||||||
|
<xsl:variable name="genid" select="generate-id()"/>
|
||||||
|
|
||||||
|
<xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
|
||||||
|
|
||||||
|
<xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
|
||||||
|
<xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
|
||||||
|
|
||||||
|
<xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
|
||||||
|
<xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$onechunk != 0 and parent::*">
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="process-chunk">
|
||||||
|
<xsl:with-param name="prev" select="$prev"/>
|
||||||
|
<xsl:with-param name="next" select="$next"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$onechunk != 0 and not(parent::*)">
|
||||||
|
<xsl:call-template name="chunk-all-sections"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$onechunk != 0">
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$chunk.first.sections = 0">
|
||||||
|
<xsl:call-template name="chunk-first-section-with-parent"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="chunk-all-sections"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
453
stylesheets/lfs-xsl/common.xsl
Normal file
453
stylesheets/lfs-xsl/common.xsl
Normal file
@ -0,0 +1,453 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet contains common params and templates for all outputs. -->
|
||||||
|
|
||||||
|
<!-- This file contains our localization strings (for internationalization) -->
|
||||||
|
<xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- INDEX -->
|
||||||
|
|
||||||
|
<!-- Should the Index be generated? 1 = yes, 0 = no -->
|
||||||
|
<xsl:param name="generate.index" select="1"></xsl:param>
|
||||||
|
|
||||||
|
<!-- The indexing method used. Only 'basic' is supported by xsltproc -->
|
||||||
|
<xsl:param name="index.method" select="'basic'"></xsl:param>
|
||||||
|
|
||||||
|
<!-- The Index title:
|
||||||
|
We create this param to can have gentext support in both
|
||||||
|
the Index page title and links that point to the Index page.
|
||||||
|
It also allow us to change the title, if wanted.
|
||||||
|
Note: To change the title involves creating the appropriate
|
||||||
|
entries in lfs-l10n.xml -->
|
||||||
|
<xsl:param name="index-title">Index</xsl:param>
|
||||||
|
|
||||||
|
<!-- Index title generation. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/common/titles.xsl -->
|
||||||
|
<xsl:template match="index" mode="title.markup">
|
||||||
|
<xsl:param name="allow-anchors" select="0"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key" select="$index-title"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- indexterm:
|
||||||
|
Dropping unneeded anchors and fo:wraper elemments. -->
|
||||||
|
<!-- The original templates are in {docbook-xsl}/{xhtml,fo}/index.xsl -->
|
||||||
|
<xsl:template match="indexterm"/>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
<!-- LABELS -->
|
||||||
|
|
||||||
|
<!-- Are sections enumerated? 1 = yes, 0 = no -->
|
||||||
|
<xsl:param name="section.autolabel" select="1"/>
|
||||||
|
|
||||||
|
<!-- Do section labels include the component label? 1 = yes, 0 = no -->
|
||||||
|
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||||
|
|
||||||
|
<!-- sect1 label.markup:
|
||||||
|
Use lowercase roman numbers for sect1 in preface. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/common/labels.xsl -->
|
||||||
|
<xsl:template match="sect1" mode="label.markup">
|
||||||
|
<!-- if the parent is a component, maybe label that too -->
|
||||||
|
<xsl:variable name="parent.is.component">
|
||||||
|
<xsl:call-template name="is.component">
|
||||||
|
<xsl:with-param name="node" select=".."/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="component.label">
|
||||||
|
<xsl:if test="$section.label.includes.component.label != 0
|
||||||
|
and $parent.is.component != 0">
|
||||||
|
<xsl:variable name="parent.label">
|
||||||
|
<xsl:apply-templates select=".." mode="label.markup"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:if test="$parent.label != ''">
|
||||||
|
<xsl:apply-templates select=".." mode="label.markup"/>
|
||||||
|
<xsl:apply-templates select=".." mode="intralabel.punctuation"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@label">
|
||||||
|
<xsl:value-of select="@label"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$section.autolabel != 0">
|
||||||
|
<xsl:copy-of select="$component.label"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::preface">
|
||||||
|
<xsl:number format="i" count="sect1"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:number format="1" count="sect1"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect2 label.markup:
|
||||||
|
Skip numeration for sect2 with empty title. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/common/labels.xsl
|
||||||
|
It match also sect3, sect4, and sect5, that are unchanged. -->
|
||||||
|
<xsl:template match="sect2" mode="label.markup">
|
||||||
|
<!-- label the parent -->
|
||||||
|
<xsl:variable name="parent.section.label">
|
||||||
|
<xsl:call-template name="label.this.section">
|
||||||
|
<xsl:with-param name="section" select=".."/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:if test="$parent.section.label != '0'">
|
||||||
|
<xsl:apply-templates select=".." mode="label.markup"/>
|
||||||
|
<xsl:apply-templates select=".." mode="intralabel.punctuation"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@label">
|
||||||
|
<xsl:value-of select="@label"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$section.autolabel != 0">
|
||||||
|
<xsl:choose>
|
||||||
|
<!-- If the first sect2 isn't numbered, renumber the remainig sections -->
|
||||||
|
<xsl:when test="string-length(../sect2[1]/title) = 0">
|
||||||
|
<xsl:variable name="totalsect2">
|
||||||
|
<xsl:number count="sect2"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:number value="$totalsect2 - 1"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:number count="sect2"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- object.title.template:
|
||||||
|
Skip numeration for sectX > sect1 in preface. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/common/gentext.xsl. -->
|
||||||
|
<xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect|bridgehead"
|
||||||
|
mode="object.title.template">
|
||||||
|
<xsl:variable name="is.numbered">
|
||||||
|
<xsl:call-template name="label.this.section"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$is.numbered != 0 and not(ancestor::preface/sect1)">
|
||||||
|
<xsl:call-template name="gentext.template">
|
||||||
|
<xsl:with-param name="context" select="'title-numbered'"/>
|
||||||
|
<xsl:with-param name="name">
|
||||||
|
<xsl:call-template name="xpath.location"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="gentext.template">
|
||||||
|
<xsl:with-param name="context" select="'title-unnumbered'"/>
|
||||||
|
<xsl:with-param name="name">
|
||||||
|
<xsl:call-template name="xpath.location"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
<!-- XREF (see {xhtml,pdf}/xref.xsl) -->
|
||||||
|
|
||||||
|
<!-- mode object.xref.markup:
|
||||||
|
Propagate role to named template substitute-markup -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/common/gentext.xsl -->
|
||||||
|
<xsl:template match="*" mode="object.xref.markup">
|
||||||
|
<xsl:param name="purpose"/>
|
||||||
|
<xsl:param name="xrefstyle"/>
|
||||||
|
<xsl:param name="referrer"/>
|
||||||
|
<xsl:param name="verbose" select="1"/>
|
||||||
|
<xsl:param name="role"/>
|
||||||
|
<xsl:variable name="template">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
|
||||||
|
<xsl:call-template name="make.gentext.template">
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="referrer" select="$referrer"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
|
||||||
|
<xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="object.xref.template">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="referrer" select="$referrer"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:if test="$template = '' and $verbose != 0">
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:text>object.xref.markup: empty xref template</xsl:text>
|
||||||
|
<xsl:text> for linkend="</xsl:text>
|
||||||
|
<xsl:value-of select="@id|@xml:id"/>
|
||||||
|
<xsl:text>" and @xrefstyle="</xsl:text>
|
||||||
|
<xsl:value-of select="$xrefstyle"/>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
</xsl:message>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:call-template name="substitute-markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="referrer" select="$referrer"/>
|
||||||
|
<xsl:with-param name="template" select="$template"/>
|
||||||
|
<xsl:with-param name="verbose" select="$verbose"/>
|
||||||
|
<xsl:with-param name="role" select="$role"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- substitute-markup:
|
||||||
|
Propagate role to mode insert.title.markup -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/common/gentext.xsl -->
|
||||||
|
<xsl:template name="substitute-markup">
|
||||||
|
<xsl:param name="template" select="''"/>
|
||||||
|
<xsl:param name="allow-anchors" select="'0'"/>
|
||||||
|
<xsl:param name="title" select="''"/>
|
||||||
|
<xsl:param name="subtitle" select="''"/>
|
||||||
|
<xsl:param name="docname" select="''"/>
|
||||||
|
<xsl:param name="label" select="''"/>
|
||||||
|
<xsl:param name="pagenumber" select="''"/>
|
||||||
|
<xsl:param name="purpose"/>
|
||||||
|
<xsl:param name="xrefstyle"/>
|
||||||
|
<xsl:param name="referrer"/>
|
||||||
|
<xsl:param name="verbose"/>
|
||||||
|
<xsl:param name="role"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($template, '%')">
|
||||||
|
<xsl:value-of select="substring-before($template, '%')"/>
|
||||||
|
<xsl:variable name="candidate"
|
||||||
|
select="substring(substring-after($template, '%'), 1, 1)"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$candidate = 't'">
|
||||||
|
<xsl:apply-templates select="." mode="insert.title.markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="role" select="$role"/>
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$title != ''">
|
||||||
|
<xsl:copy-of select="$title"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="title.markup">
|
||||||
|
<xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
||||||
|
<xsl:with-param name="verbose" select="$verbose"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$candidate = 's'">
|
||||||
|
<xsl:apply-templates select="." mode="insert.subtitle.markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="subtitle">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$subtitle != ''">
|
||||||
|
<xsl:copy-of select="$subtitle"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="subtitle.markup">
|
||||||
|
<xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$candidate = 'n'">
|
||||||
|
<xsl:apply-templates select="." mode="insert.label.markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="label">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$label != ''">
|
||||||
|
<xsl:copy-of select="$label"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$candidate = 'p'">
|
||||||
|
<xsl:apply-templates select="." mode="insert.pagenumber.markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="pagenumber">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$pagenumber != ''">
|
||||||
|
<xsl:copy-of select="$pagenumber"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="pagenumber.markup"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$candidate = 'o'">
|
||||||
|
<!-- olink target document title -->
|
||||||
|
<xsl:apply-templates select="." mode="insert.olink.docname.markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="docname">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$docname != ''">
|
||||||
|
<xsl:copy-of select="$docname"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="olink.docname.markup"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$candidate = 'd'">
|
||||||
|
<xsl:apply-templates select="." mode="insert.direction.markup">
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="direction">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$referrer">
|
||||||
|
<xsl:variable name="referent-is-below">
|
||||||
|
<xsl:for-each select="preceding::xref">
|
||||||
|
<xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$referent-is-below = ''">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key" select="'above'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key" select="'below'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$candidate = '%' ">
|
||||||
|
<xsl:text>%</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<!-- recurse with the rest of the template string -->
|
||||||
|
<xsl:variable name="rest"
|
||||||
|
select="substring($template,
|
||||||
|
string-length(substring-before($template, '%'))+3)"/>
|
||||||
|
<xsl:call-template name="substitute-markup">
|
||||||
|
<xsl:with-param name="template" select="$rest"/>
|
||||||
|
<xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
||||||
|
<xsl:with-param name="title" select="$title"/>
|
||||||
|
<xsl:with-param name="subtitle" select="$subtitle"/>
|
||||||
|
<xsl:with-param name="docname" select="$docname"/>
|
||||||
|
<xsl:with-param name="label" select="$label"/>
|
||||||
|
<xsl:with-param name="pagenumber" select="$pagenumber"/>
|
||||||
|
<xsl:with-param name="purpose" select="$purpose"/>
|
||||||
|
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
|
||||||
|
<xsl:with-param name="referrer" select="$referrer"/>
|
||||||
|
<xsl:with-param name="verbose" select="$verbose"/>
|
||||||
|
<xsl:with-param name="role" select="$role"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$template"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
<!-- Total packages size calculation -->
|
||||||
|
|
||||||
|
<!-- returnvalue:
|
||||||
|
If the tag is not empty, apply the original template.
|
||||||
|
Otherwise apply the calculation template. -->
|
||||||
|
<xsl:template match="returnvalue">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="count(*)>0">
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="calculation">
|
||||||
|
<xsl:with-param name="scope" select="../../variablelist"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Self-made calculation template. -->
|
||||||
|
<xsl:template name="calculation">
|
||||||
|
<xsl:param name="scope"/>
|
||||||
|
<xsl:param name="total">0</xsl:param>
|
||||||
|
<xsl:param name="position">1</xsl:param>
|
||||||
|
<xsl:variable name="tokens" select="count($scope/varlistentry)"/>
|
||||||
|
<xsl:variable name="token" select="$scope/varlistentry[$position]/term/token"/>
|
||||||
|
<xsl:variable name="size" select="substring-before($token,' KB')"/>
|
||||||
|
<xsl:variable name="rawsize">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($size,',')">
|
||||||
|
<xsl:value-of select="concat(substring-before($size,','),substring-after($size,','))"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$size"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$position <= $tokens">
|
||||||
|
<xsl:call-template name="calculation">
|
||||||
|
<xsl:with-param name="scope" select="$scope"/>
|
||||||
|
<xsl:with-param name="position" select="$position +1"/>
|
||||||
|
<xsl:with-param name="total" select="$total + $rawsize"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$total < '1000'">
|
||||||
|
<xsl:value-of select="$total"/>
|
||||||
|
<xsl:text> KB</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$total > '1000' and $total < '5000'">
|
||||||
|
<xsl:value-of select="substring($total,1,1)"/>
|
||||||
|
<xsl:text>,</xsl:text>
|
||||||
|
<xsl:value-of select="substring($total,2)"/>
|
||||||
|
<xsl:text> KB</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="round($total div 1024)"/>
|
||||||
|
<xsl:text> MB</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
102
stylesheets/lfs-xsl/lfs-l10n.xml
Normal file
102
stylesheets/lfs-xsl/lfs-l10n.xml
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||||
|
|
||||||
|
<!-- Template to add more languages -->
|
||||||
|
<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
|
||||||
|
language="xx" english-language-name="xxxxx">
|
||||||
|
|
||||||
|
<l:gentext key="description" text=""/>
|
||||||
|
<l:gentext key="Bootscripts" text=""/>
|
||||||
|
<l:gentext key="Configuration Files" text=""/>
|
||||||
|
<l:gentext key="Kernel Configuration" text=""/>
|
||||||
|
<l:gentext key="Libraries" text=""/>
|
||||||
|
<l:gentext key="Others" text=""/>
|
||||||
|
<l:gentext key="Packages" text=""/>
|
||||||
|
<l:gentext key="Programs" text=""/>
|
||||||
|
<l:gentext key="Scripts" text=""/>
|
||||||
|
|
||||||
|
</l:l10n>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- English -->
|
||||||
|
<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
|
||||||
|
language="en" english-language-name="English">
|
||||||
|
|
||||||
|
<l:gentext key="description" text="description"/>
|
||||||
|
<l:gentext key="Bootscripts" text="Bootscripts"/>
|
||||||
|
<l:gentext key="Configuration Files" text="Configuration Files"/>
|
||||||
|
<l:gentext key="Kernel Configuration" text="Kernel Configuration"/>
|
||||||
|
<l:gentext key="Libraries" text="Libraries"/>
|
||||||
|
<l:gentext key="Others" text="Others"/>
|
||||||
|
<l:gentext key="Packages" text="Packages"/>
|
||||||
|
<l:gentext key="Programs" text="Programs"/>
|
||||||
|
<l:gentext key="Scripts" text="Scripts"/>
|
||||||
|
|
||||||
|
</l:l10n>
|
||||||
|
|
||||||
|
<!-- French -->
|
||||||
|
<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
|
||||||
|
language="fr" english-language-name="French">
|
||||||
|
|
||||||
|
<l:gentext key="description" text="description"/>
|
||||||
|
<l:gentext key="Bootscripts" text="Scripts de démarrage"/>
|
||||||
|
<l:gentext key="Configuration Files" text="Fichiers de configuration"/>
|
||||||
|
<l:gentext key="Kernel Configuration" text="Configuration du noyau"/>
|
||||||
|
<l:gentext key="Libraries" text="Bibliothèques"/>
|
||||||
|
<l:gentext key="Others" text="Autres"/>
|
||||||
|
<l:gentext key="Packages" text="Paquets"/>
|
||||||
|
<l:gentext key="Programs" text="Programmes"/>
|
||||||
|
<l:gentext key="Scripts" text="Scripts"/>
|
||||||
|
|
||||||
|
</l:l10n>
|
||||||
|
|
||||||
|
<!-- Italian -->
|
||||||
|
<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
|
||||||
|
language="it" english-language-name="Italian">
|
||||||
|
|
||||||
|
<l:gentext key="description" text="descrizione"/>
|
||||||
|
<l:gentext key="Bootscripts" text="Script di avvio"/>
|
||||||
|
<l:gentext key="Configuration Files" text="File di configurazione"/>
|
||||||
|
<l:gentext key="Kernel Configuration" text="Configurazione del kernel"/>
|
||||||
|
<l:gentext key="Libraries" text="Librerie"/>
|
||||||
|
<l:gentext key="Others" text="Altri"/>
|
||||||
|
<l:gentext key="Packages" text="Pacchetti"/>
|
||||||
|
<l:gentext key="Programs" text="Programmi"/>
|
||||||
|
<l:gentext key="Scripts" text="Script"/>
|
||||||
|
|
||||||
|
</l:l10n>
|
||||||
|
|
||||||
|
<!-- Spanish -->
|
||||||
|
<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
|
||||||
|
language="es" english-language-name="Spanish">
|
||||||
|
|
||||||
|
<l:gentext key="description" text="descripción"/>
|
||||||
|
<l:gentext key="Bootscripts" text="Guiones de arranque"/>
|
||||||
|
<l:gentext key="Configuration Files" text="Ficheros de configuración"/>
|
||||||
|
<l:gentext key="Kernel Configuration" text="Configuración del núcleo"/>
|
||||||
|
<l:gentext key="Libraries" text="Librerías"/>
|
||||||
|
<l:gentext key="Others" text="Otros"/>
|
||||||
|
<l:gentext key="Packages" text="Paquetes"/>
|
||||||
|
<l:gentext key="Programs" text="Programas"/>
|
||||||
|
<l:gentext key="Scripts" text="Guiones"/>
|
||||||
|
|
||||||
|
</l:l10n>
|
||||||
|
|
||||||
|
<!-- German -->
|
||||||
|
<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
|
||||||
|
language="de" english-language-name="German">
|
||||||
|
|
||||||
|
<l:gentext key="description" text="Beschreibung"/>
|
||||||
|
<l:gentext key="Bootscripts" text="Bootskripte"/>
|
||||||
|
<l:gentext key="Configuration Files" text="Einrichtungsdateien"/>
|
||||||
|
<l:gentext key="Kernel Configuration" text="Kernel-Konfiguration"/>
|
||||||
|
<l:gentext key="Libraries" text="Bibliotheken"/>
|
||||||
|
<l:gentext key="Others" text="Sonstige"/>
|
||||||
|
<l:gentext key="Packages" text="Pakete"/>
|
||||||
|
<l:gentext key="Programs" text="Programme"/>
|
||||||
|
<l:gentext key="Scripts" text="Skripte"/>
|
||||||
|
|
||||||
|
</l:l10n>
|
||||||
|
|
||||||
|
</l:i18n>
|
14
stylesheets/lfs-xsl/lfs-print.css
Normal file
14
stylesheets/lfs-xsl/lfs-print.css
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@import url(lfs.css);
|
||||||
|
|
||||||
|
.navfooter, .headerlinks {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul,
|
||||||
|
div.navheader ul{
|
||||||
|
display: none;
|
||||||
|
}
|
636
stylesheets/lfs-xsl/lfs.css
Normal file
636
stylesheets/lfs-xsl/lfs.css
Normal file
@ -0,0 +1,636 @@
|
|||||||
|
/* Global settings */
|
||||||
|
body {
|
||||||
|
font-family: verdana, tahoma, helvetica, arial, sans-serif;
|
||||||
|
text-align: left;
|
||||||
|
background: #fff;
|
||||||
|
color: #222;
|
||||||
|
margin: 1em;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1.2em
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Links */
|
||||||
|
a:link { color: #22b; }
|
||||||
|
a.ulink:link { font-weight: bold; color: #55f; }
|
||||||
|
a:visited { color: #7e4988 ! important; }
|
||||||
|
a:hover, a:focus { color: #d30e08 ! important; }
|
||||||
|
a:active { color: #6b77b1 ! important;}
|
||||||
|
|
||||||
|
|
||||||
|
/* Book titlepage */
|
||||||
|
.book .titlepage {
|
||||||
|
background: #f5f6f7;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book hr {
|
||||||
|
background: #dbddec;
|
||||||
|
height: .3em;
|
||||||
|
border: 0px;
|
||||||
|
margin: 0 -1em;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Sections */
|
||||||
|
div.sect1, div.appendix {
|
||||||
|
padding-left: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important ul {
|
||||||
|
padding-left: 1.5em;
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important ul li p {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px 0.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package, .kernel, .installation, .commands, .testing, .configuration, .content {
|
||||||
|
padding: 0 .5em .2em 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lfs .package {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-bottom: 0.2em solid #dbddec;
|
||||||
|
padding-top: .1em;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lfs .configuration {
|
||||||
|
background: #fefefe;
|
||||||
|
border-top: 0.2em solid #dbddec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lfs .content {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-top: 0.2em solid #dbddec;
|
||||||
|
padding-bottom: .1em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Headers */
|
||||||
|
h1, h2, h3, h4, h5, h6, b, .strong {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 173%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book h1 {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preface h1, .part h1, .chapter h1, .appendix h1, .index h1, .sect1 h1, .glossary h1 {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-bottom: .1em solid #dbddec;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-top: 0;
|
||||||
|
padding: .4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sect1 h1, .appendix h1 {
|
||||||
|
margin-left: -.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap h1 {
|
||||||
|
background: #f5f6f7;
|
||||||
|
margin: 0;
|
||||||
|
padding: .4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.title sup {
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 144%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book h2.subtitle {
|
||||||
|
text-align: center;
|
||||||
|
background: #dbddec;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.appendix h2 {
|
||||||
|
font-size: 133%;
|
||||||
|
margin-top: .8em;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 110%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package h4, h5, h6 {
|
||||||
|
font-size: 100%;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Navigation */
|
||||||
|
div.navheader, div.navfooter {
|
||||||
|
background: #ecedef;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.1em .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader {
|
||||||
|
border-bottom: 1px solid #dbddec;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navfooter {
|
||||||
|
border-top: 1px solid #dbddec;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader h4 {
|
||||||
|
margin-top: .4em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader h3 {
|
||||||
|
margin-top: .2em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul, div.navfooter ul {
|
||||||
|
padding: .2em .5em .5em 0;
|
||||||
|
margin: .5em 0;
|
||||||
|
position: relative;
|
||||||
|
background: #dbddec;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul li, div.navfooter ul li {
|
||||||
|
display: inline;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul li.prev, div.navfooter ul li.prev {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
left: 0;
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 1em;
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul li.next, div.navfooter ul li.next {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
text-align: right;
|
||||||
|
right: 5px;
|
||||||
|
padding: 0.2em 0.5em;
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul li.prev p, div.navfooter ul li.prev p,
|
||||||
|
div.navheader ul li.next p, div.navfooter ul li.next p {
|
||||||
|
padding: 0;
|
||||||
|
margin: 1px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.navheader ul li.home, div.navheader ul li.up,
|
||||||
|
div.navfooter ul li.home, div.navfooter ul li.up {
|
||||||
|
text-align: center;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0px auto;
|
||||||
|
display: block;
|
||||||
|
color: #dbddec;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TOC */
|
||||||
|
div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toc {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book li.preface, .part li.appendix {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.part li.preface {
|
||||||
|
margin-left: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toc h3 {
|
||||||
|
margin: 1em 0 .3em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.appendix h3, li.glossary h3, li.index h3 {
|
||||||
|
margin: .5em
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toc h4 {
|
||||||
|
margin: .6em 0 .2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.chapter h4 a {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: .4em
|
||||||
|
}
|
||||||
|
|
||||||
|
.dummy {
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 110%;
|
||||||
|
margin: .6em 0 .2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Index */
|
||||||
|
.item {
|
||||||
|
float: left;
|
||||||
|
margin-right: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.secitem {
|
||||||
|
font-weight: normal;
|
||||||
|
float: left;
|
||||||
|
margin-right: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.indexref {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item + .indexref {
|
||||||
|
margin-left: 20em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.secitem + .indexref {
|
||||||
|
margin-left: 19em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Admonitions */
|
||||||
|
div.admon img {
|
||||||
|
padding: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admon h3 {
|
||||||
|
display: inline;
|
||||||
|
margin-left: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admon p {
|
||||||
|
margin-left: .5em;
|
||||||
|
padding-bottom: .4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admon pre {
|
||||||
|
margin: 0.5em 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.note, div.tip {
|
||||||
|
background-color: #fffff6;
|
||||||
|
border: 2px solid #dbddec;
|
||||||
|
width: 90%;
|
||||||
|
margin: .5em auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important, div.warning, div.caution {
|
||||||
|
background-color: #fffff6;
|
||||||
|
border: medium solid #400;
|
||||||
|
width: 90%;
|
||||||
|
margin: .5em auto;
|
||||||
|
color: #600;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important h3, div.warning h3, div.caution h3 {
|
||||||
|
color: #900;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important em, div.warning em, div.caution em {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* table */
|
||||||
|
.table p.title {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table table, .informaltable {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table table th, .table table td {
|
||||||
|
padding: 0.2em 2em 0.2em 2em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.revhistory {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.revhistory th {
|
||||||
|
line-height: 2em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.revhistory td {
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* variablelist as table */
|
||||||
|
.variablelist table {
|
||||||
|
width: auto;
|
||||||
|
margin: 0 1em 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.variablelist td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.variablelist td span, td p {
|
||||||
|
margin: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* variablelist as list */
|
||||||
|
dl {
|
||||||
|
padding-left: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: .6em;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.materials dt {
|
||||||
|
display: list-item;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.materials dd {
|
||||||
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* segmentedlist */
|
||||||
|
.appendix .segmentedlist {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package .seg {
|
||||||
|
margin-bottom: 0em;
|
||||||
|
margin-top: 0em;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .seg {
|
||||||
|
margin-bottom: .4em;
|
||||||
|
margin-top: .4em;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.segtitle {
|
||||||
|
float: left;
|
||||||
|
padding-left: 1em;
|
||||||
|
width: 14.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .segtitle {
|
||||||
|
width: 12em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package .segbody {
|
||||||
|
display: block;
|
||||||
|
padding-left: 14em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.appendix .segbody{
|
||||||
|
display: block;
|
||||||
|
padding-left: 16em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .segbody {
|
||||||
|
display: block;
|
||||||
|
padding-left: 13em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content table tr td:first-child
|
||||||
|
{
|
||||||
|
width: 9em;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content table tr td:first-child p
|
||||||
|
{
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* itemizedlist */
|
||||||
|
ul {
|
||||||
|
padding-left: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist ul {
|
||||||
|
margin-left: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist li ul {
|
||||||
|
margin-bottom: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist li ul li p {
|
||||||
|
margin-top: .5em;
|
||||||
|
margin-bottom: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist li ul li:first-child p:first-child {
|
||||||
|
margin-top: -.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blfs ul.compact {
|
||||||
|
list-style: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact li {
|
||||||
|
margin: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact li p {
|
||||||
|
padding: 0.3em;
|
||||||
|
margin: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blfs ul.compact li p {
|
||||||
|
background-color: #f0fff0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* orderedlist */
|
||||||
|
ol {
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol {
|
||||||
|
list-style: lower-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol ol {
|
||||||
|
list-style: lower-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.compact li {
|
||||||
|
margin: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.compact li p {
|
||||||
|
padding: 0.3em;
|
||||||
|
margin: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Indented blocks */
|
||||||
|
p, blockquote {
|
||||||
|
padding-left: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Monospaced elements */
|
||||||
|
tt, code, kbd, pre, .command {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.systemitem {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: #e5e5e5;
|
||||||
|
border: 1px solid #050505;
|
||||||
|
padding: .5em 1em;
|
||||||
|
margin: 0 2em .5em 2em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.userinput {
|
||||||
|
color: #101310;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.root {
|
||||||
|
color: #101310;
|
||||||
|
border: 1px solid #11a;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.screen {
|
||||||
|
color: #000;
|
||||||
|
background-color: #e9e9e9;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.literal, .prompt {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Mixed tags */
|
||||||
|
p.usernotes {
|
||||||
|
margin-left: -1em;
|
||||||
|
font-size: small;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.underlined {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Last edited info */
|
||||||
|
p.updated {
|
||||||
|
font-size: small;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Special colored blocks */
|
||||||
|
/* OrangeRed4 */
|
||||||
|
.feature-ssp {
|
||||||
|
color: #8B2500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RoyalBlue3 */
|
||||||
|
.feature-aslr {
|
||||||
|
color: #3A5FCD;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* NavyBlue */
|
||||||
|
.feature-pax {
|
||||||
|
color: #000080;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* VioletRed */
|
||||||
|
.feature-hardened_tmp {
|
||||||
|
color: #d02090;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PaleTurquoise4 */
|
||||||
|
.feature-warnings {
|
||||||
|
color: #668b8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RosyBrown */
|
||||||
|
.feature-misc {
|
||||||
|
color: #bc8f8f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sienna*/
|
||||||
|
.feature-blowfish {
|
||||||
|
color: #8E6B23
|
||||||
|
}
|
1290
stylesheets/lfs-xsl/lfs.css.new
Normal file
1290
stylesheets/lfs-xsl/lfs.css.new
Normal file
File diff suppressed because it is too large
Load Diff
634
stylesheets/lfs-xsl/nochunks.xsl
Normal file
634
stylesheets/lfs-xsl/nochunks.xsl
Normal file
@ -0,0 +1,634 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Stylesheet for non-chunked XHTML output
|
||||||
|
Replaces {docbook-xsl}/xhtml/profile-docbook.xsl -->
|
||||||
|
|
||||||
|
<!-- Upstream XHTML templates -->
|
||||||
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
|
||||||
|
|
||||||
|
<!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
|
||||||
|
<xsl:output method="html" encoding="ISO-8859-1" indent="no" />
|
||||||
|
|
||||||
|
<!-- Include our customized templates -->
|
||||||
|
<xsl:include href="common.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-index.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-mixed.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-sections.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-toc.xsl"/>
|
||||||
|
<xsl:include href="xhtml/lfs-xref.xsl"/>
|
||||||
|
|
||||||
|
<!-- Control generation of ToCs and LoTs -->
|
||||||
|
<xsl:param name="generate.toc">
|
||||||
|
book toc,title
|
||||||
|
preface nop
|
||||||
|
part nop
|
||||||
|
chapter nop
|
||||||
|
appendix nop
|
||||||
|
sect1 nop
|
||||||
|
sect2 nop
|
||||||
|
sect3 nop
|
||||||
|
sect4 nop
|
||||||
|
sect5 nop
|
||||||
|
section nop
|
||||||
|
</xsl:param>
|
||||||
|
|
||||||
|
<!-- How deep should recursive sections appear in the TOC? -->
|
||||||
|
<xsl:param name="toc.section.depth">1</xsl:param>
|
||||||
|
|
||||||
|
<!-- How deep, at most, should each TOC be? -->
|
||||||
|
<xsl:param name="toc.max.depth">3</xsl:param>
|
||||||
|
|
||||||
|
<!-- Remove some unwanted style attributes -->
|
||||||
|
<xsl:param name="ulink.target" select="''"></xsl:param>
|
||||||
|
<xsl:param name="css.decoration" select="0"></xsl:param>
|
||||||
|
|
||||||
|
<!-- Don't use graphics in admonitions -->
|
||||||
|
<xsl:param name="admon.graphics" select="0"/>
|
||||||
|
|
||||||
|
<!-- Change the admonitions output tagging:
|
||||||
|
Remove $admon.style support
|
||||||
|
Hardcode $admon.textlabel feature
|
||||||
|
The original template is in {docbook-xsl}/xhtml/admon.xsl -->
|
||||||
|
<xsl:template name="nongraphical.admonition">
|
||||||
|
<div class="admon {name(.)}">
|
||||||
|
<h3>
|
||||||
|
<xsl:apply-templates select="." mode="object.title.markup"/>
|
||||||
|
</h3>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect2.titlepage:
|
||||||
|
Remove a lot of unneeded code.
|
||||||
|
Skip empty titles.
|
||||||
|
No label in preface (actually, skip the hardcoded dot).
|
||||||
|
The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="sect2.titlepage">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="string-length(title) = 0"/>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<h3 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h3>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- The CSS Stylesheet:
|
||||||
|
Note: there are some differences with lfs.css code related to h* values,
|
||||||
|
admonitions and no navigational code. The original template is in
|
||||||
|
{docbook-xsl}/xhtml/docbook.xsl -->
|
||||||
|
<xsl:template name='user.head.content'>
|
||||||
|
<style type="text/css">
|
||||||
|
<xsl:text>
|
||||||
|
/* Global settings */
|
||||||
|
body {
|
||||||
|
font-family: verdana, tahoma, helvetica, arial, sans-serif;
|
||||||
|
text-align: left;
|
||||||
|
background: #fff;
|
||||||
|
color: #222;
|
||||||
|
margin: 1em;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1.2em
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Links */
|
||||||
|
a:link { color: #22b; }
|
||||||
|
a.ulink:link { font-weight: bold; color: #55f; }
|
||||||
|
a:visited { color: #7e4988 ! important; }
|
||||||
|
a:hover, a:focus { color: #d30e08 ! important; }
|
||||||
|
a:active { color: #6b77b1 ! important;}
|
||||||
|
|
||||||
|
|
||||||
|
/* Book titlepage */
|
||||||
|
.book {
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book h1, .book .authorgroup, .book .copyright, .book .legalnotice .revhistory {
|
||||||
|
background: #f5f6f7;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: .1em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book hr {
|
||||||
|
background: #dbddec;
|
||||||
|
height: .3em;
|
||||||
|
border: 0px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Sections */
|
||||||
|
div.sect1, div.appendix {
|
||||||
|
padding-left: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package, .kernel, .installation, .commands, .testing, .configuration, .content {
|
||||||
|
padding: 0 .5em .2em 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lfs .package {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-bottom: 0.2em solid #dbddec;
|
||||||
|
padding-top: .1em;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lfs .configuration {
|
||||||
|
background: #fefefe;
|
||||||
|
border-top: 0.2em solid #dbddec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lfs .content {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-top: 0.2em solid #dbddec;
|
||||||
|
border-bottom: 0.2em solid #dbddec;
|
||||||
|
padding-bottom: .1em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Headers */
|
||||||
|
h1, h2, h3, h4, h5, h6, b, .strong {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 173%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book h1 {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.title sup {
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 144%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preface h2, .part h1, .chapter h2, .appendix h2, .index h1, .sect1 h2 {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-top: .2em solid #dbddec;
|
||||||
|
border-bottom: .2em solid #dbddec;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-top: 1em;
|
||||||
|
padding: .4em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sect1 h2, .appendix h2 {
|
||||||
|
margin-left: -.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap h2 {
|
||||||
|
background: #f5f6f7;
|
||||||
|
border-bottom: 0;
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding-top: .4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book h2.subtitle {
|
||||||
|
text-align: center;
|
||||||
|
background: #dbddec;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.appendix h3 {
|
||||||
|
font-size: 133%;
|
||||||
|
margin-top: .8em;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 110%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package h4, h5, h6 {
|
||||||
|
font-size: 100%;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TOC */
|
||||||
|
div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toc {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.preface, .part li.appendix {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toc h3 {
|
||||||
|
margin: 1em 0 .3em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.appendix h3, li.glossary h3, li.index h3 {
|
||||||
|
margin: .5em
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toc h4 {
|
||||||
|
margin: .6em 0 .2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.chapter h4 a {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: .4em
|
||||||
|
}
|
||||||
|
|
||||||
|
.dummy {
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 110%;
|
||||||
|
margin: .6em 0 .2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Index */
|
||||||
|
.item {
|
||||||
|
float: left;
|
||||||
|
margin-right: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.secitem {
|
||||||
|
font-weight: normal;
|
||||||
|
float: left;
|
||||||
|
margin-right: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.indexref {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item + .indexref {
|
||||||
|
margin-left: 20em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.secitem + .indexref {
|
||||||
|
margin-left: 19em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Admonitions */
|
||||||
|
div.admon h3 {
|
||||||
|
padding-left: 2.5em;
|
||||||
|
padding-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admon p {
|
||||||
|
margin-left: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admon pre {
|
||||||
|
margin: 0.5em 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.note, div.tip {
|
||||||
|
background-color: #fffff6;
|
||||||
|
border: 2px solid #dbddec;
|
||||||
|
width: 90%;
|
||||||
|
margin: .5em auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important, div.warning, div.caution {
|
||||||
|
background-color: #fffff6;
|
||||||
|
border: medium solid #400;
|
||||||
|
width: 90%;
|
||||||
|
margin: .5em auto;
|
||||||
|
color: #600;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important h3, div.warning h3, div.caution h3 {
|
||||||
|
color: #900;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.important em, div.warning em, div.caution em {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* table */
|
||||||
|
.table p.title {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table table {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table table th, .table table td {
|
||||||
|
padding: 0.2em 2em 0.2em 2em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.revhistory {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.revhistory th {
|
||||||
|
line-height: 2em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.revhistory td {
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* variablelist as table */
|
||||||
|
.variablelist table {
|
||||||
|
width: auto;
|
||||||
|
margin: 0 1em 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.variablelist td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.variablelist td span, td p {
|
||||||
|
margin: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.variablelist td p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* variablelist as list */
|
||||||
|
dl {
|
||||||
|
padding-left: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: .6em;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.materials dt {
|
||||||
|
display: list-item;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.materials dd {
|
||||||
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* segmentedlist */
|
||||||
|
.appendix .segmentedlist {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package .seg {
|
||||||
|
margin-bottom: 0em;
|
||||||
|
margin-top: 0em;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .seg {
|
||||||
|
margin-bottom: .4em;
|
||||||
|
margin-top: .4em;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.segtitle {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package .segbody, .appendix .segbody {
|
||||||
|
display: block;
|
||||||
|
padding-left: 14em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .segbody {
|
||||||
|
display: block;
|
||||||
|
padding-left: 12em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* itemizedlist */
|
||||||
|
ul {
|
||||||
|
padding-left: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist ul {
|
||||||
|
margin-left: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist li ul {
|
||||||
|
margin-bottom: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist li ul li p {
|
||||||
|
margin-top: .5em;
|
||||||
|
margin-bottom: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemizedlist li ul li:first-child p:first-child {
|
||||||
|
margin-top: -.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blfs ul.compact {
|
||||||
|
list-style: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact li {
|
||||||
|
margin: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.compact li p {
|
||||||
|
padding: 0.3em;
|
||||||
|
margin: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blfs ul.compact li p {
|
||||||
|
background-color: #f0fff0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* orderedlist */
|
||||||
|
ol {
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol {
|
||||||
|
list-style: lower-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol ol {
|
||||||
|
list-style: lower-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.compact li {
|
||||||
|
margin: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.compact li p {
|
||||||
|
padding: 0.3em;
|
||||||
|
margin: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Indented blocks */
|
||||||
|
p, blockquote {
|
||||||
|
padding-left: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Monospaced elements */
|
||||||
|
tt, code, kbd, pre, .command {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.systemitem {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: #e5e5e5;
|
||||||
|
border: 1px solid #050505;
|
||||||
|
padding: .5em 1em;
|
||||||
|
margin: 0 2em .5em 2em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.userinput {
|
||||||
|
color: #101310;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.root {
|
||||||
|
color: #101310;
|
||||||
|
border: 1px solid #11a;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.screen {
|
||||||
|
color: #000;
|
||||||
|
background-color: #e9e9e9;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.literal, .prompt {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Mixed tags */
|
||||||
|
p.usernotes {
|
||||||
|
margin-left: -1em;
|
||||||
|
font-size: small;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.underlined {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Last edited info */
|
||||||
|
p.updated {
|
||||||
|
font-size: small;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Special colored blocks */
|
||||||
|
/* OrangeRed4 */
|
||||||
|
.feature-ssp {
|
||||||
|
color: #8B2500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RoyalBlue3 */
|
||||||
|
.feature-aslr {
|
||||||
|
color: #3A5FCD;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* NavyBlue */
|
||||||
|
.feature-pax {
|
||||||
|
color: #000080;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* VioletRed */
|
||||||
|
.feature-hardened_tmp {
|
||||||
|
color: #d02090;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PaleTurquoise4 */
|
||||||
|
.feature-warnings {
|
||||||
|
color: #668b8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RosyBrown */
|
||||||
|
.feature-misc {
|
||||||
|
color: #bc8f8f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sienna*/
|
||||||
|
.feature-blowfish {
|
||||||
|
color: #8E6B23
|
||||||
|
}
|
||||||
|
</xsl:text>
|
||||||
|
</style>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
103
stylesheets/lfs-xsl/pdf.xsl
Normal file
103
stylesheets/lfs-xsl/pdf.xsl
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Stylesheet for FO output used to generate PDF
|
||||||
|
Sets global params and include customization stylesheets. -->
|
||||||
|
|
||||||
|
<!-- Upstream FO templates. Profiled version is not supported by
|
||||||
|
xsltproc, thus pofiling must be done in two steps (see Makefile) -->
|
||||||
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
|
||||||
|
|
||||||
|
<!-- Uncomment the following to make debugging the raw FO code easier.
|
||||||
|
Note that FOP will complaints about a lot of paragraph overflows
|
||||||
|
because verbatim output is also indented.
|
||||||
|
Remember to comment the "rm $(BASEDIR)/lfs-pdf.fo" in
|
||||||
|
the Makefile. -->
|
||||||
|
<!--<xsl:output encoding="UTF-8" indent="yes" />-->
|
||||||
|
|
||||||
|
<!-- Including our others customized templates. -->
|
||||||
|
<xsl:include href="common.xsl"/>
|
||||||
|
<xsl:include href="pdf/lfs-admon.xsl"/>
|
||||||
|
<xsl:include href="pdf/lfs-index.xsl"/>
|
||||||
|
<xsl:include href="pdf/lfs-lists.xsl"/>
|
||||||
|
<xsl:include href="pdf/lfs-mixed.xsl"/>
|
||||||
|
<xsl:include href="pdf/lfs-pagesetup.xsl"/>
|
||||||
|
<xsl:include href="pdf/lfs-xref.xsl"/>
|
||||||
|
|
||||||
|
<!-- Activate FOP-1 extensions. We use FOP-0.93 as the FO procesor. -->
|
||||||
|
<xsl:param name="fop1.extensions" select="1"/>
|
||||||
|
|
||||||
|
<!-- Deactivate draft mode. -->
|
||||||
|
<xsl:param name="draft.mode" select="'no'"/>
|
||||||
|
|
||||||
|
<!-- Paper size -->
|
||||||
|
<xsl:param name="paper.type" select="'USletter'"/>
|
||||||
|
|
||||||
|
<!-- Paper size required by the publisher
|
||||||
|
<xsl:param name="paper.type" select="'Customized'"/>
|
||||||
|
<xsl:param name="page.width">7.25in</xsl:param>
|
||||||
|
<xsl:param name="page.height">9.25in</xsl:param>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Is the document to be printed double sided? 1 = yes, 0 = no -->
|
||||||
|
<!-- Change "double.sided" to "1" for published versions. -->
|
||||||
|
<xsl:param name="double.sided" select="0"/>
|
||||||
|
|
||||||
|
<!-- Hyphenate? -->
|
||||||
|
<xsl:param name="hyphenate">false</xsl:param>
|
||||||
|
|
||||||
|
<!-- Allow URLs to be automatically hyphenated.
|
||||||
|
We have expanded the support to several inline tags.
|
||||||
|
See pdf/lfs-mixed.xsl -->
|
||||||
|
<xsl:param name="ulink.hyphenate" select="'​'"/>
|
||||||
|
|
||||||
|
<!-- List of characters to allow ulink URLs, and supported inline tags,
|
||||||
|
to be automatically hyphenated on.
|
||||||
|
Note: the / character is in the list but FOP-0.93 ignores it. -->
|
||||||
|
<xsl:param name="ulink.hyphenate.chars" select="'/._-'"/>
|
||||||
|
|
||||||
|
<!-- Specify the default text alignment. -->
|
||||||
|
<xsl:param name="alignment">justify</xsl:param>
|
||||||
|
|
||||||
|
<!-- Specify the default point size for body text.
|
||||||
|
Used for calculating the size of titles. -->
|
||||||
|
<xsl:param name="body.font.master">9</xsl:param>
|
||||||
|
|
||||||
|
<!-- Specifies the default font size for body text. -->
|
||||||
|
<xsl:param name="body.font.size">12pt</xsl:param>
|
||||||
|
|
||||||
|
<!-- Control generation of ToCs and LoTs -->
|
||||||
|
<xsl:param name="generate.toc">
|
||||||
|
book toc,title
|
||||||
|
part nop
|
||||||
|
</xsl:param>
|
||||||
|
|
||||||
|
<!-- How deep should recursive sections appear in the TOC? -->
|
||||||
|
<xsl:param name="toc.section.depth">1</xsl:param>
|
||||||
|
|
||||||
|
<!-- Amount of indentation for TOC entries. -->
|
||||||
|
<xsl:param name="toc.indent.width" select="18"/>
|
||||||
|
|
||||||
|
<!-- Turns page numbers in xrefs on and off. -->
|
||||||
|
<xsl:param name="insert.xref.page.number">no</xsl:param>
|
||||||
|
|
||||||
|
<!-- Display URLs after ulinks? 1 = yes, 0 = no
|
||||||
|
Set to 0 to prevent duplicate e-mails in the Acknowledgments pages. -->
|
||||||
|
<xsl:param name="ulink.show" select="0"/>
|
||||||
|
|
||||||
|
<!-- Processing instruction for hard page breaks.
|
||||||
|
FOP-0.93 supports @keep-*.*, @orphans, and @widows attributes,
|
||||||
|
that solves several page break issues.
|
||||||
|
It also supports the soft page break procesing instruction included
|
||||||
|
in the DocBook stylesheets.
|
||||||
|
But sometimes we may need hard page breaks for final book versions.
|
||||||
|
To understand all of the page break features, see
|
||||||
|
http://www.sagehill.net/docbookxsl/PageBreaking.html -->
|
||||||
|
<xsl:template match="processing-instruction('hard-pagebreak')">
|
||||||
|
<fo:block break-before='page'/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
76
stylesheets/lfs-xsl/pdf/lfs-admon.xsl
Normal file
76
stylesheets/lfs-xsl/pdf/lfs-admon.xsl
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how admonitions are displayed -->
|
||||||
|
|
||||||
|
<!-- Use graphics in admonitions? 1 = yes, 0 = no -->
|
||||||
|
<xsl:param name="admon.graphics" select="1"/>
|
||||||
|
|
||||||
|
<!-- Path to admonition graphics relative to index.xml -->
|
||||||
|
<xsl:param name="admon.graphics.path" select="'images/'"/>
|
||||||
|
|
||||||
|
<!-- Global admonitions properties -->
|
||||||
|
<xsl:attribute-set name="graphical.admonition.properties">
|
||||||
|
<xsl:attribute name="keep-together.within-column">
|
||||||
|
<xsl:variable name="keep.together">
|
||||||
|
<xsl:call-template name="pi.dbfo_keep-together"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$keep.together != ''">
|
||||||
|
<xsl:value-of select="$keep.together"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>always</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
|
||||||
|
<xsl:attribute name="padding-start">5pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="padding-top">5pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="padding-bottom">5pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||||
|
<xsl:attribute name="border-width">0.5pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="background-color">#FFFFE6</xsl:attribute>
|
||||||
|
<xsl:attribute name="border-color">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="self::note | self::tip">#E0E0E0</xsl:when>
|
||||||
|
<xsl:otherwise>#DCC</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Properties for admonitions titles -->
|
||||||
|
<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 name="color">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor-or-self::important | ancestor-or-self::warning
|
||||||
|
| ancestor-or-self::caution">#500</xsl:when>
|
||||||
|
<xsl:otherwise>#000</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Properties for admonitions text -->
|
||||||
|
<xsl:attribute-set name="admonition.properties">
|
||||||
|
<xsl:attribute name="margin-right">5pt</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- admon.graphic.width:
|
||||||
|
Making the graphic smaller. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/admon.xsl -->
|
||||||
|
<xsl:template match="*" mode="admon.graphic.width">
|
||||||
|
<xsl:param name="node" select="."/>
|
||||||
|
<xsl:text>24pt</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
135
stylesheets/lfs-xsl/pdf/lfs-index.xsl
Normal file
135
stylesheets/lfs-xsl/pdf/lfs-index.xsl
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<!DOCTYPE xsl:stylesheet [
|
||||||
|
<!ENTITY lowercase "'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ'">
|
||||||
|
<!ENTITY uppercase "'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'">
|
||||||
|
<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'>
|
||||||
|
<!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"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how the Index is generated.
|
||||||
|
Entities comes from {docbook-xsl}/common/entities.ent -->
|
||||||
|
|
||||||
|
<!-- Override for punctuation separating an index term from its list
|
||||||
|
of page references. -->
|
||||||
|
<xsl:param name="index.term.separator" select="': '"></xsl:param>
|
||||||
|
|
||||||
|
<!-- Divisions title properties. -->
|
||||||
|
<xsl:attribute-set name="index.div.title.properties">
|
||||||
|
<xsl:attribute name="margin-left">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">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">0.5em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.minimum">0.3em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.maximum">0.7em</xsl:attribute>
|
||||||
|
<xsl:attribute name="start-indent">0pt</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Properties applied to the block containing entries in an Index. -->
|
||||||
|
<xsl:attribute-set name="index.entry.properties">
|
||||||
|
<xsl:attribute name="start-indent">0.5pc</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Divisions:
|
||||||
|
Translate alphabetical divisions titles to by-type titles. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/autoidx.xsl -->
|
||||||
|
<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:variable name="divtitle" select="translate($key, &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:choose>
|
||||||
|
<xsl:when test="$divtitle = 'A'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Packages</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'B'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Programs</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'C'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Libraries</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'D'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$book-type = 'blfs'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Kernel Configuration</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Scripts</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'E'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$book-type = 'blfs'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Configuration Files</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Others</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'F'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Bootscripts</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'G'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Others</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$divtitle"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</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:stylesheet>
|
169
stylesheets/lfs-xsl/pdf/lfs-lists.xsl
Normal file
169
stylesheets/lfs-xsl/pdf/lfs-lists.xsl
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how list are generated. -->
|
||||||
|
|
||||||
|
<!-- What spacing do you want before and after lists? -->
|
||||||
|
<xsl:attribute-set name="list.block.spacing">
|
||||||
|
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- What spacing do you want between list items? -->
|
||||||
|
<xsl:attribute-set name="list.item.spacing">
|
||||||
|
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Properties that apply to each list-block generated by itemizedlist. -->
|
||||||
|
<xsl:attribute-set name="itemizedlist.properties"
|
||||||
|
use-attribute-sets="list.block.properties">
|
||||||
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Format variablelists lists as blocks? 1 = yes, 0 = no
|
||||||
|
Default variablelist format. We override it when necessary
|
||||||
|
using the list-presentation processing instruction. -->
|
||||||
|
<xsl:param name="variablelist.as.blocks" select="1"/>
|
||||||
|
|
||||||
|
<!-- Specifies the longest term in variablelists.
|
||||||
|
Used when list-presentation = list -->
|
||||||
|
<xsl:param name="variablelist.max.termlength">35</xsl:param>
|
||||||
|
|
||||||
|
<!-- varlistentry mode block:
|
||||||
|
Addibg a bullet, left alignament, and @kepp-*.* attributes
|
||||||
|
for packages and paches list. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/list.xsl -->
|
||||||
|
<xsl:template match="varlistentry" mode="vl.as.blocks">
|
||||||
|
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::variablelist/@role = 'materials'">
|
||||||
|
<fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
|
||||||
|
keep-together.within-column="always" font-weight="bold"
|
||||||
|
keep-with-next.within-column="always" text-align="left">
|
||||||
|
<xsl:text>• </xsl:text>
|
||||||
|
<xsl:apply-templates select="term"/>
|
||||||
|
</fo:block>
|
||||||
|
<fo:block text-align="left"
|
||||||
|
keep-together.within-column="always"
|
||||||
|
keep-with-previous.within-column="always">
|
||||||
|
<xsl:apply-templates select="listitem"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
|
||||||
|
keep-together.within-column="always"
|
||||||
|
keep-with-next.within-column="always" margin-left="1em">
|
||||||
|
<xsl:apply-templates select="term"/>
|
||||||
|
</fo:block>
|
||||||
|
<fo:block margin-left="2em">
|
||||||
|
<xsl:apply-templates select="listitem"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- segmentedlist:
|
||||||
|
Making it an actual FO list to can indent items.
|
||||||
|
Adjust vertical space. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/list.xsl -->
|
||||||
|
<xsl:template match="segmentedlist">
|
||||||
|
<xsl:variable name="id">
|
||||||
|
<xsl:call-template name="object.id"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<fo:list-block id="{$id}" provisional-distance-between-starts="12em"
|
||||||
|
provisional-label-separation="1em"
|
||||||
|
keep-together.within-column="always">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::appendix[@id='appendixc']">
|
||||||
|
<xsl:attribute name="space-before.optimum">0.2em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.optimum">0.2em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.minimum">0em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.maximum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.optimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.minimum">0.2em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:apply-templates select="seglistitem/seg"/>
|
||||||
|
</fo:list-block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- seg:
|
||||||
|
Self-made template based on the original seg template
|
||||||
|
found in {docbook-xsl}/fo/list.xsl
|
||||||
|
Making segmentedlist an actual FO list to can indent items. -->
|
||||||
|
<xsl:template match="seglistitem/seg">
|
||||||
|
<xsl:variable name="id">
|
||||||
|
<xsl:call-template name="object.id"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
|
||||||
|
<xsl:variable name="seglist" select="ancestor::segmentedlist"/>
|
||||||
|
<xsl:variable name="segtitles" select="$seglist/segtitle"/>
|
||||||
|
<fo:list-item xsl:use-attribute-sets="compact.list.item.spacing">
|
||||||
|
<fo:list-item-label end-indent="label-end()" text-align="start">
|
||||||
|
<fo:block>
|
||||||
|
<fo:inline font-weight="bold">
|
||||||
|
<xsl:apply-templates select="$segtitles[$segnum=position()]"
|
||||||
|
mode="segtitle-in-seg"/>
|
||||||
|
<xsl:text>:</xsl:text>
|
||||||
|
</fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:list-item-label>
|
||||||
|
<fo:list-item-body start-indent="body-start()">
|
||||||
|
<fo:block id="{$id}">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</fo:block>
|
||||||
|
</fo:list-item-body>
|
||||||
|
</fo:list-item>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- simplelist:
|
||||||
|
Self-made template. Wrap it into a fo:block and process member childs.
|
||||||
|
If @type is specified, the original templates will be used.
|
||||||
|
NOTE: when using type='horiz' or type='vert', FOP-0.93 will complaints
|
||||||
|
about not supported table-layout="auto" -->
|
||||||
|
<xsl:template match="simplelist">
|
||||||
|
<fo:block xsl:use-attribute-sets="simplelist.properties">
|
||||||
|
<xsl:apply-templates mode="condensed"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- member:
|
||||||
|
Self-made template to wrap it into a fo:block using customized
|
||||||
|
properties. -->
|
||||||
|
<xsl:template match="member" mode="condensed">
|
||||||
|
<fo:block xsl:use-attribute-sets="simplelist.properties">
|
||||||
|
<xsl:call-template name="simple.xlink">
|
||||||
|
<xsl:with-param name="content">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Properties associated with our simplelist format. -->
|
||||||
|
<xsl:attribute-set name="simplelist.properties">
|
||||||
|
<xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
|
||||||
|
<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:stylesheet>
|
381
stylesheets/lfs-xsl/pdf/lfs-mixed.xsl
Normal file
381
stylesheets/lfs-xsl/pdf/lfs-mixed.xsl
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet contains misc params, attribute sets and templates
|
||||||
|
for output formating.
|
||||||
|
This file is for that templates that don't fit in other files. -->
|
||||||
|
|
||||||
|
<!-- What space do you want between normal paragraphs. -->
|
||||||
|
<xsl:attribute-set name="normal.para.spacing">
|
||||||
|
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||||
|
<xsl:attribute name="orphans">3</xsl:attribute>
|
||||||
|
<xsl:attribute name="widows">3</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Properties associated with verbatim text. -->
|
||||||
|
<xsl:attribute-set name="verbatim.properties">
|
||||||
|
<xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-after.maximum">0.8em</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>
|
||||||
|
|
||||||
|
<!-- Should verbatim environments be shaded? 1 =yes, 0 = no -->
|
||||||
|
<xsl:param name="shade.verbatim" select="1"/>
|
||||||
|
|
||||||
|
<!-- Properties that specify the style of shaded verbatim listings -->
|
||||||
|
<xsl:attribute-set name="shade.verbatim.style">
|
||||||
|
<xsl:attribute name="background-color">#E9E9E9</xsl:attribute>
|
||||||
|
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||||
|
<xsl:attribute name="border-width">0.5pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="border-color">#888</xsl:attribute>
|
||||||
|
<xsl:attribute name="padding-start">5pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="padding-top">2pt</xsl:attribute>
|
||||||
|
<xsl:attribute name="padding-bottom">2pt</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- para:
|
||||||
|
Skip empty "Home page" in packages.xml.
|
||||||
|
Allow forced line breaks inside paragraphs emulating literallayout.
|
||||||
|
Removed vertical space in variablelist. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/block.xsl -->
|
||||||
|
<xsl:template match="para">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="child::ulink[@url=' ']"/>
|
||||||
|
<xsl:when test="./@remap='verbatim'">
|
||||||
|
<fo:block xsl:use-attribute-sets="verbatim.properties">
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="ancestor::variablelist">
|
||||||
|
<fo:block>
|
||||||
|
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.minimum">0em</xsl:attribute>
|
||||||
|
<xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<fo:block xsl:use-attribute-sets="normal.para.spacing">
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- screen, literallayout:
|
||||||
|
Self-made template that creates a fo:block wrapper with keep-together
|
||||||
|
processing instruction support around the output generated by
|
||||||
|
original screen templates. -->
|
||||||
|
<xsl:template match="screen|literallayout">
|
||||||
|
<xsl:variable name="keep.together">
|
||||||
|
<xsl:call-template name="pi.dbfo_keep-together"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<fo:block>
|
||||||
|
<xsl:attribute name="keep-together.within-column">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$keep.together != ''">
|
||||||
|
<xsl:value-of select="$keep.together"/>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- The following section has been modified by Martin Miehe. Page breaks
|
||||||
|
should be allowed within the long script listings in the appendices.
|
||||||
|
|
||||||
|
<xsl:otherwise>always</xsl:otherwise>
|
||||||
|
-->
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::appendix">auto</xsl:when>
|
||||||
|
<!-- Modified by Bruce Dubbs. Allow user to specify
|
||||||
|
automatic screen formatting to split across pages. -->
|
||||||
|
<xsl:when test="@role='auto'">auto</xsl:when>
|
||||||
|
<xsl:otherwise>always</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:otherwise>
|
||||||
|
<!-- End of modification -->
|
||||||
|
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
|
||||||
|
<!-- The following lines were inserted by Martin Miehe. Scripts and rules
|
||||||
|
in the appendices should have a smaller font-size so that at least
|
||||||
|
80 characters fit to one line. -->
|
||||||
|
|
||||||
|
<xsl:if test="ancestor::appendix"> <!-- name(/) != appendix" -->
|
||||||
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- End of insertion. -->
|
||||||
|
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- literal:
|
||||||
|
Be sure that literal will use allways normal font weight. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/inline.xsl -->
|
||||||
|
<xsl:template match="literal">
|
||||||
|
<fo:inline font-weight="normal">
|
||||||
|
<xsl:call-template name="inline.monoseq"/>
|
||||||
|
</fo:inline>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- inline.monoseq:
|
||||||
|
Added hyphenate-url support to classname, exceptionname, interfacename,
|
||||||
|
methodname, computeroutput, constant, envar, filename, function, code,
|
||||||
|
literal, option, promt, systemitem, varname, sgmltag, tag, and uri -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/inline.xsl -->
|
||||||
|
<xsl:template name="inline.monoseq">
|
||||||
|
<xsl:param name="content">
|
||||||
|
<xsl:call-template name="simple.xlink">
|
||||||
|
<xsl:with-param name="content">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::para and not(ancestor::screen)
|
||||||
|
and not(descendant::ulink)">
|
||||||
|
<xsl:call-template name="hyphenate-url">
|
||||||
|
<xsl:with-param name="url">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<!-- inline.italicmonoseq:
|
||||||
|
Added hyphenate-url support to parameter, replaceable, structfield,
|
||||||
|
function/parameter, and function/replaceable -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/inline.xsl -->
|
||||||
|
<xsl:template name="inline.italicmonoseq">
|
||||||
|
<xsl:param name="content">
|
||||||
|
<xsl:call-template name="simple.xlink">
|
||||||
|
<xsl:with-param name="content">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::para and not(ancestor::screen)
|
||||||
|
and not(descendant::ulink)">
|
||||||
|
<xsl:call-template name="hyphenate-url">
|
||||||
|
<xsl:with-param name="url">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<!-- Show external URLs in italic font -->
|
||||||
|
<xsl:attribute-set name="xref.properties">
|
||||||
|
<xsl:attribute name="font-style">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="self::ulink">italic</xsl:when>
|
||||||
|
<xsl:otherwise>inherit</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Center table title. -->
|
||||||
|
<xsl:attribute-set name="formal.title.properties">
|
||||||
|
<xsl:attribute name="text-align">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name(.) = 'table'">center</xsl:when>
|
||||||
|
<xsl:otherwise>left</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- table.layout:
|
||||||
|
We want all tables centered. Based on a hack posted
|
||||||
|
by Ellen Juhlin on docbook-apps mailing list. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/table.xsl -->
|
||||||
|
<xsl:template name="table.layout">
|
||||||
|
<xsl:param name="table.content" select="NOTANODE"/>
|
||||||
|
<fo:table table-layout="fixed" width="100%">
|
||||||
|
<fo:table-column column-width ="proportional-column-width(1)"/>
|
||||||
|
<fo:table-column>
|
||||||
|
<!-- Set center column width equal to table width -->
|
||||||
|
<xsl:attribute name="column-width">
|
||||||
|
<xsl:call-template name="table.width"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</fo:table-column>
|
||||||
|
<fo:table-column column-width ="proportional-column-width(1)"/>
|
||||||
|
<fo:table-body>
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell column-number="2">
|
||||||
|
<xsl:copy-of select="$table.content"/>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
</fo:table-body>
|
||||||
|
</fo:table>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Revision History -->
|
||||||
|
|
||||||
|
<!-- revhistory titlepage:
|
||||||
|
Self-made template to add missing support on bookinfo. -->
|
||||||
|
<xsl:template match="revhistory" mode="book.titlepage.verso.auto.mode">
|
||||||
|
<fo:block space-before.optimum="2em"
|
||||||
|
space-before.minimum="1.5em"
|
||||||
|
space-before.maximum="2.5em">
|
||||||
|
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- revhitory title properties -->
|
||||||
|
<xsl:attribute-set name="revhistory.title.properties">
|
||||||
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||||
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- revhistory/revision mode titlepage.mode:
|
||||||
|
Removed authorinitials | author support placing
|
||||||
|
revremark | revdescription instead on that table-cell. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/titlepage.xsl -->
|
||||||
|
<xsl:template match="revhistory/revision" mode="titlepage.mode">
|
||||||
|
<xsl:variable name="revnumber" select="revnumber"/>
|
||||||
|
<xsl:variable name="revdate" select="date"/>
|
||||||
|
<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]"/>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell 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:template>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Dummy sect1 -->
|
||||||
|
|
||||||
|
<!-- sect1:
|
||||||
|
Self-made template to skip dummy sect1 pages generation. -->
|
||||||
|
<xsl:template match="sect1">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role = 'dummy'"/>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect1 mode fop1.outline:
|
||||||
|
Self-made template to skip dummy sect1 bookmarks generation. -->
|
||||||
|
<xsl:template match="sect1" mode="fop1.outline">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role = 'dummy'"/>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- toc.line:
|
||||||
|
For dummy sect1 output only the title. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/autotoc.xsl -->
|
||||||
|
<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>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role = 'dummy'">
|
||||||
|
<fo:block text-align="left">
|
||||||
|
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<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:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
244
stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl
Normal file
244
stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl
Normal file
@ -0,0 +1,244 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls page margins, sections page break,
|
||||||
|
header content and titles size. -->
|
||||||
|
|
||||||
|
<!-- The inner page margin. -->
|
||||||
|
<xsl:param name="page.margin.inner" select="'0.32in'"/>
|
||||||
|
|
||||||
|
<!-- The outer page margin. -->
|
||||||
|
<xsl:param name="page.margin.outer" select="'0.32in'"/>
|
||||||
|
|
||||||
|
<!-- The bottom margin of the page. -->
|
||||||
|
<xsl:param name="page.margin.bottom" select="'0.35in'"/>
|
||||||
|
|
||||||
|
<!-- The top margin of the page. -->
|
||||||
|
<xsl:param name="page.margin.top" select="'0.35in'"/>
|
||||||
|
|
||||||
|
<!-- The bottom margin of the body text. -->
|
||||||
|
<xsl:param name="body.margin.bottom" select="'0.4in'"/>
|
||||||
|
|
||||||
|
<!-- The top margin of the body text. -->
|
||||||
|
<xsl:param name="body.margin.top" select="'0.4in'"/>
|
||||||
|
|
||||||
|
<!-- Specifies the height of the header. -->
|
||||||
|
<xsl:param name="region.before.extent" select="'0.25in'"/>
|
||||||
|
|
||||||
|
<!-- Specifies the height of the footer. -->
|
||||||
|
<xsl:param name="region.after.extent" select="'0.25in'"/>
|
||||||
|
|
||||||
|
<!-- The start-indent for the body text. -->
|
||||||
|
<xsl:param name="body.start.indent" select="'0pc'"/>
|
||||||
|
|
||||||
|
<!-- Adjust the left margin for titles. -->
|
||||||
|
<xsl:param name="title.margin.left">-0.8pc</xsl:param>
|
||||||
|
|
||||||
|
<!-- Default table width on tables that do not specify an alternate
|
||||||
|
width using the dbfo processing instruction.
|
||||||
|
This value is used also on bookinfo/revhistory table. -->
|
||||||
|
<xsl:param name="default.table.width" select="'70%'"/>
|
||||||
|
|
||||||
|
<!-- Properties for component titles -->
|
||||||
|
<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)
|
||||||
|
or self::index">center</xsl:when>
|
||||||
|
<xsl:otherwise>left</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="start-indent">
|
||||||
|
<xsl:value-of select="$title.margin.left"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- Rule under headers? 1 =yes, 0 = no -->
|
||||||
|
<xsl:param name="header.rule" select="0"/>
|
||||||
|
|
||||||
|
<!-- Rule over footers? 1 =yes, 0 = no -->
|
||||||
|
<xsl:param name="footer.rule" select="0"></xsl:param>
|
||||||
|
|
||||||
|
<!-- Control depth of sections shown in running headers or footers.
|
||||||
|
Be sure that no unneeded fo:marker are generated. -->
|
||||||
|
<xsl:param name="marker.section.level" select="-1"></xsl:param>
|
||||||
|
|
||||||
|
<!-- Force package's sect1 onto a new page -->
|
||||||
|
<xsl:attribute-set name="section.level1.properties">
|
||||||
|
<xsl:attribute name="break-before">
|
||||||
|
<xsl:choose>
|
||||||
|
<!--<xsl:when test="not(. = //*/sect1[1])">
|
||||||
|
<xsl:text>page</xsl:text>
|
||||||
|
</xsl:when>-->
|
||||||
|
<xsl:when test="preceding-sibling::sect1[position()=1]/sect2/@role='package'
|
||||||
|
or self::sect1/sect2/@role='package'">page</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>auto</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:attribute-set>
|
||||||
|
|
||||||
|
<!-- part/partintro:
|
||||||
|
Be sure that partintro is on a new page. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/divisions.xsl -->
|
||||||
|
<xsl:template match="part/partintro">
|
||||||
|
<xsl:apply-templates select=".." mode="part.titlepage.mode">
|
||||||
|
<xsl:with-param name="additional.content">
|
||||||
|
<fo:block break-before="page"/>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- book title:
|
||||||
|
Centered the title and removed unused code.
|
||||||
|
Removed book.titlepage.separator. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="book.titlepage">
|
||||||
|
<fo:block margin-top="3in">
|
||||||
|
<fo:block>
|
||||||
|
<xsl:call-template name="book.titlepage.before.recto"/>
|
||||||
|
<xsl:call-template name="book.titlepage.recto"/>
|
||||||
|
</fo:block>
|
||||||
|
<fo:block>
|
||||||
|
<xsl:call-template name="book.titlepage.before.verso"/>
|
||||||
|
<xsl:call-template name="book.titlepage.verso"/>
|
||||||
|
</fo:block>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- book titlepage verso:
|
||||||
|
Added missing bibliosource and revhistory support.
|
||||||
|
Removed unused code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="book.titlepage.verso">
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/bibliosource"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/revhistory"/>
|
||||||
|
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- bibliosource:
|
||||||
|
Self-made template to handle bibliosource when inside bookinfo. -->
|
||||||
|
<xsl:template match="bibliosource" mode="book.titlepage.verso.auto.mode">
|
||||||
|
<fo:block font-size="8pt">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- part title:
|
||||||
|
Centered the title and removed unused code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="part.titlepage">
|
||||||
|
<fo:block>
|
||||||
|
<fo:block margin-top="3.5in">
|
||||||
|
<xsl:call-template name="part.titlepage.before.recto"/>
|
||||||
|
<xsl:call-template name="part.titlepage.recto"/>
|
||||||
|
</fo:block>
|
||||||
|
<fo:block>
|
||||||
|
<xsl:call-template name="part.titlepage.before.verso"/>
|
||||||
|
<xsl:call-template name="part.titlepage.verso"/>
|
||||||
|
</fo:block>
|
||||||
|
<xsl:call-template name="part.titlepage.separator"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- chapter title:
|
||||||
|
Small font size and left alignament. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
|
||||||
|
<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
|
||||||
|
<fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style"
|
||||||
|
font-size="21pt" font-weight="bold" text-align="left">
|
||||||
|
<xsl:call-template name="component.title">
|
||||||
|
<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect2 title:
|
||||||
|
Skip sect2.titlepage run when title is empty.
|
||||||
|
Removed unused code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/sections.xsl -->
|
||||||
|
<xsl:template match="sect2">
|
||||||
|
<xsl:variable name="id">
|
||||||
|
<xsl:call-template name="object.id"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<fo:block xsl:use-attribute-sets="section.level2.properties">
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:value-of select="$id"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:if test="not(string-length(title)=0)">
|
||||||
|
<xsl:call-template name="sect2.titlepage"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- header.table:
|
||||||
|
Re-made template to not generate a fo:table in the header,
|
||||||
|
allowing a more simple header.content customization. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/pagesetup.xsl -->
|
||||||
|
<xsl:template name="header.table">
|
||||||
|
<xsl:param name="sequence" select="''"/>
|
||||||
|
<xsl:param name="gentext-key" select="''"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="header.content">
|
||||||
|
<xsl:with-param name="sequence" select="$sequence"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- header.content
|
||||||
|
Re-made template to show the book title and version on all pages. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/pagesetup.xsl -->
|
||||||
|
<xsl:template name="header.content">
|
||||||
|
<xsl:param name="sequence" select="''"/>
|
||||||
|
<fo:block>
|
||||||
|
<xsl:attribute name="text-align">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
|
||||||
|
<xsl:otherwise>left</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="/book/bookinfo/title"/>
|
||||||
|
<xsl:text> - </xsl:text>
|
||||||
|
<xsl:value-of select="/book/bookinfo/subtitle"/>
|
||||||
|
</fo:block>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
164
stylesheets/lfs-xsl/pdf/lfs-xref.xsl
Normal file
164
stylesheets/lfs-xsl/pdf/lfs-xref.xsl
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||||
|
exclude-result-prefixes="xlink"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- This stylesheet fixes English punctuation in xref links
|
||||||
|
(as was requested by the publisher) via adding @role propagation
|
||||||
|
in xref tags.
|
||||||
|
This hack may not work with xref flavours not used in the book.
|
||||||
|
For other languages, just remove the xref @role attributes
|
||||||
|
in the book XML sources and/or comment-out the inclusion of
|
||||||
|
this file in lfs-pdf.xsl -->
|
||||||
|
|
||||||
|
<!-- xref:
|
||||||
|
Added role variable and use it when calling mode xref-to.-->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/xref.xsl -->
|
||||||
|
<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)"/>
|
||||||
|
<!-- Added role variable -->
|
||||||
|
<xsl:variable name="role" select="@role"/>
|
||||||
|
<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"/>
|
||||||
|
<!-- Propagate role -->
|
||||||
|
<xsl:with-param name="role" select="$role"/>
|
||||||
|
</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'">
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- sect* mode xref-to:
|
||||||
|
Propagate role to mode object.xref.markup (see ../lfs-common.xsl) -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/xref.xsl -->
|
||||||
|
<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:param name="role"/>
|
||||||
|
<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:with-param name="role" select="$role"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- insert.title.markup:
|
||||||
|
Apply the role value. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/fo/xref.xsl -->
|
||||||
|
<xsl:template match="*" mode="insert.title.markup">
|
||||||
|
<xsl:param name="purpose"/>
|
||||||
|
<xsl:param name="xrefstyle"/>
|
||||||
|
<xsl:param name="title"/>
|
||||||
|
<xsl:param name="role"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$purpose = 'xref' and titleabbrev">
|
||||||
|
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="$title"/>
|
||||||
|
<xsl:value-of select="$role"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
50
stylesheets/lfs-xsl/profile.xsl
Normal file
50
stylesheets/lfs-xsl/profile.xsl
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Stylesheet to create profiled XML output.
|
||||||
|
Replaces {docbook-xsl}/profiling/profile.xsl -->
|
||||||
|
|
||||||
|
<!-- Include common profiling stylesheet -->
|
||||||
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/profiling/profile-mode.xsl"/>
|
||||||
|
|
||||||
|
<!-- This file must be included, because profile-mode uses
|
||||||
|
templates from it -->
|
||||||
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/common/stripns.xsl"/>
|
||||||
|
|
||||||
|
<!-- In two pass processing there is no need for the base URI fixup -->
|
||||||
|
<xsl:param name="profile.baseuri.fixup" select="false()"/>
|
||||||
|
|
||||||
|
<!-- Generate DocBook instance with correct DOCTYPE -->
|
||||||
|
<xsl:output method="xml"
|
||||||
|
doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
|
||||||
|
doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
|
||||||
|
|
||||||
|
<!-- Profiling parameters:
|
||||||
|
profile.separator changed from ";" to "," to let it work on the command
|
||||||
|
line. -->
|
||||||
|
<xsl:param name="profile.arch" select="''"/>
|
||||||
|
<xsl:param name="profile.audience" select="''"/>
|
||||||
|
<xsl:param name="profile.condition" select="''"/>
|
||||||
|
<xsl:param name="profile.conformance" select="''"/>
|
||||||
|
<xsl:param name="profile.lang" select="''"/>
|
||||||
|
<xsl:param name="profile.os" select="''"/>
|
||||||
|
<xsl:param name="profile.revision" select="''"/>
|
||||||
|
<xsl:param name="profile.revisionflag" select="''"/>
|
||||||
|
<xsl:param name="profile.role" select="''"/>
|
||||||
|
<xsl:param name="profile.security" select="''"/>
|
||||||
|
<xsl:param name="profile.status" select="''"/>
|
||||||
|
<xsl:param name="profile.userlevel" select="''"/>
|
||||||
|
<xsl:param name="profile.vendor" select="''"/>
|
||||||
|
<xsl:param name="profile.wordsize" select="''"/>
|
||||||
|
<xsl:param name="profile.attribute" select="''"/>
|
||||||
|
<xsl:param name="profile.value" select="''"/>
|
||||||
|
<xsl:param name="profile.separator" select="','"/>
|
||||||
|
|
||||||
|
<!-- Call common profiling mode -->
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates select="." mode="profile"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
54
stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
Normal file
54
stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how admonitions are displayed -->
|
||||||
|
|
||||||
|
<!-- Use graphics in admonitions? 1 = yes, 0 = no -->
|
||||||
|
<xsl:param name="admon.graphics" select="1"/>
|
||||||
|
|
||||||
|
<!-- Relative path to images directory. We set here relative path
|
||||||
|
from sub-dirs HTML files. The path from top-level HTML files (index.html,
|
||||||
|
partX.html, etc) MUST be fixed via a sed in the Makefile. -->
|
||||||
|
<xsl:param name="admon.graphics.path">../images/</xsl:param>
|
||||||
|
|
||||||
|
<!-- The images files extension -->
|
||||||
|
<xsl:param name="admon.graphics.extension" select="'.png'"/>
|
||||||
|
|
||||||
|
<!-- Changing the output tagging:
|
||||||
|
Removed $admon.style support
|
||||||
|
Hardcoded $admon.textlabel feature
|
||||||
|
Changed the output format from table to nested divs -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
|
||||||
|
<xsl:template name="graphical.admonition">
|
||||||
|
<xsl:variable name="admon.type">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name(.)='note'">Note</xsl:when>
|
||||||
|
<xsl:when test="local-name(.)='warning'">Warning</xsl:when>
|
||||||
|
<xsl:when test="local-name(.)='caution'">Caution</xsl:when>
|
||||||
|
<xsl:when test="local-name(.)='tip'">Tip</xsl:when>
|
||||||
|
<xsl:when test="local-name(.)='important'">Important</xsl:when>
|
||||||
|
<xsl:otherwise>Note</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="alt">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key" select="$admon.type"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<div class="admon {name(.)}">
|
||||||
|
<img alt="[{$alt}]">
|
||||||
|
<xsl:attribute name="src">
|
||||||
|
<xsl:call-template name="admon.graphic"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</img>
|
||||||
|
<h3>
|
||||||
|
<xsl:apply-templates select="." mode="object.title.markup"/>
|
||||||
|
</h3>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
247
stylesheets/lfs-xsl/xhtml/lfs-index.xsl
Normal file
247
stylesheets/lfs-xsl/xhtml/lfs-index.xsl
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
|
||||||
|
<!DOCTYPE xsl:stylesheet [
|
||||||
|
<!ENTITY lowercase "'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ'">
|
||||||
|
<!ENTITY uppercase "'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'">
|
||||||
|
<!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 scope "count(ancestor::node()|$scope) = count(ancestor::node())">
|
||||||
|
<!ENTITY section "(ancestor-or-self::set |ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::reference |ancestor-or-self::partintro |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::article |ancestor-or-self::section |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::refentry |ancestor-or-self::refsect1 |ancestor-or-self::refsect2 |ancestor-or-self::refsect3 |ancestor-or-self::simplesect |ancestor-or-self::bibliography |ancestor-or-self::glossary |ancestor-or-self::index |ancestor-or-self::webpage)[last()]">
|
||||||
|
<!ENTITY section.id "generate-id(§ion;)">
|
||||||
|
<!ENTITY sep '" "'>
|
||||||
|
]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Change the file name of the index page from the default ix01.html.
|
||||||
|
There is no upstream template with match="index", only a global
|
||||||
|
match="*", thus the following is enough to override the index
|
||||||
|
filename. -->
|
||||||
|
|
||||||
|
<xsl:template match="index" mode="recursive-chunk-filename">
|
||||||
|
<xsl:text>longindex.html</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Divisions:
|
||||||
|
Override the default division titles, translating them from the default
|
||||||
|
'A', 'B', etc. to 'Packages', 'Programs', etc.
|
||||||
|
Add gentext support to division titles.
|
||||||
|
Use h2 for division titles instead of the default h3.
|
||||||
|
Change main listings from dl to ul format.
|
||||||
|
The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
|
||||||
|
|
||||||
|
<xsl:template match="indexterm" mode="index-div-basic">
|
||||||
|
<xsl:param name="scope" select="."/>
|
||||||
|
<xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
|
||||||
|
<xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
|
||||||
|
<!-- Make sure that we don't generate a div if there are no terms in scope
|
||||||
|
-->
|
||||||
|
<xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
|
||||||
|
<xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
|
||||||
|
<h2>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$divtitle = 'A'">
|
||||||
|
<a id="package-index" name="package-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Packages</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'B'">
|
||||||
|
<a id="program-index" name="program-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Programs</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'C'">
|
||||||
|
<a id="library-index" name="library-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Libraries</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'D'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$book-type = 'blfs'">
|
||||||
|
<a id="kernel-config-index" name="kernel-config-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Kernel Configuration</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<a id="scripts-index" name="scripts-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Scripts</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'E'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$book-type = 'blfs'">
|
||||||
|
<a id="config-file-index" name="config-file-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Configuration Files</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<a id="other-index" name="other-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Others</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'F'">
|
||||||
|
<a id="bootscript-index" name="bootscript-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Bootscripts</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$divtitle = 'G'">
|
||||||
|
<a id="other-index" name="other-index"/>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Others</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$divtitle"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</h2>
|
||||||
|
</xsl:if>
|
||||||
|
<ul>
|
||||||
|
<xsl:apply-templates select="key('letter', $key)[count(ancestor::node()|$scope) = count(ancestor::node())][count(.|key('primary', normalize-space(concat(primary/@sortas, " ", primary)))[count(ancestor::node()|$scope) = count(ancestor::node())][1])=1]" mode="index-primary">
|
||||||
|
<xsl:with-param name="scope" select="$scope"/>
|
||||||
|
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</ul>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Primary items:
|
||||||
|
Place term and separator into strong tags.
|
||||||
|
Place target links into a div.
|
||||||
|
Change main listings from dl to ul format.
|
||||||
|
Removed code for unused see and sealso children.
|
||||||
|
The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
|
||||||
|
<xsl:template match="indexterm" mode="index-primary">
|
||||||
|
<xsl:param name="scope" select="."/>
|
||||||
|
<xsl:variable name="key" select="normalize-space(concat(primary/@sortas, " ", primary))"/>
|
||||||
|
<xsl:variable name="refs" select="key('primary', $key)[count(ancestor::node()|$scope) = count(ancestor::node())]"/>
|
||||||
|
<li>
|
||||||
|
<strong class="item">
|
||||||
|
<xsl:value-of select="primary"/>
|
||||||
|
<xsl:text>: </xsl:text>
|
||||||
|
</strong>
|
||||||
|
<span class='indexref'>
|
||||||
|
<xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',concat($key, &sep;, §ion.id;))[&scope;][1])]">
|
||||||
|
<!--<xsl:for-each select="$refs[not(see) and not(secondary)][count(ancestor::node()|$scope) = count(ancestor::node()) = 0]">-->
|
||||||
|
<xsl:apply-templates select="." mode="reference">
|
||||||
|
<xsl:with-param name="scope" select="$scope"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:for-each>
|
||||||
|
</span>
|
||||||
|
<xsl:if test="$refs/secondary">
|
||||||
|
<ul>
|
||||||
|
<xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, " ", normalize-space(concat(secondary/@sortas, " ", secondary))))[count(ancestor::node()|$scope) = count(ancestor::node()) ][1]) = 1]" mode="index-secondary">
|
||||||
|
<xsl:with-param name="scope" select="$scope"/>
|
||||||
|
<xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</ul>
|
||||||
|
</xsl:if>
|
||||||
|
</li>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Secondary items:
|
||||||
|
Place term and separator into strong tags.
|
||||||
|
Place target links into a div.
|
||||||
|
Change main listings from dl to ul format.
|
||||||
|
Removed code for unused tertiary, see and sealso children.
|
||||||
|
The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
|
||||||
|
<xsl:template match="indexterm" mode="index-secondary">
|
||||||
|
<xsl:param name="scope" select="."/>
|
||||||
|
<xsl:variable name="key" select="concat(normalize-space(concat(primary/@sortas, " ", primary)), " ", normalize-space(concat(secondary/@sortas, " ", secondary)))"/>
|
||||||
|
<xsl:variable name="refs" select="key('secondary', $key)[count(ancestor::node()|$scope) = count(ancestor::node())]"/>
|
||||||
|
<li>
|
||||||
|
<strong class="secitem">
|
||||||
|
<xsl:value-of select="secondary"/>
|
||||||
|
<xsl:text>: </xsl:text>
|
||||||
|
</strong>
|
||||||
|
<span class='indexref'>
|
||||||
|
<xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
|
||||||
|
<xsl:apply-templates select="." mode="reference">
|
||||||
|
<xsl:with-param name="scope" select="$scope"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:for-each>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Drop $term.separator and $number.separator from here as customized ones
|
||||||
|
are added in the output flow.
|
||||||
|
As all the indexterms in the book have @zone attributes, removed a lot of
|
||||||
|
unused code.
|
||||||
|
The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
|
||||||
|
<xsl:template match="indexterm" mode="reference">
|
||||||
|
<xsl:param name="scope" select="."/>
|
||||||
|
<xsl:call-template name="reference">
|
||||||
|
<xsl:with-param name="zones" select="normalize-space(@zone)"/>
|
||||||
|
<xsl:with-param name="scope" select="$scope"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- The target links:
|
||||||
|
Changed link separator
|
||||||
|
On the second @zone link, we use a fixed string for the text with gentext
|
||||||
|
support.
|
||||||
|
Assume that there are no more than 2 @zone in a indexterm.
|
||||||
|
Use href.target.uri named template to resolve the links. It is faster
|
||||||
|
than the default href.target named template.
|
||||||
|
The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
|
||||||
|
<xsl:template name="reference">
|
||||||
|
<xsl:param name="scope" select="."/>
|
||||||
|
<xsl:param name="zones"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($zones, ' ')">
|
||||||
|
<xsl:variable name="zone" select="substring-before($zones, ' ')"/>
|
||||||
|
<xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
|
||||||
|
<xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
|
||||||
|
<xsl:variable name="target2" select="key('sections', $zone2)[&scope;]"/>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target.uri">
|
||||||
|
<xsl:with-param name="object" select="$target[1]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:apply-templates select="$target[1]" mode="index-title-content"/>
|
||||||
|
</a>
|
||||||
|
<xsl:text> -- </xsl:text>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target.uri">
|
||||||
|
<xsl:with-param name="object" select="$target2[1]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">description</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<br/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:variable name="zone" select="$zones"/>
|
||||||
|
<xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target.uri">
|
||||||
|
<xsl:with-param name="object" select="$target[1]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:apply-templates select="$target[1]" mode="index-title-content"/>
|
||||||
|
</a>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
77
stylesheets/lfs-xsl/xhtml/lfs-legalnotice.xsl
Normal file
77
stylesheets/lfs-xsl/xhtml/lfs-legalnotice.xsl
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how legalnotice page is created -->
|
||||||
|
|
||||||
|
<!-- Generating the legalnotice page:
|
||||||
|
We are forcing separate legalnotice page generation.
|
||||||
|
Removed the default link to legalnotice page. We want it in Copyright.
|
||||||
|
Added footer navigational link to Home. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
|
||||||
|
<xsl:template match="legalnotice" mode="titlepage.mode">
|
||||||
|
<xsl:variable name="id">
|
||||||
|
<xsl:call-template name="object.id"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="filename" select="concat($base.dir, 'legalnotice.html')"/>
|
||||||
|
<xsl:call-template name="write.chunk">
|
||||||
|
<xsl:with-param name="filename" select="$filename"/>
|
||||||
|
<xsl:with-param name="quiet" select="$chunk.quietly"/>
|
||||||
|
<xsl:with-param name="content">
|
||||||
|
<html>
|
||||||
|
<xsl:call-template name="html.head"/>
|
||||||
|
<body>
|
||||||
|
<xsl:call-template name="body.attributes"/>
|
||||||
|
<div class="{local-name(.)}">
|
||||||
|
<xsl:apply-templates mode="titlepage.mode"/>
|
||||||
|
</div>
|
||||||
|
<div class="navfooter">
|
||||||
|
<ul class="footerlinks">
|
||||||
|
<li class="home">
|
||||||
|
<a accesskey="h" href="index.html">
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="/book/bookinfo/title"/>
|
||||||
|
<xsl:text> - </xsl:text>
|
||||||
|
<xsl:value-of select="/book/bookinfo/subtitle"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'home'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Making the legalnotice link:
|
||||||
|
We make the "Copyright" word a link to legalnotice page. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
|
||||||
|
<xsl:template match="copyright" mode="titlepage.mode">
|
||||||
|
<p class="{name(.)}">
|
||||||
|
<a href="legalnotice.html">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key" select="'Copyright'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<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"/>
|
||||||
|
</p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
307
stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl
Normal file
307
stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl
Normal file
@ -0,0 +1,307 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet contains misc templates for output formating.
|
||||||
|
This file is for that templates that don't fit in other files
|
||||||
|
and that not afect the chunk algorithm. -->
|
||||||
|
|
||||||
|
<!-- Individual elements templates -->
|
||||||
|
|
||||||
|
<!-- para:
|
||||||
|
Added a choose to skip empty "Home page" in packages.xml.
|
||||||
|
Added an if for HLFS features. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/block.xsl -->
|
||||||
|
<xsl:template match="para">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="child::ulink[@url=' ']"/>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="paragraph">
|
||||||
|
<xsl:with-param name="class">
|
||||||
|
<xsl:if test="@role">
|
||||||
|
<xsl:if test="$book-type = 'hlfs'">
|
||||||
|
<xsl:if test="contains($hlfs-features,concat(',',@role,','))">
|
||||||
|
<xsl:text>feature-</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="@role"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="content">
|
||||||
|
<xsl:if test="position() = 1 and parent::listitem">
|
||||||
|
<xsl:call-template name="anchor">
|
||||||
|
<xsl:with-param name="node" select="parent::listitem"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- screen:
|
||||||
|
Changed class attribute asignament to fit our look needs.
|
||||||
|
Removed unused line numbering support. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/verbatim.xsl
|
||||||
|
It match also programlisting and synopsis. The code for that tags
|
||||||
|
is unchanged. -->
|
||||||
|
<xsl:template match="screen">
|
||||||
|
<pre>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role and not(@role = 'nodump')">
|
||||||
|
<xsl:if test="$book-type = 'hlfs'">
|
||||||
|
<xsl:if test="contains($hlfs-features,concat(',',@role,','))">
|
||||||
|
<xsl:text>feature-</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="@role"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="child::* = userinput">userinput</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="name(.)"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</pre>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- userinput:
|
||||||
|
Using a customized output when inside screen.
|
||||||
|
In other cases, use the original template. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/inline.xsl -->
|
||||||
|
<xsl:template match="userinput">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="ancestor::screen">
|
||||||
|
<kbd class="command">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</kbd>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- itemizadlist:
|
||||||
|
@compact is not allowed in XHTML 1.0 Strict DTD. Changing it
|
||||||
|
to @class. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
|
||||||
|
<xsl:template match="itemizedlist">
|
||||||
|
<div>
|
||||||
|
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:if test="title">
|
||||||
|
<xsl:call-template name="formal.object.heading"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates select="*[not(self::listitem or self::title
|
||||||
|
or self::titleabbrev)]
|
||||||
|
|comment()[not(preceding-sibling::listitem)]
|
||||||
|
|processing-instruction()[not(preceding-sibling::listitem)]"/>
|
||||||
|
<ul>
|
||||||
|
<xsl:if test="@spacing='compact'">
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:value-of select="@spacing"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem]
|
||||||
|
|processing-instruction()[preceding-sibling::listitem]"/>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- orderedlist:
|
||||||
|
@start, @type, and @compact sre not allowed in XHTML 1.0 Strict DTD.
|
||||||
|
@start and @type can be replaced by CSS code.
|
||||||
|
Changing @compact to @class. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
|
||||||
|
<xsl:template match="orderedlist">
|
||||||
|
<div>
|
||||||
|
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:if test="title">
|
||||||
|
<xsl:call-template name="formal.object.heading"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates select="*[not(self::listitem or self::title
|
||||||
|
or self::titleabbrev)]
|
||||||
|
|comment()[not(preceding-sibling::listitem)]
|
||||||
|
|processing-instruction()[not(preceding-sibling::listitem)]"/>
|
||||||
|
<ol>
|
||||||
|
<xsl:if test="@spacing='compact'">
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:value-of select="@spacing"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem]
|
||||||
|
|processing-instruction()[preceding-sibling::listitem]"/>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- seg in segementedlist:
|
||||||
|
Added a span around seg text to can match it with CSS code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
|
||||||
|
<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 -->
|
||||||
|
<div class="seg">
|
||||||
|
<strong class="segtitle">
|
||||||
|
<xsl:apply-templates select="$segtitles[$segnum=position()]"
|
||||||
|
mode="segtitle-in-seg"/>
|
||||||
|
<xsl:text>: </xsl:text>
|
||||||
|
</strong>
|
||||||
|
<span class="segbody">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- variablelist:
|
||||||
|
If it have a role attribute, wrap the default output into a div with
|
||||||
|
a class attribute matching that role attribute.
|
||||||
|
Apply the original template in all cases. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
|
||||||
|
<xsl:template match="variablelist">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role">
|
||||||
|
<div class="{@role}">
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</div>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-imports/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- para/simplelist:
|
||||||
|
Self-made template. Add a line break and process the childs.
|
||||||
|
If @type is specified, the original templates should be used,
|
||||||
|
but not tested. -->
|
||||||
|
<xsl:template match="para/simplelist">
|
||||||
|
<br/>
|
||||||
|
<xsl:apply-templates mode="condensed"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- member:
|
||||||
|
Self-made template to process it and add a line break. -->
|
||||||
|
<xsl:template match="member" mode="condensed">
|
||||||
|
<xsl:call-template name="anchor"/>
|
||||||
|
<xsl:call-template name="simple.xlink">
|
||||||
|
<xsl:with-param name="content">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
<br/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Named formating templates -->
|
||||||
|
|
||||||
|
<!-- Body attributes:
|
||||||
|
Add to the body XHTML output tag a class attribute with the book type
|
||||||
|
and a id attribute with the book type and version. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
|
||||||
|
<xsl:template name="body.attributes">
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:value-of select="$book-type"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:value-of select="$book-type"/>
|
||||||
|
<xsl:text>-</xsl:text>
|
||||||
|
<xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Revision History -->
|
||||||
|
|
||||||
|
<!-- revhistory mode titlepage.mode:
|
||||||
|
Removed hardcoded style attributes.
|
||||||
|
Removed support for separate revhistory file. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
|
||||||
|
<xsl:template match="revhistory" mode="titlepage.mode">
|
||||||
|
<xsl:variable name="numcols">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="//authorinitials">4</xsl:when>
|
||||||
|
<xsl:otherwise>3</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="title">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">RevHistory</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="contents">
|
||||||
|
<table summary="{$title}" class="{name(.)}">
|
||||||
|
<tr>
|
||||||
|
<th colspan="{$numcols}">
|
||||||
|
<b>
|
||||||
|
<xsl:value-of select="$title"/>
|
||||||
|
</b>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<xsl:apply-templates mode="titlepage.mode">
|
||||||
|
<xsl:with-param name="numcols" select="$numcols"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</table>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:copy-of select="$contents"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- revhistory/revision mode titlepage.mode:
|
||||||
|
Removed hardcoded style attributes. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
|
||||||
|
<xsl:template match="revhistory/revision" mode="titlepage.mode">
|
||||||
|
<xsl:param name="numcols" select="'3'"/>
|
||||||
|
<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"/>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<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>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
|
||||||
|
</td>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$revauthor">
|
||||||
|
<td>
|
||||||
|
<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>
|
||||||
|
</td>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$numcols > 3">
|
||||||
|
<td> </td>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise/>
|
||||||
|
</xsl:choose>
|
||||||
|
<td>
|
||||||
|
<xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
359
stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl
Normal file
359
stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl
Normal file
@ -0,0 +1,359 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how page header and navigational links
|
||||||
|
are generated. -->
|
||||||
|
|
||||||
|
<!-- html.head:
|
||||||
|
Drop all navigational links from inside head xhtml output. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/chunk-common.xsl -->
|
||||||
|
<xsl:template name="html.head">
|
||||||
|
<head>
|
||||||
|
<xsl:call-template name="system.head.content"/>
|
||||||
|
<xsl:call-template name="head.content"/>
|
||||||
|
<xsl:call-template name="user.head.content"/>
|
||||||
|
</head>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- header.navigation:
|
||||||
|
Self-made template that full replaces the original one -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/chunk-common.xsl -->
|
||||||
|
<xsl:template name="header.navigation">
|
||||||
|
<xsl:param name="prev" select="/foo"/>
|
||||||
|
<xsl:param name="next" select="/foo"/>
|
||||||
|
<xsl:variable name="up" select="parent::*"/>
|
||||||
|
<xsl:variable name="home" select="/*[1]"/>
|
||||||
|
<!-- Don't generate the header in index.html -->
|
||||||
|
<xsl:if test="$home != .">
|
||||||
|
<div class="navheader">
|
||||||
|
<!-- Book title and version -->
|
||||||
|
<h4>
|
||||||
|
<xsl:apply-templates select="$home" mode="object.title.markup"/>
|
||||||
|
<xsl:text> - </xsl:text>
|
||||||
|
<xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
|
||||||
|
</h4>
|
||||||
|
<!-- Except for preface, part, and index, add the title of the parent -->
|
||||||
|
<xsl:if test="$up != $home">
|
||||||
|
<h3>
|
||||||
|
<xsl:apply-templates select="$up" mode="object.title.markup"/>
|
||||||
|
</h3>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- Create header navigational links -->
|
||||||
|
<xsl:call-template name="navigational.links">
|
||||||
|
<xsl:with-param name="prev" select="$prev"/>
|
||||||
|
<xsl:with-param name="next" select="$next"/>
|
||||||
|
<xsl:with-param name="up" select="$up"/>
|
||||||
|
<xsl:with-param name="home" select="$home"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- footer.navigation:
|
||||||
|
Self-made template that full replaces the original one -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/chunk-common.xsl -->
|
||||||
|
<xsl:template name="footer.navigation">
|
||||||
|
<xsl:param name="prev" select="/foo"/>
|
||||||
|
<xsl:param name="next" select="/foo"/>
|
||||||
|
<xsl:variable name="up" select="parent::*"/>
|
||||||
|
<xsl:variable name="home" select="/*[1]"/>
|
||||||
|
<!-- Create footer navigational links -->
|
||||||
|
<div class="navfooter">
|
||||||
|
<xsl:call-template name="navigational.links">
|
||||||
|
<xsl:with-param name="prev" select="$prev"/>
|
||||||
|
<xsl:with-param name="next" select="$next"/>
|
||||||
|
<xsl:with-param name="up" select="$up"/>
|
||||||
|
<xsl:with-param name="home" select="$home"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</div>
|
||||||
|
<!-- In HLFS, add the features.js call -->
|
||||||
|
<xsl:if test="$book-type = 'hlfs'">
|
||||||
|
<script type="text/javascript">
|
||||||
|
<xsl:attribute name="src">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name(.)='book' or local-name(.)='part' or
|
||||||
|
local-name(.)='index'">../features.js</xsl:when>
|
||||||
|
<xsl:otherwise>../../features.js</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
</script>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- navigational.links:
|
||||||
|
Self-made template to generate navigational links.
|
||||||
|
Most of the code come from the original header.navigation and
|
||||||
|
footer.navigation templates, with this changes:
|
||||||
|
Changed the output format from table to ul.
|
||||||
|
Placed the same links on both header and footer.
|
||||||
|
Added a title attribute to the link containing the target title
|
||||||
|
(it content is displayed when placing the mouse over the link)
|
||||||
|
For "Prev" and "Next" links, added the target title under it.
|
||||||
|
When "Next" target is the Index, added gentext support for the
|
||||||
|
Index title.
|
||||||
|
Skip links to dummy sect1. -->
|
||||||
|
<xsl:template name="navigational.links">
|
||||||
|
<xsl:param name="prev"/>
|
||||||
|
<xsl:param name="next"/>
|
||||||
|
<xsl:param name="up"/>
|
||||||
|
<xsl:param name="home"/>
|
||||||
|
<ul>
|
||||||
|
<!-- No prev link when prev is home -->
|
||||||
|
<xsl:if test="count($prev)>0 and $prev != $home">
|
||||||
|
<li class="prev">
|
||||||
|
<xsl:choose>
|
||||||
|
|
||||||
|
<!-- If prev is a dummy sect1 that is the first one in a chapter,
|
||||||
|
links to the parent chapter.-->
|
||||||
|
<xsl:when test="$prev[@role='dummy'] and
|
||||||
|
count(preceding-sibling::sect1)=1">
|
||||||
|
<a accesskey="p">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select=".."/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="../title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'prev'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="../title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- If prev is a dummy sect1 that is not the first one in a chapter,
|
||||||
|
links to the previous sect1.-->
|
||||||
|
<xsl:when test="$prev[@role='dummy'] and
|
||||||
|
count(preceding-sibling::sect1)>1">
|
||||||
|
<a accesskey="p">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="preceding-sibling::sect1[position()=2]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'prev'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- Code for the "To Boot or To Chroot" CLFS links jumps. -->
|
||||||
|
<xsl:when test="$prev[@id='ch-chroot-devices'] or $prev[@id='ch-boot-whatnext']">
|
||||||
|
<a accesskey="p">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="//sect1[@id='ch-temp-system-choose']"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'prev'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- Normal prev links -->
|
||||||
|
<xsl:otherwise>
|
||||||
|
<a accesskey="p">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="$prev"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="$prev/title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'prev'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="$prev/title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</li>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Next link except in the last page and in the CLFS "choose" page -->
|
||||||
|
<xsl:if test="count($next)>0 and (not(@id) or @id!='ch-temp-system-choose')">
|
||||||
|
<li class="next">
|
||||||
|
<xsl:choose>
|
||||||
|
|
||||||
|
<!-- Current page is sect1 a next is a dummy sect1, link to the next one -->
|
||||||
|
<xsl:when test="$next[@role='dummy'] and local-name(.) = 'sect1'">
|
||||||
|
<a accesskey="n">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="following-sibling::sect1[position()=2]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'next'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- Current page is chapter and next is a dummy sect1, link to the next one -->
|
||||||
|
<xsl:when test="$next[@role='dummy'] and local-name(.) = 'chapter'">
|
||||||
|
<a accesskey="n">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="descendant::sect1[position()=2]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="descendant::sect1[position()=2]/title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'next'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="descendant::sect1[position()=2]/title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- Code for the "To Boot or To Chroot" CLFS links jumps. -->
|
||||||
|
<xsl:when test="$next[@id='chapter-chroot'] or $next[@id='chapter-boot']">
|
||||||
|
<a accesskey="n">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="//part[@id='part5']"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="//part[@id='part5']/title"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'next'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="//part[@id='part5']/title"/>
|
||||||
|
</p>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<!-- Normal next links. Take care of Index gentext support. -->
|
||||||
|
<xsl:otherwise>
|
||||||
|
<a accesskey="n">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="$next"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name($next)='index'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Index</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$next/title"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'next'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name($next)='index'">
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">Index</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$next/title"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</p>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</li>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="up">
|
||||||
|
<xsl:choose>
|
||||||
|
<!-- Up link except if up is home -->
|
||||||
|
<xsl:when test="count($up)>0 and $up != $home">
|
||||||
|
<a accesskey="u">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="$up"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:apply-templates select="$up" mode="object.title.markup"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'up'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- Hack to let the CSS code do its work when there is no up link -->
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>.</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="home">
|
||||||
|
<xsl:choose>
|
||||||
|
<!-- No home link in home page -->
|
||||||
|
<xsl:when test="$home != .">
|
||||||
|
<a accesskey="h">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="object" select="$home"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="$home/bookinfo/title"/>
|
||||||
|
<xsl:text> - </xsl:text>
|
||||||
|
<xsl:value-of select="$home/bookinfo/subtitle"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="navig.content">
|
||||||
|
<xsl:with-param name="direction" select="'home'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- Hack to let the CSS code do its work when there is no home link -->
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>.</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
161
stylesheets/lfs-xsl/xhtml/lfs-sections.xsl
Normal file
161
stylesheets/lfs-xsl/xhtml/lfs-sections.xsl
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how preface, chapter, and sections are handled -->
|
||||||
|
|
||||||
|
<!-- Chunk the first top-level section? 1 = yes, 0 = no
|
||||||
|
If preface and chapters TOC are generated, this must be 1. -->
|
||||||
|
<xsl:param name="chunk.first.sections" select="1"/>
|
||||||
|
|
||||||
|
<!-- preface:
|
||||||
|
Output non sect1 child elements before the TOC -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
|
||||||
|
<xsl:template match="preface">
|
||||||
|
<xsl:call-template name="id.warning"/>
|
||||||
|
<div>
|
||||||
|
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||||
|
<xsl:call-template name="dir">
|
||||||
|
<xsl:with-param name="inherit" select="1"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="language.attribute"/>
|
||||||
|
<xsl:if test="$generate.id.attributes != 0">
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:call-template name="object.id"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:call-template name="component.separator"/>
|
||||||
|
<xsl:call-template name="preface.titlepage"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<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:call-template name="process.footnotes"/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- chapter:
|
||||||
|
Output non sect1 child elements before the TOC -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
|
||||||
|
<xsl:template match="chapter">
|
||||||
|
<xsl:call-template name="id.warning"/>
|
||||||
|
<div>
|
||||||
|
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||||
|
<xsl:call-template name="dir">
|
||||||
|
<xsl:with-param name="inherit" select="1"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="language.attribute"/>
|
||||||
|
<xsl:if test="$generate.id.attributes != 0">
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:call-template name="object.id"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:call-template name="component.separator"/>
|
||||||
|
<xsl:call-template name="chapter.titlepage"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<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:call-template name="process.footnotes"/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect1:
|
||||||
|
When there is a role attibute, use it as the class value.
|
||||||
|
Process the SVN keywords found in sect1info as a footnote.
|
||||||
|
Removed unused code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
|
||||||
|
<xsl:template match="sect1">
|
||||||
|
<div>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role">
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:value-of select="@role"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:call-template name="language.attribute"/>
|
||||||
|
<xsl:call-template name="sect1.titlepage"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<xsl:apply-templates select="sect1info" mode="svn-keys"/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect2:
|
||||||
|
When there is a role attibute, use it as the class value.
|
||||||
|
Removed unused code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
|
||||||
|
<xsl:template match="sect2">
|
||||||
|
<div>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role">
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:value-of select="@role"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:value-of select="name(.)"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:call-template name="language.attribute"/>
|
||||||
|
<xsl:call-template name="sect2.titlepage"/>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect1info mode svn-keys:
|
||||||
|
Self-made template to process SVN keywords found in sect1info. -->
|
||||||
|
<xsl:template match="sect1info" mode="svn-keys">
|
||||||
|
<!-- <p class="updated">Last updated --><!-- by
|
||||||
|
<xsl:apply-templates select="othername" mode="svn-keys"/> -->
|
||||||
|
<!-- on
|
||||||
|
<xsl:apply-templates select="date" mode="svn-keys"/>
|
||||||
|
</p>
|
||||||
|
comment out entire template for now. We do not use this. bdubbs 2017/12/30 -->
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- othername mode svn-keys:
|
||||||
|
Self-made template to process the $LastChangedBy SVN keyword. -->
|
||||||
|
<xsl:template match="othername" mode="svn-keys">
|
||||||
|
<xsl:variable name="author">
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="nameonly">
|
||||||
|
<xsl:value-of select="substring($author,16)"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:value-of select="substring-before($nameonly,'$')"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- date mode svn-keys:
|
||||||
|
Self-made template to process the $Date SVN keyword. -->
|
||||||
|
<xsl:template match="date" mode="svn-keys">
|
||||||
|
<xsl:variable name="date">
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:value-of select="substring($date,7,26)"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
192
stylesheets/lfs-xsl/xhtml/lfs-titles.xsl
Normal file
192
stylesheets/lfs-xsl/xhtml/lfs-titles.xsl
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls the h* xhtml tags used for several titles -->
|
||||||
|
|
||||||
|
<!-- preface.titlepage:
|
||||||
|
Uses h1 and removed a lot of unneeded code.
|
||||||
|
No label in preface. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="preface.titlepage">
|
||||||
|
<h1 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h1>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- part.titlepage:
|
||||||
|
Uses h1 and removed a lot of unneeded code.
|
||||||
|
When sections are not labeled, we want the part label in TOC
|
||||||
|
but not in titlepage. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="part.titlepage">
|
||||||
|
<h1 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h1>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- partintro.titlepage:
|
||||||
|
Uses h2 and removed a lot of unneeded code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="partintro.titlepage">
|
||||||
|
<xsl:if test="title">
|
||||||
|
<h2 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h2>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- appendix.titlepage:
|
||||||
|
Uses h1 and removed a lot of unneeded code.
|
||||||
|
When sections are not labeled, we want the appendix label in TOC
|
||||||
|
but not in titlepage. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="appendix.titlepage">
|
||||||
|
<h1 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h1>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- chapter.titlepage:
|
||||||
|
Uses h1 and removed a lot of unneeded code.
|
||||||
|
When sections are not labeled, we want the chapter label in TOC
|
||||||
|
but not in titlepage. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="chapter.titlepage">
|
||||||
|
<h1 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h1>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect1.titlepage:
|
||||||
|
Uses h1 and removed a lot of unneeded code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="sect1.titlepage">
|
||||||
|
<h1 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h1>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect2.titlepage:
|
||||||
|
Uses h2 and removed a lot of unneeded code.
|
||||||
|
Skip empty titles.
|
||||||
|
No label in preface. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="sect2.titlepage">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="string-length(title) = 0"/>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<h2 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h2>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect3.titlepage:
|
||||||
|
Uses h3 and removed a lot of unneeded code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="sect3.titlepage">
|
||||||
|
<h3 class="{name(.)}">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$section.autolabel != 0">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h3>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- dedication.titlepage:
|
||||||
|
Uses h2 and removed a lot of unneeded code. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="dedication.titlepage">
|
||||||
|
<h2>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</h2>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- bridgehead:
|
||||||
|
We use always renderas attributes and want the output h* level
|
||||||
|
matching the defined sect* level.
|
||||||
|
Create the anchor only if there is an @id. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
|
||||||
|
<xsl:template match="bridgehead">
|
||||||
|
<xsl:variable name="hlevel">
|
||||||
|
<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:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
|
||||||
|
<xsl:if test="@id">
|
||||||
|
<a id="{@id}" name="{@id}"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- book.titlepage.verso:
|
||||||
|
Process bookinfo/bibliosource from here. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
||||||
|
<xsl:template name="book.titlepage.verso">
|
||||||
|
<xsl:apply-templates select="bookinfo/bibliosource"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- bookinfo/bibliosource:
|
||||||
|
Self-made template to handle bibliosource when inside bookinfo. -->
|
||||||
|
<xsl:template match="bookinfo/bibliosource">
|
||||||
|
<p class="copyright">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
189
stylesheets/lfs-xsl/xhtml/lfs-toc.xsl
Normal file
189
stylesheets/lfs-xsl/xhtml/lfs-toc.xsl
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet controls how the TOC are generated -->
|
||||||
|
|
||||||
|
<!-- make.toc:
|
||||||
|
Using h3 for TOC title.
|
||||||
|
Using ul for TOC list style.
|
||||||
|
Removed code for $manual.toc and $qanda.in.toc -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/autotoc.xsl -->
|
||||||
|
<xsl:template name="make.toc">
|
||||||
|
<xsl:param name="toc-context" select="."/>
|
||||||
|
<xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
|
||||||
|
<xsl:if test="$nodes">
|
||||||
|
<div class="toc">
|
||||||
|
<h3>
|
||||||
|
<xsl:call-template name="gentext">
|
||||||
|
<xsl:with-param name="key">TableofContents</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</h3>
|
||||||
|
<ul>
|
||||||
|
<xsl:apply-templates select="$nodes" mode="toc">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- subtoc:
|
||||||
|
Using ul for TOC list style.
|
||||||
|
Removed code for $qanda.in.toc
|
||||||
|
Removed code for sect* others than sect1 -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/autotoc.xsl -->
|
||||||
|
<xsl:template name="subtoc">
|
||||||
|
<xsl:param name="toc-context" select="."/>
|
||||||
|
<xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
|
||||||
|
<xsl:variable name="subtoc">
|
||||||
|
<ul>
|
||||||
|
<xsl:apply-templates mode="toc" select="$nodes">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</ul>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="depth">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
|
||||||
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="depth.from.context"
|
||||||
|
select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
|
||||||
|
<li class="{name(.)}">
|
||||||
|
<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 count($nodes)>0
|
||||||
|
and $toc.max.depth > $depth.from.context">
|
||||||
|
<xsl:copy-of select="$subtoc"/>
|
||||||
|
</xsl:if>
|
||||||
|
</li>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- toc.line:
|
||||||
|
Adding the h* tags and dropping unneded links.
|
||||||
|
This template is a full re-made version of the original one. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/autotoc.xsl -->
|
||||||
|
<xsl:template name="toc.line">
|
||||||
|
<xsl:param name="toc-context" select="."/>
|
||||||
|
<xsl:choose>
|
||||||
|
<!-- For non dummy sect1 targets, create a link. -->
|
||||||
|
<xsl:when test="local-name(.) = 'sect1'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@role='dummy'">
|
||||||
|
<span class="dummy">
|
||||||
|
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
||||||
|
</span>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="context" select="$toc-context"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
||||||
|
</a>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- For part, preface, and chapter, use hX and add the label.
|
||||||
|
For BLFS, make it a link. -->
|
||||||
|
<xsl:when test="local-name(.) = 'part' or local-name(.) = 'preface'
|
||||||
|
or local-name(.) = 'chapter'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$book-type = 'blfs'">
|
||||||
|
<xsl:apply-templates select="." mode="add.hX">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
<xsl:with-param name="with-link" select="1"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="add.hX">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
<xsl:with-param name="with-link" select="0"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- For appendix , create a link and add the label.
|
||||||
|
For BLFS, use hX. -->
|
||||||
|
<xsl:when test="local-name(.) = 'appendix'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$book-type = 'blfs'">
|
||||||
|
<xsl:apply-templates select="." mode="add.hX">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
<xsl:with-param name="with-link" select="1"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="add.link">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- For other targets like Index, use hX, create a link, and label it. -->
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="add.hX">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
<xsl:with-param name="with-link" select="1"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Self-made template to add hX tags to toc lines. -->
|
||||||
|
<xsl:template match="*" mode="add.hX">
|
||||||
|
<xsl:param name="toc-context" select="."/>
|
||||||
|
<xsl:param name="with-link" select="0"/>
|
||||||
|
<xsl:param name="hlevel">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="local-name(.)='chapter' or local-name(.)='preface'">4</xsl:when>
|
||||||
|
<xsl:otherwise>3</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:param>
|
||||||
|
<xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$with-link != 0">
|
||||||
|
<xsl:apply-templates select="." mode="add.link">
|
||||||
|
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="." mode="label.and.title"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Self-made template to made toc line a link. -->
|
||||||
|
<xsl:template match="*" mode="add.link">
|
||||||
|
<xsl:param name="toc-context" select="."/>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:call-template name="href.target">
|
||||||
|
<xsl:with-param name="context" select="$toc-context"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:apply-templates select="." mode="label.and.title"/>
|
||||||
|
</a>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Self-made template to write the target title and label it. -->
|
||||||
|
<xsl:template match="*" mode="label.and.title">
|
||||||
|
<xsl:variable name="label">
|
||||||
|
<xsl:apply-templates select="." mode="label.markup"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:copy-of select="$label"/>
|
||||||
|
<xsl:if test="$label != ''">
|
||||||
|
<xsl:value-of select="$autotoc.label.separator"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
137
stylesheets/lfs-xsl/xhtml/lfs-xref.xsl
Normal file
137
stylesheets/lfs-xsl/xhtml/lfs-xref.xsl
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
exclude-result-prefixes="xlink"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- This stylesheet fixes English punctuation in xref links
|
||||||
|
(as was requested by the publisher) via adding @role propagation
|
||||||
|
in xref tags.
|
||||||
|
This hack may not work with xref flavours not used in the book.
|
||||||
|
For other languages, just remove the xref @role attributes
|
||||||
|
in the book XML sources and/or comment-out the inclusion of
|
||||||
|
this file in lfs-chunked2.xsl -->
|
||||||
|
|
||||||
|
<!-- xref:
|
||||||
|
Added role variable and use it when calling mode xref-to.-->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
|
||||||
|
<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]"/>
|
||||||
|
<!-- Added role variable -->
|
||||||
|
<xsl:variable name="role" select="@role"/>
|
||||||
|
<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:call-template name="anchor"/>
|
||||||
|
<xsl:variable name="content">
|
||||||
|
<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"/>
|
||||||
|
<!-- Propagate role -->
|
||||||
|
<xsl:with-param name="role" select="$role"/>
|
||||||
|
</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>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:call-template name="simple.xlink">
|
||||||
|
<xsl:with-param name="content" select="$content"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- sect* mode xref-to:
|
||||||
|
Propagate role to mode object.xref.markup (see ../lfs-common.xsl) -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
|
||||||
|
<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:param name="role"/>
|
||||||
|
<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:with-param name="role" select="$role"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- insert.title.markup:
|
||||||
|
Apply the role value. -->
|
||||||
|
<!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
|
||||||
|
<xsl:template match="*" mode="insert.title.markup">
|
||||||
|
<xsl:param name="purpose"/>
|
||||||
|
<xsl:param name="xrefstyle"/>
|
||||||
|
<xsl:param name="title"/>
|
||||||
|
<xsl:param name="role"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$purpose = 'xref' and titleabbrev">
|
||||||
|
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="$title"/>
|
||||||
|
<xsl:value-of select="$role"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
58
stylesheets/md5sum.xsl
Normal file
58
stylesheets/md5sum.xsl
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<!-- Create a md5 list for packages and pathces used. -->
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates select="//ulink"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="ulink">
|
||||||
|
<!-- If some package don't have the predefined strings in their
|
||||||
|
name, the next test must be fixed to match it also. Skip possible
|
||||||
|
duplicated URLs that may be split for PDF output -->
|
||||||
|
<xsl:if test="(contains( @url, '.tar.' ) or
|
||||||
|
contains( @url, '.tgz' ) or
|
||||||
|
contains( @url, '.patch') ) and
|
||||||
|
not( ancestor-or-self::*/@condition = 'pdf' )" >
|
||||||
|
<!-- Get the md5sum -->
|
||||||
|
<xsl:value-of select="../../para/literal"/>
|
||||||
|
|
||||||
|
<!-- Add two spaces -->
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
|
||||||
|
<!-- Get the basename -->
|
||||||
|
<xsl:call-template name="basename">
|
||||||
|
<xsl:with-param name="pathname" select="@url"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
|
<!-- Add a newline -->
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="basename">
|
||||||
|
<xsl:param name="pathname"/>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
|
||||||
|
<xsl:when test="contains( $pathname, '/' )" >
|
||||||
|
<xsl:call-template name="basename">
|
||||||
|
<xsl:with-param name="pathname" select="substring-after( $pathname, '/' )" />
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$pathname"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
69
stylesheets/patcheslist.xsl
Normal file
69
stylesheets/patcheslist.xsl
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
<!DOCTYPE xsl:stylesheet [
|
||||||
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
|
%general-entities;
|
||||||
|
]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
|
<!-- Allow select the dest dir at runtime -->
|
||||||
|
<xsl:param name="dest.dir">
|
||||||
|
<xsl:value-of select="concat('/srv/www/', substring-after('&patches-root;', 'https://'))"/>
|
||||||
|
</xsl:param>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:text>#! /bin/bash
|
||||||
|
|
||||||
|
function copy
|
||||||
|
{
|
||||||
|
cp $1 $2 >>copyerrs 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
umask 002 

</xsl:text>
|
||||||
|
|
||||||
|
<!-- Create dest.dir if it don't exist -->
|
||||||
|
<xsl:text>install -d -m 775 -g lfswww </xsl:text>
|
||||||
|
<xsl:value-of select="$dest.dir"/>
|
||||||
|
<xsl:text> &&
</xsl:text>
|
||||||
|
<xsl:text>cd </xsl:text>
|
||||||
|
<xsl:value-of select="$dest.dir"/>
|
||||||
|
<xsl:text> &&

</xsl:text>
|
||||||
|
<!-- Remove old patches -->
|
||||||
|
<xsl:text>rm -f *.patch copyerrs && 

</xsl:text>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<!-- Ensure correct owneship -->
|
||||||
|
<xsl:text>
chgrp lfswww *.patch &&
</xsl:text>
|
||||||
|
<xsl:text>
|
||||||
|
if [ `wc -l copyerrs | sed 's/ *//' | cut -f1 -d' '` -gt 0 ]; then
|
||||||
|
mail -s "Missing LFS patches" lfs-book@lists.linuxfromscratch.org < copyerrs
|
||||||
|
fi

</xsl:text>
|
||||||
|
|
||||||
|
<xsl:text>exit
</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="//text()"/>
|
||||||
|
|
||||||
|
<xsl:template match="//ulink">
|
||||||
|
<!-- Match only local patches links and skip duplicated URLs splitted for PDF output-->
|
||||||
|
<xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')
|
||||||
|
and not(ancestor-or-self::*/@condition = 'pdf')">
|
||||||
|
<xsl:variable name="patch.name" select="substring-after(@url, '&patches-root;')"/>
|
||||||
|
<xsl:variable name="cut"
|
||||||
|
select="translate(substring-after($patch.name, '-'), '0123456789', '0000000000')"/>
|
||||||
|
<xsl:variable name="patch.name2">
|
||||||
|
<xsl:value-of select="substring-before($patch.name, '-')"/>
|
||||||
|
<xsl:text>-</xsl:text>
|
||||||
|
<xsl:value-of select="$cut"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:text>copy /srv/www/www.linuxfromscratch.org/patches/downloads/</xsl:text>
|
||||||
|
<xsl:value-of select="substring-before($patch.name2, '-0')"/>
|
||||||
|
<xsl:text>/</xsl:text>
|
||||||
|
<xsl:value-of select="$patch.name"/>
|
||||||
|
<xsl:text> . 
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
36
stylesheets/wget-list.xsl
Normal file
36
stylesheets/wget-list.xsl
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
|
<!-- Create a list of upstream URLs for packages and patches to be used
|
||||||
|
with wget. -->
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates select="//ulink"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="ulink">
|
||||||
|
<!-- If some package don't have the predefined strings in their
|
||||||
|
name, the next test must be fixed to match it also. Skip possible
|
||||||
|
duplicated URLs due that may be splitted for PDF output -->
|
||||||
|
<xsl:if test="(contains(@url, '.tar.') or
|
||||||
|
contains(@url, '.tgz') or
|
||||||
|
contains(@url, '.patch')) and
|
||||||
|
not(ancestor-or-self::*/@condition = 'pdf')">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains(@url,'?download')">
|
||||||
|
<xsl:value-of select="substring-before(@url,'?download')"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="@url"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user