HEAD: StyleSheets - unified the identation to use spaces.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3663 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Manuel Canales Esparcia 2004-05-19 20:16:58 +00:00
parent 28501c7129
commit a9e89d0c26
14 changed files with 203 additions and 187 deletions

View File

@ -4,11 +4,11 @@
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
version="1.0"> version="1.0">
<!-- We use XHTML --> <!-- We use XHTML -->
<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/> <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/> <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
<!-- Including our others customized templates --> <!-- Including our others customized templates -->
<xsl:include href="xhtml/lfs-admon.xsl"/> <xsl:include href="xhtml/lfs-admon.xsl"/>
<xsl:include href="xhtml/lfs-index.xsl"/> <xsl:include href="xhtml/lfs-index.xsl"/>
<xsl:include href="xhtml/lfs-legalnotice.xsl"/> <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
@ -17,14 +17,14 @@
<xsl:include href="xhtml/lfs-titles.xsl"/> <xsl:include href="xhtml/lfs-titles.xsl"/>
<xsl:include href="xhtml/lfs-toc.xsl"/> <xsl:include href="xhtml/lfs-toc.xsl"/>
<!-- The CSS Stylesheet --> <!-- The CSS Stylesheet -->
<xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/> <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
<!-- Dropping some unwanted style attributes --> <!-- Dropping some unwanted style attributes -->
<xsl:param name="ulink.target" select="''"></xsl:param> <xsl:param name="ulink.target" select="''"></xsl:param>
<xsl:param name="css.decoration" select="0"></xsl:param> <xsl:param name="css.decoration" select="0"></xsl:param>
<!-- No XML declaration --> <!-- No XML declaration -->
<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/> <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -3,32 +3,31 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"> version="1.0">
<!-- We use FO and FOP as the processor -->
<!-- We use FO and FOP as the processor -->
<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/> <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/>
<xsl:param name="fop.extensions" select="1"/> <xsl:param name="fop.extensions" select="1"/>
<xsl:param name="draft.mode" select="'no'"/> <xsl:param name="draft.mode" select="'no'"/>
<!-- Including our others customized templates --> <!-- Including our others customized templates -->
<xsl:include href="print/lfs-index.xsl"/> <xsl:include href="print/lfs-index.xsl"/>
<xsl:include href="print/lfs-pagesetup.xsl"/> <xsl:include href="print/lfs-pagesetup.xsl"/>
<!-- Probably want to make the paper size configurable --> <!-- Probably want to make the paper size configurable -->
<xsl:param name="paper.type" select="'A4'"/> <xsl:param name="paper.type" select="'A4'"/>
<!-- Printing Style --> <!-- Printing Style -->
<xsl:param name="double.sided" select="1"/> <xsl:param name="double.sided" select="1"/>
<xsl:param name="hyphenate">true</xsl:param> <xsl:param name="hyphenate">true</xsl:param>
<xsl:param name="alignment">justify</xsl:param> <xsl:param name="alignment">justify</xsl:param>
<!-- Hyphenate links --> <!-- Hyphenate links -->
<xsl:param name="ulink.hyphenate" select="' '"></xsl:param> <xsl:param name="ulink.hyphenate" select="' '"></xsl:param>
<!-- Font size --> <!-- Font size -->
<xsl:param name="body.font.master">8</xsl:param> <xsl:param name="body.font.master">8</xsl:param>
<xsl:param name="body.font.size">10pt</xsl:param> <xsl:param name="body.font.size">10pt</xsl:param>
<!-- TOC stuff --> <!-- TOC stuff -->
<xsl:param name="generate.toc"> <xsl:param name="generate.toc">
book toc book toc
part nop part nop
@ -37,18 +36,17 @@
<xsl:param name="generate.section.toc.level" select="-1"></xsl:param> <xsl:param name="generate.section.toc.level" select="-1"></xsl:param>
<xsl:param name="toc.indent.width" select="18"></xsl:param> <xsl:param name="toc.indent.width" select="18"></xsl:param>
<!-- Page number in Xref--> <!-- Page number in Xref-->
<xsl:param name="insert.xref.page.number">yes</xsl:param> <xsl:param name="insert.xref.page.number">yes</xsl:param> <xsl:template match="*" mode="page.citation">
<xsl:template match="*" mode="page.citation"> <xsl:param name="id" select="'???'"/>
<xsl:param name="id" select="'???'"/> <fo:inline keep-together.within-line="always">
<fo:inline keep-together.within-line="always"> <xsl:text>[p</xsl:text>
<xsl:text>[p</xsl:text>
<fo:page-number-citation ref-id="{$id}"/> <fo:page-number-citation ref-id="{$id}"/>
<xsl:text>]</xsl:text> <xsl:text>]</xsl:text>
</fo:inline> </fo:inline>
</xsl:template> </xsl:template>
<!-- Prevent duplicate e-mails in the Acknowledgments pages--> <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
<xsl:param name="ulink.show" select="0"/> <xsl:param name="ulink.show" select="0"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -5,17 +5,17 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> version="1.0">
<xsl:output method="text"/> <xsl:output method="text"/>
<xsl:template match="//text()"> <xsl:template match="//text()">
<xsl:text/> <xsl:text/>
</xsl:template> </xsl:template>
<xsl:template match="//ulink"> <xsl:template match="//ulink">
<xsl:if test="contains(@url, '.patch')"> <xsl:if test="contains(@url, '.patch')">
<xsl:value-of select="@url"/> <xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text> <xsl:text>&#x0a;</xsl:text>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -12,15 +12,15 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"> version="1.0">
<!--Only one column to fit the table layout--> <!--Only one column to fit the table layout-->
<xsl:param name="column.count.index" select="1"/> <xsl:param name="column.count.index" select="1"/>
<!--Title--> <!--Title-->
<xsl:template match="index" mode="title.markup"> <xsl:template match="index" mode="title.markup">
<xsl:text>Index of packages and important installed files</xsl:text> <xsl:text>Index of packages and important installed files</xsl:text>
</xsl:template> </xsl:template>
<!-- Divisions--> <!-- Divisions-->
<xsl:template match="indexterm" mode="index-div"> <xsl:template match="indexterm" mode="index-div">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" <xsl:variable name="key"
@ -51,14 +51,14 @@
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$divtitle"/> <xsl:value-of select="$divtitle"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
</xsl:if> </xsl:if>
<fo:table table-layout="fixed" width="100%"> <fo:table table-layout="fixed" width="100%">
<fo:table-column column-number="1" column-width="11em"/> <fo:table-column column-number="1" column-width="11em"/>
<fo:table-column column-number="2" column-width="19em"/> <fo:table-column column-number="2" column-width="19em"/>
<fo:table-column column-number="3"/> <fo:table-column column-number="3"/>
<fo:table-body> <fo:table-body>
<xsl:apply-templates select="key('letter', $key)[&scope;] <xsl:apply-templates select="key('letter', $key)[&scope;]
[count(.|key('primary', &primary;)[&scope;][1])=1]" [count(.|key('primary', &primary;)[&scope;][1])=1]"
@ -66,32 +66,32 @@
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:table-body> </fo:table-body>
</fo:table> </fo:table>
</fo:block> </fo:block>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- Dropping the separator from here --> <!-- Dropping the separator from here -->
<xsl:template match="indexterm" mode="reference"> <xsl:template match="indexterm" mode="reference">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:call-template name="reference"> <xsl:call-template name="reference">
<xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="zones" select="normalize-space(@zone)"/>
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<!-- Changing the output tags and re-addind the separator--> <!-- Changing the output tags and re-addind the separator-->
<xsl:template match="indexterm" mode="index-primary"> <xsl:template match="indexterm" mode="index-primary">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" select="&primary;"/> <xsl:variable name="key" select="&primary;"/>
<xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
<fo:table-row> <fo:table-row>
<fo:table-cell> <fo:table-cell>
<fo:block> <fo:block>
<xsl:value-of select="primary"/> <xsl:value-of select="primary"/>
<xsl:text>: </xsl:text> <xsl:text>: </xsl:text>
</fo:block> </fo:block>
</fo:table-cell> </fo:table-cell>
<xsl:for-each select="$refs[not(see) and not(seealso) <xsl:for-each select="$refs[not(see) and not(seealso)
and not(secondary)]"> and not(secondary)]">
@ -99,36 +99,36 @@
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:for-each> </xsl:for-each>
</fo:table-row> </fo:table-row>
<xsl:if test="$refs/secondary"> <xsl:if test="$refs/secondary">
<xsl:apply-templates select="$refs[secondary and count(.|key('secondary', <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary"> concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary">
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
<xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="indexterm" mode="index-secondary"> <xsl:template match="indexterm" mode="index-secondary">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
<xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
<fo:table-row> <fo:table-row>
<fo:table-cell> <fo:table-cell>
<fo:block start-indent="1pc"> <fo:block start-indent="1pc">
<xsl:value-of select="secondary"/> <xsl:value-of select="secondary"/>
<xsl:text>: </xsl:text> <xsl:text>: </xsl:text>
</fo:block> </fo:block>
</fo:table-cell> </fo:table-cell>
<xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]"> <xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]">
<xsl:apply-templates select="." mode="reference"> <xsl:apply-templates select="." mode="reference">
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:for-each> </xsl:for-each>
</fo:table-row> </fo:table-row>
</xsl:template> </xsl:template>
<!-- Targets titles and bookmarks--> <!-- Targets titles and bookmarks-->
<xsl:template name="reference"> <xsl:template name="reference">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:param name="zones"/> <xsl:param name="zones"/>
@ -149,25 +149,25 @@
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<fo:table-cell> <fo:table-cell>
<fo:block> <fo:block>
<fo:basic-link internal-destination="{$id}"> <fo:basic-link internal-destination="{$id}">
<xsl:value-of select="$target/title"/> <xsl:value-of select="$target/title"/>
<xsl:apply-templates select="$target" mode="page.citation"> <xsl:apply-templates select="$target" mode="page.citation">
<xsl:with-param name="id" select="$id"/> <xsl:with-param name="id" select="$id"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:basic-link> </fo:basic-link>
</fo:block> </fo:block>
</fo:table-cell> </fo:table-cell>
<fo:table-cell> <fo:table-cell>
<fo:block> <fo:block>
<fo:basic-link internal-destination="{$id2}"> <fo:basic-link internal-destination="{$id2}">
<xsl:text>description</xsl:text> <xsl:text>description</xsl:text>
<xsl:apply-templates select="$target2" mode="page.citation"> <xsl:apply-templates select="$target2" mode="page.citation">
<xsl:with-param name="id" select="$id2"/> <xsl:with-param name="id" select="$id2"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:basic-link> </fo:basic-link>
</fo:block> </fo:block>
</fo:table-cell> </fo:table-cell>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:variable name="zone" select="$zones"/> <xsl:variable name="zone" select="$zones"/>
@ -178,15 +178,15 @@
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<fo:table-cell> <fo:table-cell>
<fo:block> <fo:block>
<fo:basic-link internal-destination="{$id}"> <fo:basic-link internal-destination="{$id}">
<xsl:value-of select="$target/title"/> <xsl:value-of select="$target/title"/>
<xsl:apply-templates select="$target" mode="page.citation"> <xsl:apply-templates select="$target" mode="page.citation">
<xsl:with-param name="id" select="$id"/> <xsl:with-param name="id" select="$id"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:basic-link> </fo:basic-link>
</fo:block> </fo:block>
</fo:table-cell> </fo:table-cell>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>

