diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2005-09-18 13:44:20 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2005-09-18 13:44:20 +0000 |
commit | cb87df64723790d8412c04c567ab3b237a24c05d (patch) | |
tree | ccfde5d56d134c7a562e3c641e0742e5eb2eb793 | |
parent | d13319a59ba661132e09499e88427ad8383b9031 (diff) |
Updated the stylesheets to the new version. But some fixes are needed yet.LFS-RNG
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@6874 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | stylesheets/dump-commands.xsl | 84 | ||||
-rw-r--r-- | stylesheets/lfs-chunked.xsl | 4 | ||||
-rw-r--r-- | stylesheets/lfs-chunked1.xsl | 10 | ||||
-rw-r--r-- | stylesheets/lfs-chunked2.xsl | 2 | ||||
-rw-r--r-- | stylesheets/lfs-l10n.xml | 14 | ||||
-rw-r--r-- | stylesheets/lfs-nochunks.xsl | 28 | ||||
-rw-r--r-- | stylesheets/lfs-pdf.xsl | 11 | ||||
-rw-r--r-- | stylesheets/lfs-profile.xsl | 30 | ||||
-rw-r--r-- | stylesheets/lfs.css | 63 | ||||
-rw-r--r-- | stylesheets/patcheslist.xsl | 74 | ||||
-rw-r--r-- | stylesheets/pdf/lfs-admon.xsl | 2 | ||||
-rw-r--r-- | stylesheets/pdf/lfs-mixed.xsl | 2 | ||||
-rw-r--r-- | stylesheets/pdf/lfs-pagesetup.xsl | 5 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-legalnotice.xsl | 4 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-mixed.xsl | 102 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-navigational.xsl | 8 |
16 files changed, 304 insertions, 139 deletions
diff --git a/stylesheets/dump-commands.xsl b/stylesheets/dump-commands.xsl new file mode 100644 index 000000000..a91bb1cac --- /dev/null +++ b/stylesheets/dump-commands.xsl @@ -0,0 +1,84 @@ +<?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: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 = 'nodump'"/> + <xsl:when test="@role = 'root'"> + <xsl:text>
</xsl:text> + <xsl:text># Run this as root</xsl:text> + <xsl:apply-templates select="userinput"/> + <xsl:text># End root commands</xsl:text> + <xsl:text>
</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="userinput"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:template> + + <xsl:template match="userinput"> + <xsl:text>
</xsl:text> + <xsl:if test=".//replaceable"> + <xsl:text># This block must be edited to suit your needs.</xsl:text> + </xsl:if> + <xsl:text>
</xsl:text> + <xsl:apply-templates/> + <xsl:text>
</xsl:text> + <xsl:if test=".//replaceable"> + <xsl:text># End of editable block.</xsl:text> + </xsl:if> + <xsl:text>
</xsl:text> + </xsl:template> + + <xsl:template match="replaceable"> + <xsl:text>**EDITME</xsl:text> + <xsl:apply-templates/> + <xsl:text>EDITME**</xsl:text> + </xsl:template> + +</xsl:stylesheet> diff --git a/stylesheets/lfs-chunked.xsl b/stylesheets/lfs-chunked.xsl index ce3682864..768dbfa86 100644 --- a/stylesheets/lfs-chunked.xsl +++ b/stylesheets/lfs-chunked.xsl @@ -5,8 +5,8 @@ version="1.0"> <xsl:import href="lfs-chunked2.xsl"/> - <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/chunk-common.xsl"/> - <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/manifest.xsl"/> + <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/chunk-common.xsl"/> + <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/manifest.xsl"/> <!-- From the original chunk.xsl file: diff --git a/stylesheets/lfs-chunked1.xsl b/stylesheets/lfs-chunked1.xsl index 84e4d8a7d..c6b99fdf1 100644 --- a/stylesheets/lfs-chunked1.xsl +++ b/stylesheets/lfs-chunked1.xsl @@ -5,19 +5,19 @@ exclude-result-prefixes="exsl" version="1.0"> - <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/profile-chunk-code.xsl"/> + <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/profile-chunk-code.xsl"/> <xsl:key name="id" match="*" use="@xml:id"/> - + <xsl:template match="/"> <xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"> <xslo:apply-templates select="." mode="profile"/> </xslo:variable> - <xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" + <xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exsl:node-set($profiled-content)"/> <xsl:choose> - <xsl:when test="namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'"> + <xsl:when test="namespace-uri(*[1]) = 'http://docbook.org/ns/docbook'"> <xsl:variable name="nons"> <xsl:apply-templates select="$profiled-nodes" mode="stripNS"/> </xsl:variable> @@ -73,7 +73,7 @@ <xsl:template match="*" mode="stripNS"> <xsl:choose> - <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'"> + <xsl:when test="namespace-uri(.) = 'http://docbook.org/ns/docbook'"> <xsl:element name="{local-name(.)}"> <xsl:copy-of select="@*"/> <xsl:apply-templates mode="stripNS"/> diff --git a/stylesheets/lfs-chunked2.xsl b/stylesheets/lfs-chunked2.xsl index 967162c8a..675c0a1e5 100644 --- a/stylesheets/lfs-chunked2.xsl +++ b/stylesheets/lfs-chunked2.xsl @@ -5,7 +5,7 @@ version="1.0"> <!-- We use XHTML --> - <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/docbook.xsl"/> + <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl"/> <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/> <!-- Including our others customized elements templates --> diff --git a/stylesheets/lfs-l10n.xml b/stylesheets/lfs-l10n.xml index 568f981a9..3c90bd196 100644 --- a/stylesheets/lfs-l10n.xml +++ b/stylesheets/lfs-l10n.xml @@ -15,6 +15,7 @@ </l:l10n> + <!-- English --> <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en" english-language-name="English"> @@ -28,6 +29,19 @@ </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="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"> diff --git a/stylesheets/lfs-nochunks.xsl b/stylesheets/lfs-nochunks.xsl index 375f1d8cd..7093af7d0 100644 --- a/stylesheets/lfs-nochunks.xsl +++ b/stylesheets/lfs-nochunks.xsl @@ -5,13 +5,12 @@ version="1.0"> <!-- We use XHTML --> - <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/profile-docbook.xsl"/> + <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/profile-docbook.xsl"/> - <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet --> + <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet --> <xsl:output method="html" encoding="ISO-8859-1" indent="no" /> - + <!-- Including our others customized templates --> - <xsl:include href="xhtml/lfs-admon.xsl"/> <xsl:include href="xhtml/lfs-index.xsl"/> <xsl:include href="xhtml/lfs-mixed.xsl"/> <xsl:include href="xhtml/lfs-sections.xsl"/> @@ -25,6 +24,23 @@ <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"/> + + <!-- Changing the admonitions output tagging --> + <xsl:template name="nongraphical.admonition"> + <div class="{name(.)}"> + <div class ="admonhead"> + <h3 class="admontitle"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </h3> + </div> + <div class="admonbody"> + <xsl:apply-templates/> + </div> + </div> + </xsl:template> + <!-- To drop the remainig dot when title is empty (from lfs-titles.xsl)--> <xsl:template name="sect2.titlepage"> <xsl:choose> @@ -150,10 +166,6 @@ div.important h3, div.warning h3, div.caution h3 { color: #900; } -div.admonhead img { - display: none; -} - h3.admontitle { padding-left: 2.5em; padding-top: 1em; diff --git a/stylesheets/lfs-pdf.xsl b/stylesheets/lfs-pdf.xsl index 9ad7dc177..e9c15a21a 100644 --- a/stylesheets/lfs-pdf.xsl +++ b/stylesheets/lfs-pdf.xsl @@ -4,7 +4,7 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <!-- We use FO and FOP as the processor --> - <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/fo/docbook.xsl"/> + <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/fo/docbook.xsl"/> <xsl:param name="fop.extensions" select="1"/> <xsl:param name="draft.mode" select="'no'"/> @@ -19,13 +19,18 @@ <!-- This file contains our localization strings (for internationalization) --> <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/> - <!-- Paper size required by the publisher --> + <!-- Standart paper size --> + <xsl:param name="paper.type" select="'letter'"/> + + <!-- 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> + --> <!-- Printing Style --> - <xsl:param name="double.sided" select="1"/> + <!-- Change "double.sided" to "1" for published versions --> + <xsl:param name="double.sided" select="0"/> <xsl:param name="hyphenate">false</xsl:param> <xsl:param name="alignment">justify</xsl:param> diff --git a/stylesheets/lfs-profile.xsl b/stylesheets/lfs-profile.xsl index 7e63811e5..68dca215b 100644 --- a/stylesheets/lfs-profile.xsl +++ b/stylesheets/lfs-profile.xsl @@ -1,9 +1,35 @@ <?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"> - <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/profiling/profile.xsl"/> + <!-- Include common profiling stylesheet --> + <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.69.1/profiling/profile-mode.xsl"/> + + <!-- Generate DocBook instance with correct DOCTYPE --> + <xsl:output method="xml" + doctype-public="-//OASIS//DTD DocBook XML V4.4//EN" + doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"/> + + <!-- Profiling parameters --> + <xsl:param name="profile.arch" 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.userlevel" select="''"/> + <xsl:param name="profile.vendor" 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> diff --git a/stylesheets/lfs.css b/stylesheets/lfs.css index 68c23331d..bc4eea2cd 100644 --- a/stylesheets/lfs.css +++ b/stylesheets/lfs.css @@ -25,12 +25,12 @@ h3, h4, h5, h6 { color: #222; } -h1 { font-size: 173%; text-align: center; } -h2 { font-size: 144%; padding-top: 0.2em; margin-top: 0.3em; } -h2.subtitle { text-align: center; } -h3 { font-size: 120%; } -h4 { font-size: 110%;} -h5, h6 { font-size: 110%; font-style: italic; } +h1 { font-size: 173%; text-align: center; line-height: 1.2em; } +h2 { font-size: 144%; padding-top: 0.2em; margin-top: 0.3em; line-height: 1.2em; } +h2.subtitle { text-align: center; line-height: 1.2em; } +h3 { font-size: 120%; line-height: 1.2em; } +h4 { font-size: 110%; line-height: 1.2em; } +h5, h6 { font-size: 110%; font-style: italic; line-height: 1.2em; } /* Navigation */ div.headertitles h4 { @@ -185,15 +185,28 @@ dt { padding: 0; } -div.content dt { - list-style: none; -} - dd { margin: 0 0 1em 3em; padding: 0; } +table { + width: auto; + margin-left: 1em; +} + +td { + vertical-align: top; +} + +td span, td p { + margin: 0.3em; +} + +span.term { + display: block; +} + div.variablelist dd { margin-bottom: 1em; } @@ -202,16 +215,38 @@ div.variablelist dd p { margin-top: 0px; } -dl.materials dd { +div.materials dd { margin-left: 0px; } -div.segmentedlist { +div.package div.seg { + margin-bottom: 0em; + margin-top: 0em; + clear: left; +} + +div.package span.segtitle { + float: left; +} + +div.package span.seg { + display: block; + padding-left: 14em; +} + +div.content div.seg { + margin-bottom: 1em; margin-top: 1em; + clear: left; } -div.segmentedlist p { - margin: 0px auto; +div.content span.segtitle { + float: left; +} + +div.content span.seg { + display: block; + padding-left: 12em; } /* itemizedlist */ diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index a8496b6c0..8f99b7c1f 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -4,65 +4,53 @@ %general-entities; ]> -<!-- To work against BLFS some changes are needed --> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> - <xsl:param name="links.directory"> - <xsl:value-of select="substring-after('&patches-root;', 'patches/')"/> + <!-- Allow select the dest dir at runtime --> + <xsl:param name="dest.dir"> + <xsl:value-of select="concat('/home/httpd/', substring-after('&patches-root;', 'http://'))"/> </xsl:param> <xsl:template match="/"> - <xsl:text>#! /bin/bash
</xsl:text> - <xsl:text>
 cd /home/httpd/</xsl:text> - <xsl:value-of select="substring-after('&patches-root;', 'http://')"/> + <xsl:text>#! /bin/bash

