Changeset 11b36cd
- Timestamp:
- 05/07/2004 08:18:37 PM (20 years ago)
- Children:
- 215e6dc
- Parents:
- ff979cd
- Files:
-
- 13 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
INSTALL
rff979cd r11b36cd 10 10 11 11 ------------------------------------------------------------------------------- 12 If all you want to do is convert XML to HTML performthe following:12 If all you want to do is convert XML to HTML install the following: 13 13 14 14 * libxml2 … … 24 24 - http://www.linuxfromscratch.org/blfs/view/cvs/pst/docbook-xsl.html 25 25 26 * HTML Tidy - http://tidy.sourceforge.net/src/tidy_src.tgz 27 28 /bin/sh build/gnuauto/setup.sh && 29 ./configure --prefix=/usr && 30 make && 31 su -c "make install" 32 26 33 ------------------------------------------------------------------------------- 27 34 If you want to be able to convert the book into PDF as well, then you will need 28 35 the FOP package. This takes an XSL-FO file (created with libxslt which you 29 already installed) and converts it to PDF: 36 already installed) and converts it to PDF. Additionally you will need 37 the Java Advanced Imaging (JAI) library from 38 http://java.sun.com/products/java-media/jai/downloads/download-1_1_2.html 39 (you'll need either the JDK .bin or JRE .bin file dependent on your 40 particular Java setup). 30 41 31 42 - http://www.apache.org/dist/xml/fop/fop-0.20.5-bin.tar.gz … … 37 48 mv fop-0.20.5 fop 38 49 50 Install JAI by running: 51 52 chmod u+x /path/to/jai-1_1_2-lib-linux-i586-jdk.bin && 53 cd $JAVA_HOME && 54 /path/to/jai-1_1_2-lib-linux-i586-jdk.bin 55 39 56 Now set JAVA_HOME, FOP_HOME and PATH to values appropriate to your system. -
Makefile
rff979cd r11b36cd 20 20 index.html part1.html part2.html part3.html longindex.html 21 21 22 sh goTidy $(BASEDIR)/ 23 22 24 pdf: 23 25 xsltproc --xinclude --nonet --output lfs.fo stylesheets/lfs-pdf.xsl \ … … 26 28 fop.sh lfs.fo lfs.pdf 27 29 30 print: 31 xsltproc --xinclude --nonet --output lfs-print.fo \ 32 stylesheets/lfs-print.xsl index.xml 33 sed -i -e "s/inherit/all/" lfs-print.fo 34 fop.sh lfs-print.fo lfs-print.pdf 35 28 36 validate: 29 37 xmllint --noout --nonet --xinclude --postvalid index.xml -
chapter01/changelog.xml
rff979cd r11b36cd 74 74 </listitem> 75 75 76 <listitem><para>May 7th, 2004 [matt]: Merged Manuel's lfs-xsl-0.9 patches</para> 77 </listitem> 76 78 <listitem><para>May 7th, 2004 [matt]: Fixed README error regarding invocation of 77 79 `make`</para></listitem> -
stylesheets/lfs-chunked.xsl
rff979cd r11b36cd 1 <?xml version='1.0'?> 1 <?xml version='1.0' encoding='ISO-8859-1'?> 2 3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> 4 Based on the original lfs-chunked.xsl created by Matthew Burgess --> 5 2 6 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 7 xmlns="http://www.w3.org/1999/xhtml" 4 8 version="1.0"> 5 9 6 <!-- We use XHTML -->10 <!-- We use XHTML --> 7 11 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/> 8 12 <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/> 13 14 <!-- Including our others customized templates --> 15 <xsl:include href="xhtml/lfs-admon.xsl"/> 16 <xsl:include href="xhtml/lfs-index.xsl"/> 17 <xsl:include href="xhtml/lfs-legalnotice.xsl"/> 18 <xsl:include href="xhtml/lfs-mixed.xsl"/> 19 <xsl:include href="xhtml/lfs-navigational.xsl"/> 20 <xsl:include href="xhtml/lfs-titles.xsl"/> 21 <xsl:include href="xhtml/lfs-toc.xsl"/> 9 22 10 <!-- The CSS Stylesheet -->23 <!-- The CSS Stylesheet --> 11 24 <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/> 12 25 13 <!-- Include our customised templates --> 14 <xsl:include href="xhtml/lfs-toc.xsl"/> 15 <xsl:include href="xhtml/lfs-index.xsl"/> 16 17 <!-- Use graphics in admonitions --> 18 <xsl:param name="admon.graphics" select="1"/> 19 <xsl:param name="admon.graphics.path">../images/</xsl:param> 20 <xsl:param name="admon.graphics.extension" select="'.png'"/> 21 22 <!-- Legal Notice stuff --> 23 <xsl:param name="generate.legalnotice.link" select="1"/> 24 <xsl:template match="legalnotice" mode="titlepage.mode"> 25 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> 26 <xsl:choose> 27 <xsl:when test="$generate.legalnotice.link != 0"> 28 <xsl:variable name="filename"> 29 <xsl:call-template name="make-relative-filename"> 30 <xsl:with-param name="base.dir" select="''"/> 31 <xsl:with-param name="base.name" select="concat($base.dir, 'prologue/legalnotice.html')"/> 32 </xsl:call-template> 33 </xsl:variable> 34 <xsl:variable name="title"> 35 <xsl:apply-templates select="." mode="title.markup"/> 36 </xsl:variable> 37 <xsl:element name="a"> 38 <xsl:attribute name="href"> 39 <xsl:value-of select="'prologue/legalnotice.html'"/> 40 </xsl:attribute> 41 <xsl:copy-of select="$title"/> 42 </xsl:element> 43 <xsl:call-template name="write.chunk"> 44 <xsl:with-param name="filename" select="$filename"/> 45 <xsl:with-param name="quiet" select="$chunk.quietly"/> 46 <xsl:with-param name="content"> 47 <html> 48 <head> 49 <xsl:call-template name="system.head.content"/> 50 <xsl:call-template name="head.content"/> 51 <xsl:call-template name="user.head.content"/> 52 </head> 53 <body> 54 <xsl:call-template name="body.attributes"/> 55 <div class="{local-name(.)}"> 56 <xsl:apply-templates mode="titlepage.mode"/> 57 </div> 58 </body> 59 </html> 60 </xsl:with-param> 61 </xsl:call-template> 62 </xsl:when> 63 <xsl:otherwise> 64 <div class="{local-name(.)}"> 65 <xsl:apply-templates mode="titlepage.mode"/> 66 </div> 67 </xsl:otherwise> 68 </xsl:choose> 69 </xsl:template> 70 71 <!--TOC stuff--> 72 <xsl:param name="generate.toc"> 73 appendix toc 74 book toc,title,figure,table,example,equation 75 chapter nop 76 part toc 77 preface nop 78 qandadiv nop 79 qandaset nop 80 reference nop 81 sect1 nop 82 sect2 nop 83 sect3 nop 84 sect4 nop 85 sect5 nop 86 section nop 87 set nop 88 </xsl:param> 89 <xsl:param name="toc.section.depth">1</xsl:param> 90 <xsl:param name="toc.max.depth">3</xsl:param> 26 <!-- Dropping some unwanted style attributes --> 27 <xsl:param name="ulink.target" select="''"></xsl:param> 28 <xsl:param name="css.decoration" select="0"></xsl:param> 29 30 <!-- No XML declaration --> 31 <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/> 91 32 92 33 </xsl:stylesheet> -
stylesheets/lfs-pdf.xsl
rff979cd r11b36cd 1 <?xml version='1.0'?> 1 <?xml version='1.0' encoding='ISO-8859-1'?> 2 3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> 4 Based on the original lfs-pdf.xsl created by Matthew Burgess --> 5 2 6 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 7 xmlns:fo="http://www.w3.org/1999/XSL/Format" 4 xmlns="http://www.w3.org/1999/xhtml"5 8 version="1.0"> 6 9 … … 9 12 <xsl:param name="fop.extensions" select="1"/> 10 13 <xsl:param name="draft.mode" select="'no'"/> 14 15 <!-- Including our others customized templates --> 16 <xsl:include href="pdf/lfs-index.xsl"/> 17 <xsl:include href="pdf/lfs-pagesetup.xsl"/> 18 11 19 <!-- Probably want to make the paper size configurable --> 12 20 <xsl:param name="paper.type" select="'A4'"/> 13 21 14 <!-- Include our customised templates --> 15 <xsl:include href="pdf/lfs-index.xsl"/> 22 <!-- Don't hyphenate --> 23 <xsl:param name="hyphenate">false</xsl:param> 24 <xsl:param name="alignment">left</xsl:param> 16 25 17 26 <!-- Font size --> … … 19 28 <xsl:param name="body.font.size">10pt</xsl:param> 20 29 21 <!-- Margins -->22 <xsl:param name=" page.margin.inner">1in</xsl:param>23 <xsl:param name=" page.margin.outer">0.5in</xsl:param>24 <xsl:param name="title.margin.left">-1pc</xsl:param>30 <!-- Graphics in admonitions --> 31 <xsl:param name="admon.graphics" select="1"/> 32 <xsl:param name="admon.graphics.path" 33 select="'/usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/'"/> 25 34 26 <!-- TOC stuff --> 35 <!-- Shade screen --> 36 <xsl:param name="shade.verbatim" select="1"/> 37 38 <!-- TOC generation --> 27 39 <xsl:param name="generate.toc"> 28 40 book toc … … 30 42 </xsl:param> 31 43 <xsl:param name="toc.section.depth">1</xsl:param> 32 <xsl:param name="generate.section.toc.level" select="-1"></xsl:param> 33 <xsl:param name="toc.indent.width" select="18"></xsl:param> 34 35 <!-- Force section1's onto a new page --> 36 <xsl:attribute-set name="section.level1.properties"> 37 <xsl:attribute name="break-after">page</xsl:attribute> 38 </xsl:attribute-set> 39 40 <!-- Columns in appendix --> 41 <xsl:param name="column.count.back" select="2"/> 42 43 <!-- Don't hyphenate --> 44 <xsl:param name="hyphenate">false</xsl:param> 45 <xsl:param name="alignment">left</xsl:param> 44 <xsl:param name="generate.section.toc.level" select="-1"/> 45 <xsl:param name="toc.indent.width" select="18"/> 46 46 47 47 <!-- Page number in Xref--> 48 48 <xsl:param name="insert.xref.page.number">yes</xsl:param> 49 <xsl:template match="xref" name="xref"> 50 <xsl:variable name="targets" select="key('id',@linkend)"/> 51 <xsl:variable name="target" select="$targets[1]"/> 52 <xsl:variable name="refelem" select="local-name($target)"/> 53 <xsl:call-template name="check.id.unique"> 54 <xsl:with-param name="linkend" select="@linkend"/> 55 </xsl:call-template> 56 <xsl:choose> 57 <xsl:when test="$refelem=''"> 58 <xsl:message> 59 <xsl:text>XRef to nonexistent id: </xsl:text> 60 <xsl:value-of select="@linkend"/> 61 </xsl:message> 62 <xsl:text>???</xsl:text> 63 </xsl:when> 64 <xsl:when test="@endterm"> 65 <fo:basic-link internal-destination="{@linkend}" 66 xsl:use-attribute-sets="xref.properties"> 67 <xsl:variable name="etargets" select="key('id',@endterm)"/> 68 <xsl:variable name="etarget" select="$etargets[1]"/> 69 <xsl:choose> 70 <xsl:when test="count($etarget) = 0"> 71 <xsl:message> 72 <xsl:value-of select="count($etargets)"/> 73 <xsl:text>Endterm points to nonexistent ID: </xsl:text> 74 <xsl:value-of select="@endterm"/> 75 </xsl:message> 76 <xsl:text>???</xsl:text> 77 </xsl:when> 78 <xsl:otherwise> 79 <xsl:apply-templates select="$etarget" mode="endterm"/> 80 </xsl:otherwise> 81 </xsl:choose> 82 </fo:basic-link> 83 </xsl:when> 84 <xsl:when test="$target/@xreflabel"> 85 <fo:basic-link internal-destination="{@linkend}" 86 xsl:use-attribute-sets="xref.properties"> 87 <xsl:call-template name="xref.xreflabel"> 88 <xsl:with-param name="target" select="$target"/> 89 </xsl:call-template> 90 </fo:basic-link> 91 </xsl:when> 92 <xsl:otherwise> 93 <fo:basic-link internal-destination="{@linkend}" 94 xsl:use-attribute-sets="xref.properties"> 95 <xsl:apply-templates select="$target" mode="xref-to"> 96 <xsl:with-param name="referrer" select="."/> 97 <xsl:with-param name="xrefstyle"> 98 <xsl:choose> 99 <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0"> 100 <xsl:value-of select="@role"/> 101 </xsl:when> 102 <xsl:otherwise> 103 <xsl:value-of select="@xrefstyle"/> 104 </xsl:otherwise> 105 </xsl:choose> 106 </xsl:with-param> 107 </xsl:apply-templates> 108 </fo:basic-link> 109 </xsl:otherwise> 110 </xsl:choose> 111 <xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != '' 112 and (contains(@xrefstyle, 'page') 113 or contains(@xrefstyle, 'Page'))) 114 and ( $insert.xref.page.number = 'yes' 115 or $insert.xref.page.number = '1') 116 or local-name($target) = 'para'"> 117 <fo:basic-link internal-destination="{@linkend}" 118 xsl:use-attribute-sets="xref.properties"> 119 <xsl:text>, p. </xsl:text> 120 <xsl:apply-templates select="$target" mode="page.citation"> 121 <xsl:with-param name="id" select="@linkend"/> 122 </xsl:apply-templates> 123 </fo:basic-link> 124 </xsl:if> 49 <xsl:template match="*" mode="page.citation"> 50 <xsl:param name="id" select="'???'"/> 51 <fo:inline keep-together.within-line="always"> 52 <xsl:text>[p.</xsl:text> 53 <fo:page-number-citation ref-id="{$id}"/> 54 <xsl:text>]</xsl:text> 55 </fo:inline> 125 56 </xsl:template> 126 57 -
stylesheets/lfs.css
rff979cd r11b36cd 1 1 body { 2 2 font-weight: normal; 3 font-size: normal;3 font-size: medium; 4 4 font-family: verdana, tahoma, helvetica, arial, sans-serif; 5 5 text-align: left; 6 6 } 7 7 8 div.navheader table{9 font-size: smaller;8 .toc ul, .index ul { 9 list-style: none; 10 10 } 11 11 12 div.navfooter table { 13 font-size: smaller; 12 .navheader, .navfooter { 13 font-size: smaller; 14 text-align: center; 14 15 } 15 16 16 div.navheader img { 17 border: medium none; 17 div.navheader ul li, div.navfooter ul li { 18 display: inline; 19 padding: 4em; 18 20 } 19 21 20 div.navfooter img{21 border: medium none;22 li.preface { 23 margin-left: 2.5em; 22 24 } 23 25 … … 69 71 } 70 72 71 div.warning { 72 border: 1px solid; 73 div.admonition { 74 border: medium solid; 75 width: 90%; 76 margin: .5em auto; 73 77 } 74 78 75 div.note { 76 border: 1px solid; 79 div.admonhead h3 { 80 display: inline; 81 margin-left: 1.5em; 77 82 } 78 83 79 div.important { 80 border: 1px solid; 81 } 82 83 div.caution { 84 border: 1px solid; 85 } 86 87 div.warning h3.title { 88 text-align: center 89 } 90 91 div.warning p { 92 padding-left: 0.2in 93 } 94 95 div.note { 96 padding-left: 0.2in 97 } 98 99 div.important { 100 padding-left: 0.2in 101 } 102 103 div.caution { 104 padding-left: 0.2in 84 div.admonbody { 85 margin: .5em; 105 86 } 106 87 … … 119 100 float: left; 120 101 } 121 122 .toc ul, .index ul, .navheader ul, .navfooter ul {123 list-style: none;124 } -
stylesheets/pdf/lfs-index.xsl
rff979cd r11b36cd 4 4 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> 5 5 <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> 6 <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> 6 7 <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> 8 <!ENTITY sep '" "'> 7 9 ]> 8 10 9 <!-- Version 0. 8.0- Manuel Canales Esparcia <macana@lfs-es.org> -->11 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> --> 10 12 11 13 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … … 13 15 version="1.0"> 14 16 15 <!--Index Stuff--> 16 17 <!--Only one column to fit the targets titles--> 18 <xsl:param name="column.count.index" select="1"></xsl:param> 17 <!--Only one column to fit the table layout--> 18 <xsl:param name="column.count.index" select="1"/> 19 19 20 20 <!--Title--> 21 21 <xsl:template match="index" mode="title.markup"> 22 <xsl:param name="allow-anchors" select="0"/>23 22 <xsl:text>Index of packages and important installed files</xsl:text> 24 23 </xsl:template> … … 39 38 <xsl:when test="$divtitle = 'A'"> 40 39 <xsl:text>Packages</xsl:text> 41 </xsl:when>42 <xsl:when test="$divtitle = 'B'">43 <xsl:text>Programs</xsl:text>44 </xsl:when>45 <xsl:when test="$divtitle = 'C'">46 <xsl:text>Libraries</xsl:text>47 </xsl:when>48 <xsl:when test="$divtitle = 'D'">49 <xsl:text>Scripts</xsl:text>50 </xsl:when>51 <xsl:when test="$divtitle = 'E'">52 <xsl:text>Others</xsl:text>53 </xsl:when>54 <xsl:otherwise>55 <xsl:value-of select="$divtitle"/>56 </xsl:otherwise>57 </xsl:choose>40 </xsl:when> 41 <xsl:when test="$divtitle = 'B'"> 42 <xsl:text>Programs</xsl:text> 43 </xsl:when> 44 <xsl:when test="$divtitle = 'C'"> 45 <xsl:text>Libraries</xsl:text> 46 </xsl:when> 47 <xsl:when test="$divtitle = 'D'"> 48 <xsl:text>Scripts</xsl:text> 49 </xsl:when> 50 <xsl:when test="$divtitle = 'E'"> 51 <xsl:text>Others</xsl:text> 52 </xsl:when> 53 <xsl:otherwise> 54 <xsl:value-of select="$divtitle"/> 55 </xsl:otherwise> 56 </xsl:choose> 58 57 </xsl:with-param> 59 58 </xsl:call-template> 60 59 </xsl:if> 61 <fo:block> 62 <xsl:apply-templates select="key('letter', $key)[&scope;] 63 [count(.|key('primary', &primary;)[&scope;][1])=1]" 64 mode="index-primary"> 65 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 66 <xsl:with-param name="scope" select="$scope"/> 67 </xsl:apply-templates> 68 </fo:block> 60 <fo:table table-layout="fixed" width="100%"> 61 <fo:table-column column-number="1" column-width="11em"/> 62 <fo:table-column column-number="2" column-width="19em"/> 63 <fo:table-column column-number="3"/> 64 <fo:table-body> 65 <xsl:apply-templates select="key('letter', $key)[&scope;] 66 [count(.|key('primary', &primary;)[&scope;][1])=1]" 67 mode="index-primary"> 68 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 69 <xsl:with-param name="scope" select="$scope"/> 70 </xsl:apply-templates> 71 </fo:table-body> 72 </fo:table> 69 73 </fo:block> 70 74 </xsl:if> 71 75 </xsl:template> 72 76 73 <!-- The separator-->77 <!-- Dropping the separator from here --> 74 78 <xsl:template match="indexterm" mode="reference"> 75 79 <xsl:param name="scope" select="."/> 76 <xsl:text>: </xsl:text>77 80 <xsl:call-template name="reference"> 78 81 <xsl:with-param name="zones" select="normalize-space(@zone)"/> 79 82 <xsl:with-param name="scope" select="$scope"/> 80 83 </xsl:call-template> 84 </xsl:template> 85 86 <!-- Changing the output tags and re-addind the separator--> 87 <xsl:template match="indexterm" mode="index-primary"> 88 <xsl:param name="scope" select="."/> 89 <xsl:variable name="key" select="&primary;"/> 90 <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> 91 <fo:table-row> 92 <fo:table-cell> 93 <fo:block> 94 <xsl:value-of select="primary"/> 95 <xsl:text>: </xsl:text> 96 </fo:block> 97 </fo:table-cell> 98 <xsl:for-each select="$refs[not(see) and not(seealso) 99 and not(secondary)]"> 100 <xsl:apply-templates select="." mode="reference"> 101 <xsl:with-param name="scope" select="$scope"/> 102 </xsl:apply-templates> 103 </xsl:for-each> 104 </fo:table-row> 105 <xsl:if test="$refs/secondary"> 106 <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', 107 concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary"> 108 <xsl:with-param name="scope" select="$scope"/> 109 <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> 110 </xsl:apply-templates> 111 </xsl:if> 112 </xsl:template> 113 114 <xsl:template match="indexterm" mode="index-secondary"> 115 <xsl:param name="scope" select="."/> 116 <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> 117 <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> 118 <fo:table-row> 119 <fo:table-cell> 120 <fo:block start-indent="1pc"> 121 <xsl:value-of select="secondary"/> 122 <xsl:text>: </xsl:text> 123 </fo:block> 124 </fo:table-cell> 125 <xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]"> 126 <xsl:apply-templates select="." mode="reference"> 127 <xsl:with-param name="scope" select="$scope"/> 128 </xsl:apply-templates> 129 </xsl:for-each> 130 </fo:table-row> 81 131 </xsl:template> 82 132 … … 101 151 </xsl:call-template> 102 152 </xsl:variable> 103 <fo:basic-link internal-destination="{$id}"> 104 <xsl:value-of select="$target/title"/> 105 <xsl:apply-templates select="$target" mode="page.citation"> 106 <xsl:with-param name="id" select="$id"/> 107 </xsl:apply-templates> 108 </fo:basic-link> 109 <xsl:text>, </xsl:text> 110 <fo:basic-link internal-destination="{$id2}"> 111 <xsl:text>description</xsl:text> 112 <xsl:apply-templates select="$target2" mode="page.citation"> 113 <xsl:with-param name="id" select="$id2"/> 114 </xsl:apply-templates> 115 </fo:basic-link> 153 <fo:table-cell> 154 <fo:block> 155 <fo:basic-link internal-destination="{$id}"> 156 <xsl:value-of select="$target/title"/> 157 <xsl:apply-templates select="$target" mode="page.citation"> 158 <xsl:with-param name="id" select="$id"/> 159 </xsl:apply-templates> 160 </fo:basic-link> 161 </fo:block> 162 </fo:table-cell> 163 <fo:table-cell> 164 <fo:block> 165 <fo:basic-link internal-destination="{$id2}"> 166 <xsl:text>description</xsl:text> 167 <xsl:apply-templates select="$target2" mode="page.citation"> 168 <xsl:with-param name="id" select="$id2"/> 169 </xsl:apply-templates> 170 </fo:basic-link> 171 </fo:block> 172 </fo:table-cell> 116 173 </xsl:when> 117 174 <xsl:otherwise> … … 123 180 </xsl:call-template> 124 181 </xsl:variable> 125 <fo:basic-link internal-destination="{$id}"> 126 <xsl:value-of select="$target/title"/> 127 <xsl:apply-templates select="$target" mode="page.citation"> 128 <xsl:with-param name="id" select="$id"/> 129 </xsl:apply-templates> 130 </fo:basic-link> 182 <fo:table-cell> 183 <fo:block> 184 <fo:basic-link internal-destination="{$id}"> 185 <xsl:value-of select="$target/title"/> 186 <xsl:apply-templates select="$target" mode="page.citation"> 187 <xsl:with-param name="id" select="$id"/> 188 </xsl:apply-templates> 189 </fo:basic-link> 190 </fo:block> 191 </fo:table-cell> 131 192 </xsl:otherwise> 132 193 </xsl:choose> -
stylesheets/xhtml/lfs-index.xsl
rff979cd r11b36cd 7 7 ]> 8 8 9 <!-- Version 0. 8.0- Manuel Canales Esparcia <macana@lfs-es.org> -->9 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> --> 10 10 11 11 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 12 12 xmlns="http://www.w3.org/1999/xhtml" 13 13 version="1.0"> 14 15 <!--Index Stuff-->16 14 17 15 <!--Filename--> … … 21 19 22 20 <!--Title--> 21 <xsl:param name="index-title">Index of packages and important installed files</xsl:param> 22 23 23 <xsl:template match="index" mode="title.markup"> 24 <xsl:param name="allow-anchors" select="0"/> 25 <xsl:text>Index of packages and important installed files</xsl:text> 24 <xsl:value-of select="$index-title"/> 26 25 </xsl:template> 26 27 <xsl:template name="index.titlepage"> 28 <div class="titlepage"> 29 <h1 class="index"> 30 <xsl:value-of select="$index-title"/> 31 </h1> 32 </div> 33 </xsl:template> 27 34 28 35 <!--Divisions--> … … 110 117 </li> 111 118 </xsl:template> 119 112 120 <xsl:template match="indexterm" mode="index-secondary"> 113 121 <xsl:param name="scope" select="."/> … … 174 182 </xsl:choose> 175 183 </xsl:template> 184 185 <!-- Dropping unneeded anchors --> 186 <xsl:template match="indexterm"/> 176 187 177 188 </xsl:stylesheet> -
stylesheets/xhtml/lfs-toc.xsl
rff979cd r11b36cd 1 1 <?xml version='1.0' encoding='ISO-8859-1'?> 2 2 3 <!-- Version 0. 8.0- Manuel Canales Esparcia <macana@lfs-es.org> -->3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> --> 4 4 5 5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 6 6 xmlns="http://www.w3.org/1999/xhtml" 7 7 version="1.0"> 8 9 10 <!--TOC stuff--> 8 9 <!-- General settings --> 11 10 <xsl:param name="generate.toc"> 12 11 appendix toc … … 30 29 31 30 <xsl:param name="toc.max.depth">3</xsl:param> 32 33 <!-- Type of list--> 34 <xsl:param name="toc.list.type">ul</xsl:param> 31 32 <!-- Making the TOC --> 33 <xsl:template name="make.toc"> 34 <xsl:param name="toc-context" select="."/> 35 <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> 36 <xsl:if test="$nodes"> 37 <div class="toc"> 38 <h3> 39 <xsl:call-template name="gentext"> 40 <xsl:with-param name="key">TableofContents</xsl:with-param> 41 </xsl:call-template> 42 </h3> 43 <ul> 44 <xsl:apply-templates select="$nodes" mode="toc"> 45 <xsl:with-param name="toc-context" select="$toc-context"/> 46 </xsl:apply-templates> 47 </ul> 48 </div> 49 </xsl:if> 50 </xsl:template> 51 52 <!-- Making the subtocs --> 53 <xsl:template name="subtoc"> 54 <xsl:param name="toc-context" select="."/> 55 <xsl:param name="nodes" select="NOT-AN-ELEMENT"/> 56 <xsl:variable name="subtoc"> 57 <ul> 58 <xsl:apply-templates mode="toc" select="$nodes"> 59 <xsl:with-param name="toc-context" select="$toc-context"/> 60 </xsl:apply-templates> 61 </ul> 62 </xsl:variable> 63 <xsl:variable name="depth"> 64 <xsl:choose> 65 <xsl:when test="local-name(.) = 'sect1'">1</xsl:when> 66 <xsl:otherwise>0</xsl:otherwise> 67 </xsl:choose> 68 </xsl:variable> 69 <xsl:variable name="depth.from.context" 70 select="count(ancestor::*)-count($toc-context/ancestor::*)"/> 71 <li class="{name(.)}"> 72 <xsl:call-template name="toc.line"> 73 <xsl:with-param name="toc-context" select="$toc-context"/> 74 </xsl:call-template> 75 <xsl:if test="$toc.section.depth > $depth and count($nodes)>0 76 and $toc.max.depth > $depth.from.context"> 77 <xsl:copy-of select="$subtoc"/> 78 </xsl:if> 79 </li> 80 </xsl:template> 35 81 36 82 <!--Adding the h* tags and dropping redundats links--> … … 41 87 <xsl:choose> 42 88 <xsl:when test="local-name(.) = 'sect1'"> 43 <span> 44 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute> 45 <a> 89 <a> 90 <xsl:attribute name="href"> 91 <xsl:call-template name="href.target"> 92 <xsl:with-param name="context" select="$toc-context"/> 93 </xsl:call-template> 94 </xsl:attribute> 95 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 96 </a> 97 </xsl:when> 98 <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'"> 99 <h4> 100 <xsl:variable name="label"> 101 <xsl:apply-templates select="." mode="label.markup"/> 102 </xsl:variable> 103 <xsl:copy-of select="$label"/> 104 <xsl:if test="$label != ''"> 105 <xsl:value-of select="$autotoc.label.separator"/> 106 </xsl:if> 107 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 108 </h4> 109 </xsl:when> 110 <xsl:when test="local-name(.) = 'part'"> 111 <h3> 112 <xsl:variable name="label"> 113 <xsl:apply-templates select="." mode="label.markup"/> 114 </xsl:variable> 115 <xsl:copy-of select="$label"/> 116 <xsl:if test="$label != ''"> 117 <xsl:value-of select="$autotoc.label.separator"/> 118 </xsl:if> 119 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 120 </h3> 121 </xsl:when> 122 <xsl:otherwise> 123 <h3> 124 <a> 46 125 <xsl:attribute name="href"> 47 126 <xsl:call-template name="href.target"> … … 49 128 </xsl:call-template> 50 129 </xsl:attribute> 51 <xsl:apply-templates select="." mode="titleabbrev.markup"/>52 </a>53 </span>54 </xsl:when>55 <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">56 <h4>57 <span>58 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>59 130 <xsl:variable name="label"> 60 131 <xsl:apply-templates select="." mode="label.markup"/> … … 65 136 </xsl:if> 66 137 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 67 </span> 68 </h4> 69 </xsl:when> 70 <xsl:when test="local-name(.) = 'part'"> 71 <h3> 72 <span> 73 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute> 74 <xsl:variable name="label"> 75 <xsl:apply-templates select="." mode="label.markup"/> 76 </xsl:variable> 77 <xsl:copy-of select="$label"/> 78 <xsl:if test="$label != ''"> 79 <xsl:value-of select="$autotoc.label.separator"/> 80 </xsl:if> 81 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 82 </span> 83 </h3> 84 </xsl:when> 85 <xsl:otherwise> 86 <h3> 87 <span> 88 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute> 89 <a> 90 <xsl:attribute name="href"> 91 <xsl:call-template name="href.target"> 92 <xsl:with-param name="context" select="$toc-context"/> 93 </xsl:call-template> 94 </xsl:attribute> 95 <xsl:variable name="label"> 96 <xsl:apply-templates select="." mode="label.markup"/> 97 </xsl:variable> 98 <xsl:copy-of select="$label"/> 99 <xsl:if test="$label != ''"> 100 <xsl:value-of select="$autotoc.label.separator"/> 101 </xsl:if> 102 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 103 </a> 104 </span> 138 </a> 105 139 </h3> 106 140 </xsl:otherwise>
Note:
See TracChangeset
for help on using the changeset viewer.