View File

@ -4,21 +4,21 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"> version="1.0">
<!-- Force section1's onto a new page --> <!-- Force section1's onto a new page -->
<xsl:attribute-set name="section.level1.properties"> <xsl:attribute-set name="section.level1.properties">
<xsl:attribute name="break-after"> <xsl:attribute name="break-after">
<xsl:choose> <xsl:choose>
<xsl:when test="not(position()=last())"> <xsl:when test="not(position()=last())">
<xsl:text>page</xsl:text> <xsl:text>page</xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:text>auto</xsl:text> <xsl:text>auto</xsl:text>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<!-- Header --> <!-- Header -->
<xsl:attribute-set name="header.content.properties"> <xsl:attribute-set name="header.content.properties">
<xsl:attribute name="font-family"> <xsl:attribute name="font-family">
<xsl:value-of select="$body.fontset"/> <xsl:value-of select="$body.fontset"/>
@ -37,12 +37,12 @@
<xsl:choose> <xsl:choose>
<xsl:when test="$gentext-key = 'book'"/> <xsl:when test="$gentext-key = 'book'"/>
<xsl:otherwise> <xsl:otherwise>
<xsl:call-template name="header.content"/> <xsl:call-template name="header.content"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!-- Centered titles for book and part --> <!-- Centered titles for book and part -->
<xsl:template name="book.titlepage"> <xsl:template name="book.titlepage">
<fo:block space-before="2in"> <fo:block space-before="2in">
<fo:block> <fo:block>
@ -71,7 +71,7 @@
</fo:block> </fo:block>
</xsl:template> </xsl:template>
<!-- Margins --> <!-- Margins -->
<xsl:param name="page.margin.inner">0.75in</xsl:param> <xsl:param name="page.margin.inner">0.75in</xsl:param>
<xsl:param name="page.margin.outer">0.75in</xsl:param> <xsl:param name="page.margin.outer">0.75in</xsl:param>
<xsl:param name="title.margin.left">-1pc</xsl:param> <xsl:param name="title.margin.left">-1pc</xsl:param>
@ -102,15 +102,15 @@
<xsl:attribute name="space-after.maximum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<!-- Others--> <!-- Others-->
<xsl:param name="header.rule" select="0"></xsl:param> <xsl:param name="header.rule" select="0"></xsl:param>
<xsl:param name="footer.rule" select="0"></xsl:param> <xsl:param name="footer.rule" select="0"></xsl:param>
<xsl:param name="marker.section.level" select="-1"></xsl:param> <xsl:param name="marker.section.level" select="-1"></xsl:param>
<!-- Dropping a blank page --> <!-- Dropping a blank page -->
<xsl:template name="book.titlepage.separator"/> <xsl:template name="book.titlepage.separator"/>
<!-- How render a variablelist --> <!-- How render a variablelist -->
<xsl:param name="variablelist.as.blocks" select="1"/> <xsl:param name="variablelist.as.blocks" select="1"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -12,11 +12,11 @@
<!--Title--> <!--Title-->
<xsl:template match="index" mode="title.markup"> <xsl:template match="index" mode="title.markup">
<xsl:param name="allow-anchors" select="0"/> <xsl:param name="allow-anchors" select="0"/>
<xsl:text>Index of packages and important installed files</xsl:text> <xsl:text>Index of packages and important installed files</xsl:text>
</xsl:template> </xsl:template>
<!-- Divisions--> <!-- Divisions-->
<xsl:template match="indexterm" mode="index-div"> <xsl:template match="indexterm" mode="index-div">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" <xsl:variable name="key"
@ -63,17 +63,17 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- The separator --> <!-- The separator -->
<xsl:template match="indexterm" mode="reference"> <xsl:template match="indexterm" mode="reference">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:text>: </xsl:text> <xsl:text>: </xsl:text>
<xsl:call-template name="reference"> <xsl:call-template name="reference">
<xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="zones" select="normalize-space(@zone)"/>
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<!--Bookmarks--> <!--Bookmarks-->
<xsl:template name="reference"> <xsl:template name="reference">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:param name="zones"/> <xsl:param name="zones"/>
@ -95,13 +95,13 @@
</xsl:variable> </xsl:variable>
<fo:basic-link internal-destination="{$id}"> <fo:basic-link internal-destination="{$id}">
<xsl:apply-templates select="$target" mode="page.citation"> <xsl:apply-templates select="$target" mode="page.citation">
<xsl:with-param name="id" select="$id"/> <xsl:with-param name="id" select="$id"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:basic-link> </fo:basic-link>
<xsl:text> , </xsl:text> <xsl:text> , </xsl:text>
<fo:basic-link internal-destination="{$id2}"> <fo:basic-link internal-destination="{$id2}">
<xsl:apply-templates select="$target2" mode="page.citation"> <xsl:apply-templates select="$target2" mode="page.citation">
<xsl:with-param name="id" select="$id2"/> <xsl:with-param name="id" select="$id2"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:basic-link> </fo:basic-link>
</xsl:when> </xsl:when>
@ -115,7 +115,7 @@
</xsl:variable> </xsl:variable>
<fo:basic-link internal-destination="{$id}"> <fo:basic-link internal-destination="{$id}">
<xsl:apply-templates select="$target" mode="page.citation"> <xsl:apply-templates select="$target" mode="page.citation">
<xsl:with-param name="id" select="$id"/> <xsl:with-param name="id" select="$id"/>
</xsl:apply-templates> </xsl:apply-templates>
</fo:basic-link> </fo:basic-link>
</xsl:otherwise> </xsl:otherwise>