</xsl:text> + <xsl:text> 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> - <xsl:text> rm -f *.patch &&

</xsl:text> + <!-- Touch a dummy patch to prevent fails if dest dir is empty, then remove old patches --> + <xsl:text> touch dummy.patch &&
 rm -f *.patch &&

</xsl:text> <xsl:apply-templates/> + <!-- Ensure correct owneship --> <xsl:text>
 chgrp lfswww *.patch &&
</xsl:text> <xsl:text>
 exit
</xsl:text> </xsl:template> - <xsl:template match="//text()"> - <xsl:text/> - </xsl:template> + <xsl:template match="//text()"/> <xsl:template match="//ulink"> - <xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')"> - <xsl:choose> - <xsl:when test="ancestor-or-self::*/@condition = 'pdf'"/> - <xsl:otherwise> - <xsl:text> cp </xsl:text> - <xsl:text>/home/httpd/</xsl:text> - <xsl:value-of select="substring-before (substring-after ('&patches-root;', 'http://'), $links.directory)"/> - <xsl:text>downloads/</xsl:text> - <xsl:if test="contains (@url, '-')"> - <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/> - <xsl:variable name="links.directory2" select="translate ($links.directory, '0123456789', '2222222222')"/> - <xsl:choose> - <xsl:when test="contains ($cut, ',')"> - <xsl:value-of select="substring-before (substring-after($cut, $links.directory2), ',2')"/> - </xsl:when> - <xsl:otherwise> - <xsl:choose> - <xsl:when test="contains ($cut, '-src-2')"> - <xsl:value-of select="substring-before (substring-after($cut, $links.directory2), '-src-2')"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="substring-before (substring-after($cut, $links.directory2), '-2')"/> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> - </xsl:if> - <xsl:text>/</xsl:text> - <xsl:value-of select="substring-after(@url, $links.directory)"/> - <xsl:text> . 
</xsl:text> - </xsl:otherwise> - </xsl:choose> + <!-- 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> cp /home/httpd/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> diff --git a/stylesheets/pdf/lfs-admon.xsl b/stylesheets/pdf/lfs-admon.xsl index 2872055fb..03325bd48 100644 --- a/stylesheets/pdf/lfs-admon.xsl +++ b/stylesheets/pdf/lfs-admon.xsl @@ -59,7 +59,7 @@ provisional-label-separation="18pt" xsl:use-attribute-sets="list.block.spacing"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> - <fo:block margin-left="4pt"> + <fo:block margin-left="18pt"> <fo:external-graphic width="auto" height="auto" content-width="{$graphic.width}" > <xsl:attribute name="src"> diff --git a/stylesheets/pdf/lfs-mixed.xsl b/stylesheets/pdf/lfs-mixed.xsl index 15fc55eaf..065128f1b 100644 --- a/stylesheets/pdf/lfs-mixed.xsl +++ b/stylesheets/pdf/lfs-mixed.xsl @@ -227,7 +227,7 @@ <xsl:text>• </xsl:text> <xsl:apply-templates select="term"/> </fo:block> - <fo:block margin-left="0.1in" text-align="left"> + <fo:block margin-left="1.4pc" text-align="left"> <xsl:apply-templates select="listitem"/> </fo:block> </xsl:when> diff --git a/stylesheets/pdf/lfs-pagesetup.xsl b/stylesheets/pdf/lfs-pagesetup.xsl index 7733b45e3..7e19099ce 100644 --- a/stylesheets/pdf/lfs-pagesetup.xsl +++ b/stylesheets/pdf/lfs-pagesetup.xsl @@ -64,8 +64,8 @@ <!-- Font size for chapter title. --> <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" - xsl:use-attribute-sets="chapter.titlepage.recto.style" + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" + 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]"/> @@ -76,6 +76,7 @@ <!-- Margins --> <xsl:param name="page.margin.inner">0.5in</xsl:param> <xsl:param name="page.margin.outer">0.375in</xsl:param> + <xsl:param name="body.start.indent" select="'0.7pc'"/> <xsl:param name="title.margin.left">-0.7pc</xsl:param> <xsl:attribute-set name="normal.para.spacing"> <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute> diff --git a/stylesheets/xhtml/lfs-legalnotice.xsl b/stylesheets/xhtml/lfs-legalnotice.xsl index ec28d09bc..bc677d8d1 100644 --- a/stylesheets/xhtml/lfs-legalnotice.xsl +++ b/stylesheets/xhtml/lfs-legalnotice.xsl @@ -34,9 +34,9 @@ <xsl:text>../index.html</xsl:text> </xsl:attribute> <xsl:attribute name="title"> - <xsl:value-of select="/book/info/title"/> + <xsl:value-of select="/book/bookinfo/title"/> <xsl:text> - </xsl:text> - <xsl:value-of select="/book/info/subtitle"/> + <xsl:value-of select="/book/bookinfo/subtitle"/> </xsl:attribute> <xsl:call-template name="navig.content"> <xsl:with-param name="direction" select="'home'"/> diff --git a/stylesheets/xhtml/lfs-mixed.xsl b/stylesheets/xhtml/lfs-mixed.xsl index 7ecdeed7f..50e4140f1 100644 --- a/stylesheets/xhtml/lfs-mixed.xsl +++ b/stylesheets/xhtml/lfs-mixed.xsl @@ -2,7 +2,6 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" - xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0"> <!-- screen --> @@ -34,34 +33,42 @@ </xsl:choose> </xsl:template> + <!-- segementedlist --> + <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> + <span class="segtitle"> + <xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/> + <xsl:text>: </xsl:text> + </span> + </strong> + <span class="seg"> + <xsl:apply-templates/> + </span> + </div> + </xsl:template> + <!-- variablelist --> <xsl:template match="variablelist"> - <div class="{name(.)}"> - <xsl:if test="title | bridgehead"> - <xsl:choose> - <xsl:when test="@role = 'materials'"> - <h2> - <xsl:value-of select="title | bridgehead"/> - </h2> - </xsl:when> - <xsl:otherwise> - <h3> - <xsl:value-of select="title | bridgehead"/> - </h3> - </xsl:otherwise> - </xsl:choose> - </xsl:if> - <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: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> + <!-- Body attributes --> <xsl:template name="body.attributes"> @@ -74,32 +81,25 @@ </xsl:template> <!-- External URLs in italic font --> - <xsl:template match="link" name="ulink"> - <xsl:choose> - <xsl:when test="@xlink:href"> - <a> - <xsl:if test="@xml:id"> - <xsl:attribute name="id"> - <xsl:value-of select="@xml:id"/> - </xsl:attribute> - </xsl:if> - <xsl:attribute name="href"><xsl:value-of select="@xlink:href"/></xsl:attribute> - <i> - <xsl:choose> - <xsl:when test="count(child::node())=0"> - <xsl:value-of select="@xlink:href"/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - </i> - </a> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="link"/> - </xsl:otherwise> - </xsl:choose> + <xsl:template match="ulink" name="ulink"> + <a> + <xsl:if test="@id"> + <xsl:attribute name="id"> + <xsl:value-of select="@id"/> + </xsl:attribute> + </xsl:if> + <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute> + <i> + <xsl:choose> + <xsl:when test="count(child::node())=0"> + <xsl:value-of select="@url"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </i> + </a> </xsl:template> <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and. diff --git a/stylesheets/xhtml/lfs-navigational.xsl b/stylesheets/xhtml/lfs-navigational.xsl index 732510e5f..bab237142 100644 --- a/stylesheets/xhtml/lfs-navigational.xsl +++ b/stylesheets/xhtml/lfs-navigational.xsl @@ -123,9 +123,9 @@ </xsl:call-template> </xsl:attribute> <xsl:attribute name="title"> - <xsl:value-of select="$home/info/title"/> + <xsl:value-of select="$home/bookinfo/title"/> <xsl:text> - </xsl:text> - <xsl:value-of select="$home/info/subtitle"/> + <xsl:value-of select="$home/bookinfo/subtitle"/> </xsl:attribute> <xsl:call-template name="navig.content"> <xsl:with-param name="direction" select="'home'"/> @@ -234,9 +234,9 @@ </xsl:call-template> </xsl:attribute> <xsl:attribute name="title"> - <xsl:value-of select="$home/info/title"/> + <xsl:value-of select="$home/bookinfo/title"/> <xsl:text> - </xsl:text> - <xsl:value-of select="$home/info/subtitle"/> + <xsl:value-of select="$home/bookinfo/subtitle"/> </xsl:attribute> <xsl:call-template name="navig.content"> <xsl:with-param name="direction" select="'home'"/> |