View File

@ -4,24 +4,24 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"> version="1.0">
<!-- Force section1's onto a new page --> <!-- Force section1's onto a new page -->
<xsl:attribute-set name="section.level1.properties"> <xsl:attribute-set name="section.level1.properties">
<xsl:attribute name="break-after"> <xsl:attribute name="break-after">
<xsl:choose> <xsl:choose>
<xsl:when test="not(position()=last())"> <xsl:when test="not(position()=last())">
<xsl:text>page</xsl:text> <xsl:text>page</xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:text>auto</xsl:text> <xsl:text>auto</xsl:text>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<!-- Header --> <!-- Header -->
<xsl:template name="header.content"> <xsl:template name="header.content">
<xsl:param name="sequence" select="''"/> <xsl:param name="sequence" select="''"/>
<fo:block> <fo:block>
<xsl:attribute name="text-align"> <xsl:attribute name="text-align">
<xsl:choose> <xsl:choose>
<xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when> <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
@ -35,19 +35,19 @@
</xsl:template> </xsl:template>
<xsl:template name="header.table"> <xsl:template name="header.table">
<xsl:param name="sequence" select="''"/> <xsl:param name="sequence" select="''"/>
<xsl:param name="gentext-key" select="''"/> <xsl:param name="gentext-key" select="''"/>
<xsl:choose> <xsl:choose>
<xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/> <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
<xsl:otherwise> <xsl:otherwise>
<xsl:call-template name="header.content"> <xsl:call-template name="header.content">
<xsl:with-param name="sequence" select="$sequence"/> <xsl:with-param name="sequence" select="$sequence"/>
</xsl:call-template> </xsl:call-template>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!-- Centered titles for book and part --> <!-- Centered titles for book and part -->
<xsl:template name="book.titlepage"> <xsl:template name="book.titlepage">
<fo:block space-before="2in"> <fo:block space-before="2in">
<fo:block> <fo:block>
@ -76,7 +76,7 @@
</fo:block> </fo:block>
</xsl:template> </xsl:template>
<!-- Margins --> <!-- Margins -->
<xsl:param name="page.margin.inner">1in</xsl:param> <xsl:param name="page.margin.inner">1in</xsl:param>
<xsl:param name="page.margin.outer">0.5in</xsl:param> <xsl:param name="page.margin.outer">0.5in</xsl:param>
<xsl:param name="title.margin.left">-1pc</xsl:param> <xsl:param name="title.margin.left">-1pc</xsl:param>
@ -107,15 +107,15 @@
<xsl:attribute name="space-after.maximum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<!-- Others--> <!-- Others-->
<xsl:param name="header.rule" select="0"></xsl:param> <xsl:param name="header.rule" select="0"></xsl:param>
<xsl:param name="footer.rule" select="0"></xsl:param> <xsl:param name="footer.rule" select="0"></xsl:param>
<xsl:param name="marker.section.level" select="-1"></xsl:param> <xsl:param name="marker.section.level" select="-1"></xsl:param>
<!-- Dropping a blank page --> <!-- Dropping a blank page -->
<xsl:template name="book.titlepage.separator"/> <xsl:template name="book.titlepage.separator"/>
<!-- How render a variablelist --> <!-- How render a variablelist -->
<xsl:param name="variablelist.as.blocks" select="1"/> <xsl:param name="variablelist.as.blocks" select="1"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -4,12 +4,12 @@
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
version="1.0"> version="1.0">
<!-- Use graphics in admonitions --> <!-- Use graphics in admonitions -->
<xsl:param name="admon.graphics" select="1"/> <xsl:param name="admon.graphics" select="1"/>
<xsl:param name="admon.graphics.path">../images/</xsl:param> <xsl:param name="admon.graphics.path">../images/</xsl:param>
<xsl:param name="admon.graphics.extension" select="'.png'"/> <xsl:param name="admon.graphics.extension" select="'.png'"/>
<!-- Changing the output tagging --> <!-- Changing the output tagging -->
<xsl:template name="graphical.admonition"> <xsl:template name="graphical.admonition">
<xsl:variable name="admon.type"> <xsl:variable name="admon.type">
<xsl:choose> <xsl:choose>
@ -22,7 +22,7 @@
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<div class="admonition"> <div class="admonition">
<div class ="admonhead"> <div class ="admonhead">
<img alt="[{$admon.type}]"> <img alt="[{$admon.type}]">
<xsl:attribute name="src"> <xsl:attribute name="src">
<xsl:call-template name="admon.graphic"/> <xsl:call-template name="admon.graphic"/>
@ -37,7 +37,7 @@
</h3> </h3>
</div> </div>
<div class="admonbody"> <div class="admonbody">
<xsl:apply-templates/> <xsl:apply-templates/>
</div> </div>
</div> </div>
</xsl:template> </xsl:template>

View File

@ -20,51 +20,51 @@
<xsl:template match="index" mode="title.markup"> <xsl:template match="index" mode="title.markup">
<xsl:value-of select="$index-title"/> <xsl:value-of select="$index-title"/>
</xsl:template> </xsl:template>
<xsl:template name="index.titlepage"> <xsl:template name="index.titlepage">
<div class="titlepage"> <div class="titlepage">
<h1 class="index"> <h1 class="index">
<xsl:value-of select="$index-title"/> <xsl:value-of select="$index-title"/>
</h1> </h1>
</div> </div>
</xsl:template> </xsl:template>
<!--Divisions--> <!--Divisions-->
<xsl:template match="indexterm" mode="index-div"> <xsl:template match="indexterm" mode="index-div">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
<xsl:variable name="divtitle" select="translate($key, &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 --> <!-- 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="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
<div class="indexdiv"> <div class="indexdiv">
<xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
<h2> <h2>
<xsl:choose> <xsl:choose>
<xsl:when test="$divtitle = 'A'"> <xsl:when test="$divtitle = 'A'">
<xsl:text>Packages</xsl:text> <xsl:text>Packages</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$divtitle = 'B'"> <xsl:when test="$divtitle = 'B'">
<xsl:text>Programs</xsl:text> <xsl:text>Programs</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$divtitle = 'C'"> <xsl:when test="$divtitle = 'C'">
<xsl:text>Libraries</xsl:text> <xsl:text>Libraries</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$divtitle = 'D'"> <xsl:when test="$divtitle = 'D'">
<xsl:text>Scripts</xsl:text> <xsl:text>Scripts</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$divtitle = 'E'"> <xsl:when test="$divtitle = 'E'">
<xsl:text>Others</xsl:text> <xsl:text>Others</xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$divtitle"/> <xsl:value-of select="$divtitle"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</h2> </h2>
</xsl:if> </xsl:if>
<ul> <ul>
<xsl:apply-templates select="key('letter', $key)[&scope;] <xsl:apply-templates select="key('letter', $key)[&scope;]
[count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary"> [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary">
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
</xsl:apply-templates> </xsl:apply-templates>
@ -73,27 +73,27 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- Dropping the separator from here--> <!-- Dropping the separator from here-->
<xsl:template match="indexterm" mode="reference"> <xsl:template match="indexterm" mode="reference">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:call-template name="reference"> <xsl:call-template name="reference">
<xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="zones" select="normalize-space(@zone)"/>
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<!-- Changing the output tags and re-addind the separator--> <!-- Changing the output tags and re-addind the separator-->
<xsl:template match="indexterm" mode="index-primary"> <xsl:template match="indexterm" mode="index-primary">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" select="&primary;"/> <xsl:variable name="key" select="&primary;"/>
<xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
<li> <li>
<strong class="item"> <strong class="item">
<xsl:value-of select="primary"/> <xsl:value-of select="primary"/>
<xsl:text>: </xsl:text> <xsl:text>: </xsl:text>
</strong> </strong>
<xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',
concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
|ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
|ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
|ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]"> |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
@ -101,32 +101,32 @@
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:for-each> </xsl:for-each>
<xsl:if test="$refs/secondary"> <xsl:if test="$refs/secondary">
<ul> <ul>
<xsl:apply-templates select="$refs[secondary and count(.|key('secondary', <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
concat($key, &#34; &#34;, normalize-space(concat(secondary/@sortas, concat($key, &#34; &#34;, normalize-space(concat(secondary/@sortas,
secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary"> secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary">
<xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="scope" select="$scope"/>
<xsl:sort select="translate(normalize-space(concat(secondary/@sortas, <xsl:sort select="translate(normalize-space(concat(secondary/@sortas,
secondary[not(@sortas)])), &lowercase;, &uppercase;)"/> secondary[not(@sortas)])), &lowercase;, &uppercase;)"/>
</xsl:apply-templates> </xsl:apply-templates>
</ul> </ul>
</xsl:if> </xsl:if>
</li> </li>
</xsl:template> </xsl:template>
<xsl:template match="indexterm" mode="index-secondary"> <xsl:template match="indexterm" mode="index-secondary">
<xsl:param name="scope" select="."/> <xsl:param name="scope" select="."/>
<xsl:variable name="key" select="concat(&primary;, &#34; &#34;, <xsl:variable name="key" select="concat(&primary;, &#34; &#34;,
normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/> normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/>
<xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
<li> <li>
<strong class="secitem"> <strong class="secitem">
<xsl:value-of select="secondary"/> <xsl:value-of select="secondary"/>
<xsl:text>: </xsl:text> <xsl:text>: </xsl:text>
</strong> </strong>
<xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section',
concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
|ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
|ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
|ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]"> |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">

View File

@ -1,12 +1,10 @@
<?xml version='1.0' encoding='ISO-8859-1'?> <?xml version='1.0' encoding='ISO-8859-1'?>
<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
version="1.0"> version="1.0">
<!-- Generating the page --> <!-- Generating the page -->
<xsl:template match="legalnotice" mode="titlepage.mode"> <xsl:template match="legalnotice" mode="titlepage.mode">
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
<xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/> <xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/>

View File

@ -4,10 +4,10 @@
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
version="1.0"> version="1.0">
<!-- screen --> <!-- screen -->
<xsl:template match="screen"> <xsl:template match="screen">
<xsl:choose> <xsl:choose>
<!-- Temporally hack --> <!-- Temporally hack -->
<xsl:when test="child::* = userinput"> <xsl:when test="child::* = userinput">
<pre class="{name(.)}"> <pre class="{name(.)}">
<kbd class="command"> <kbd class="command">
@ -24,21 +24,31 @@
</xsl:template> </xsl:template>
<!-- variablelist --> <!-- variablelist -->
<xsl:template match="variablelist"> <xsl:template match="variablelist">
<div class="{name(.)}"> <div class="{name(.)}">
<xsl:if test="title"> <xsl:if test="title">
<h3> <xsl:choose>
<xsl:value-of select="title"/> <xsl:when test="@role = 'materials'">
</h3> <h3>
</xsl:if> <xsl:value-of select="title"/>
<dl> </h3>
<xsl:if test="@role"> </xsl:when>
<xsl:attribute name="class"> <xsl:otherwise>
<xsl:value-of select="@role"/> <h4>
</xsl:attribute> <xsl:value-of select="title"/>
</xsl:if> </h4>
<xsl:apply-templates select="varlistentry"/> </xsl:otherwise>
</dl> </xsl:choose>
</div> </xsl:if>
</xsl:template> <dl>
<xsl:if test="@role">
<xsl:attribute name="class">
<xsl:value-of select="@role"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="varlistentry"/>
</dl>
</div>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -1,7 +1,5 @@
<?xml version='1.0' encoding='ISO-8859-1'?> <?xml version='1.0' encoding='ISO-8859-1'?>
<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
version="1.0"> version="1.0">
@ -15,7 +13,7 @@
</head> </head>
</xsl:template> </xsl:template>
<!-- Header Navigation--> <!-- Header Navigation-->
<xsl:template name="header.navigation"> <xsl:template name="header.navigation">
<xsl:param name="prev" select="/foo"/> <xsl:param name="prev" select="/foo"/>
<xsl:param name="next" select="/foo"/> <xsl:param name="next" select="/foo"/>
@ -64,6 +62,19 @@
<xsl:text>Next</xsl:text> <xsl:text>Next</xsl:text>
</a> </a>
</li> </li>
</xsl:if>
<xsl:if test="count($up)&gt;0 and $up != $home">
<li class="up">
<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:text>Up</xsl:text>
</a>
</li>
</xsl:if>
<li class="home"> <li class="home">
<a accesskey="h"> <a accesskey="h">
<xsl:attribute name="href"> <xsl:attribute name="href">
@ -74,13 +85,12 @@
<xsl:text>Home</xsl:text> <xsl:text>Home</xsl:text>
</a> </a>
</li> </li>
</xsl:if>
</ul> </ul>
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- Footer Navigation--> <!-- Footer Navigation-->
<xsl:template name="footer.navigation"> <xsl:template name="footer.navigation">
<xsl:param name="prev" select="/foo"/> <xsl:param name="prev" select="/foo"/>
<xsl:param name="next" select="/foo"/> <xsl:param name="next" select="/foo"/>
@ -103,7 +113,7 @@
<xsl:text>Prev</xsl:text> <xsl:text>Prev</xsl:text>
</a> </a>
<p> <p>
<xsl:apply-templates select="$prev" mode="object.title.markup"/> <xsl:apply-templates select="$prev" mode="object.title.markup"/>
</p> </p>
</li> </li>
</xsl:if> </xsl:if>
@ -118,7 +128,7 @@
<xsl:text>Next</xsl:text> <xsl:text>Next</xsl:text>
</a> </a>
<p> <p>
<xsl:apply-templates select="$next" mode="object.title.markup"/> <xsl:apply-templates select="$next" mode="object.title.markup"/>
</p> </p>
</li> </li>
</xsl:if> </xsl:if>

View File

@ -30,7 +30,7 @@
<xsl:template name="sect1.titlepage"> <xsl:template name="sect1.titlepage">
<xsl:choose> <xsl:choose>
<!-- I should find a better test --> <!-- I should find a better test -->
<xsl:when test="position() = 4"> <xsl:when test="position() = 4">
<div class="titlepage"> <div class="titlepage">
<xsl:if test="@id"> <xsl:if test="@id">

View File

@ -4,7 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
version="1.0"> version="1.0">
<!-- General settings --> <!-- General settings -->
<xsl:param name="generate.toc"> <xsl:param name="generate.toc">
appendix toc appendix toc
book toc,title,figure,table,example,equation book toc,title,figure,table,example,equation
@ -27,8 +27,8 @@
<xsl:param name="toc.max.depth">3</xsl:param> <xsl:param name="toc.max.depth">3</xsl:param>
<!-- Making the TOC --> <!-- Making the TOC -->
<xsl:template name="make.toc"> <xsl:template name="make.toc">
<xsl:param name="toc-context" select="."/> <xsl:param name="toc-context" select="."/>
<xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
<xsl:if test="$nodes"> <xsl:if test="$nodes">
@ -46,7 +46,7 @@
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- Making the subtocs --> <!-- Making the subtocs -->
<xsl:template name="subtoc"> <xsl:template name="subtoc">
<xsl:param name="toc-context" select="."/> <xsl:param name="toc-context" select="."/>
@ -71,7 +71,7 @@
<xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="toc-context" select="$toc-context"/>
</xsl:call-template> </xsl:call-template>
<xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0 <xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0
and $toc.max.depth &gt; $depth.from.context"> and $toc.max.depth &gt; $depth.from.context">
<xsl:copy-of select="$subtoc"/> <xsl:copy-of select="$subtoc"/>
</xsl:if> </xsl:if>
</li> </li>