Subversion Repositories svn LFS-FR

Compare Revisions

Ignore whitespace Rev 656 → Rev 657

/trunk/blfs/stylesheets/blfs-print.css
File deleted
/trunk/blfs/stylesheets/blfs-tex.xsl
File deleted
/trunk/blfs/stylesheets/blfs.css
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-titles.xsl
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-toc.xsl
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-legalnotice.xsl
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-mixed.xsl
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-index.xsl
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-navigational.xsl
File deleted
/trunk/blfs/stylesheets/xhtml/lfs-admon.xsl
File deleted
/trunk/blfs/stylesheets/blfs-print.xsl
File deleted
/trunk/blfs/stylesheets/blfs-nochunks.xsl
0,0 → 1,25
<?xml version='1.0' encoding='ISO-8859-1'?>
 
<!--
$LastChangedBy: manuel $
$Date: 2008-08-30 13:59:04 $
-->
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
 
<!-- LFS top-level no-chunk templates. -->
<xsl:import href="lfs-xsl/nochunks.xsl"/>
 
<!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
<xsl:param name="book-type">blfs</xsl:param>
 
<!-- Are sections enumerated? 1 = yes, 0 = no
Note: Activating this will increase a lot rendering time. -->
<xsl:param name="section.autolabel" select="0"/>
 
<!-- Do section labels include the component label? 1 = yes, 0 = no -->
<xsl:param name="section.label.includes.component.label" select="0"/>
 
</xsl:stylesheet>
/trunk/blfs/stylesheets/blfs-pdf.xsl
1,59 → 1,25
<?xml version='1.0' encoding='ISO-8859-1'?>
 
<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org>
Based on the original lfs-pdf.xsl created by Matthew Burgess -->
<!--
$LastChangedBy: manuel $
$Date: 2008-08-30 13:59:04 $
-->
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
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.65.1/fo/docbook.xsl"/>
<xsl:param name="fop.extensions" select="1"/>
<xsl:param name="draft.mode" select="'no'"/>
<!-- LFS top-level pdf templates. -->
<xsl:import href="lfs-xsl/pdf.xsl"/>
 
<!-- Including our others customized templates -->
<xsl:include href="pdf/lfs-index.xsl"/>
<xsl:include href="pdf/lfs-pagesetup.xsl"/>
<!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
<xsl:param name="book-type">blfs</xsl:param>
 
<!-- Probably want to make the paper size configurable -->
<xsl:param name="paper.type" select="'letter'"/>
<!-- Are sections enumerated? 1 = yes, 0 = no
Note: Activating this will increase a lot rendering time. -->
<xsl:param name="section.autolabel" select="0"/>
 
<!-- Don't hyphenate -->
<xsl:param name="hyphenate">false</xsl:param>
<xsl:param name="alignment">left</xsl:param>
<!-- Do section labels include the component label? 1 = yes, 0 = no -->
<xsl:param name="section.label.includes.component.label" select="0"/>
 
<!-- Font size -->
<xsl:param name="body.font.master">8</xsl:param>
<xsl:param name="body.font.size">10pt</xsl:param>
 
<!-- Graphics in admonitions -->
<xsl:param name="admon.graphics" select="1"/>
 
<!-- Shade screen -->
<xsl:param name="shade.verbatim" select="1"/>
 
<!-- TOC generation -->
<xsl:param name="generate.toc">
book toc
part nop
</xsl:param>
<xsl:param name="toc.section.depth">1</xsl:param>
<xsl:param name="generate.section.toc.level" select="-1"/>
<xsl:param name="toc.indent.width" select="18"/>
 
<!-- Page number in Xref-->
<xsl:param name="insert.xref.page.number">yes</xsl:param>
<xsl:template match="*" mode="page.citation">
<xsl:param name="id" select="'???'"/>
<fo:inline keep-together.within-line="always">
<xsl:text>[p.</xsl:text>
<fo:page-number-citation ref-id="{$id}"/>
<xsl:text>]</xsl:text>
</fo:inline>
</xsl:template>
 
<!-- Prevent duplicate e-mails in the Acknowledgments pages-->
<xsl:param name="ulink.show" select="0"/>
 
</xsl:stylesheet>
/trunk/blfs/stylesheets/wget-list.xsl
0,0 → 1,99
<?xml version='1.0' encoding='ISO-8859-1'?>
 
<!--
$LastChangedBy: manuel $
$Date: 2008-08-30 13:59:04 $
-->
 
<!-- Create a list of upstream URLs for packages and patches to be used
with wget. -->
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
 
<xsl:output method="text"/>
 
<!-- Define the generated wget file type:
ftpmirror - the one used to check FTP mirrors (default)
full - the one used to test all download links found in the book
-->
<xsl:param name="list_mode" select="ftpmirror"/>
 
<xsl:template match="/">
<xsl:choose>
<xsl:when test="$list_mode = 'full'">
<xsl:apply-templates select="//ulink" mode="full"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//itemizedlist"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
 
<xsl:template match="itemizedlist">
<xsl:choose>
<!-- If both http and ftp URLs are available, output the ftp one if not empty,
otherwise output the http URL.-->
<xsl:when test="contains(listitem[1]/para,'(HTTP)')
and contains(listitem[2]/para,'(FTP)')">
<xsl:choose>
<xsl:when test="string-length(listitem[2]/para/ulink/@url) &gt; '10'">
<xsl:apply-templates select="listitem[2]/para/ulink"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="listitem[1]/para/ulink"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- Additional packages and patches.-->
<xsl:otherwise>
<xsl:apply-templates select="listitem/para/ulink"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
 
<xsl:template match="listitem/para/ulink">
<!-- The next strings need be revised periodically to add missing
files or to skip false positives. Skip also possible
duplicated URLs that may be splitted for PDF output -->
<xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
or contains(@url, '.tgz') or contains(@url, '.tar')
or contains(@url, 'patch.txt') or contains(@url, '.zip')
or contains(@url, '.patch') or contains(@url, '/patch.'))
and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:choose>
<!-- Fix SourceForge links-->
<xsl:when test="contains(@url,'?download')">
<xsl:value-of select="substring-before(@url,'?download')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&#x0a;</xsl:text>
</xsl:if>
</xsl:template>
 
<xsl:template match="ulink" mode="full">
<!-- The next strings need be revised periodically to add missing
files or to skip false positives. Skip also possible
duplicated URLs that may be splitted for PDF output -->
<xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
or contains(@url, '.tgz') or contains(@url, '.tar')
or contains(@url, '.txt') or contains(@url, 'compressdoc')
or contains(@url, '.zip') or contains(@url, '.patch')
or contains(@url, '/patch.') or contains(@url, 'md5sums')
or contains(@url, 'mozconfig'))
and not(contains(@url, '?url'))
and not(ancestor-or-self::*/@condition = 'pdf')">
<!-- To list all URls, included html files, wiki pages, home pages, and
mailto: links, comment-out the above xsl:if and uncomment the next one. -->
<!--
<xsl:if test="not(ancestor-or-self::*/@condition = 'pdf')">
-->
<xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text>
</xsl:if>
</xsl:template>
 
</xsl:stylesheet>
/trunk/blfs/stylesheets/patcheslist.xsl
0,0 → 1,96
<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
 
<!--
$LastChangedBy: randy $
$Date: 2008-08-30 13:59:04 $
-->
 
<!--
This stylesheet creates a script to copy the patches referenced
in the BLFS book from the patches repository to the blfs
download area. It is very specific to the installation on
the home server.
-->
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
 
<xsl:output method="text"/>
 
<!-- Allow select the dest dir at runtime -->
<xsl:param name="dest.dir">
<xsl:value-of select="concat('/srv/www/', substring-after('&patch-root;', 'http://'))"/>
</xsl:param>
 
<xsl:template match="/">
<xsl:text>#! /bin/bash&#x0a;&#x0a;</xsl:text>
<xsl:text>function copy
{
cp $1 $2 >>copyerrs 2>&amp;1
}&#x0a;&#x0a;</xsl:text>
<!-- Create dest.dir if it don't exist -->
<xsl:text>mkdir -p </xsl:text>
<xsl:value-of select="$dest.dir"/>
<xsl:text> &amp;&amp;&#x0a;</xsl:text>
<xsl:text>cd </xsl:text>
<xsl:value-of select="$dest.dir"/>
<xsl:text> &amp;&amp;&#x0a;&#x0a;</xsl:text>
<!-- Remove old patches and possible list of missing patches-->
<xsl:text>rm -f *.patch copyerrs &amp;&amp;&#x0a;&#x0a;</xsl:text>
<xsl:apply-templates/>
<!-- Ensure correct ownership -->
<xsl:text>&#x0a;chgrp lfswww *.patch &amp;&amp;&#x0a;</xsl:text>
<xsl:text>if [ `wc -l copyerrs|sed 's/ *//' |cut -f1 -d' '` -gt 0 ]; then
mail -s "Missing BLFS patches" blfs-book@linuxfromscratch.org &lt; copyerrs
fi</xsl:text>
<xsl:text>&#x0a;exit&#x0a;</xsl:text>
</xsl:template>
 
<xsl:template match="//text()"/>
 
<xsl:template match="//ulink">
<!-- Match only local patches links and skip duplicated URLs splitted for PDF output-->
<xsl:if test="contains(@url, '.patch') and contains(@url, '&patch-root;')
and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:variable name="patch.name" select="substring-after(@url, '&patch-root;')"/>
<xsl:text>copy /srv/www/www.linuxfromscratch.org/patches/downloads</xsl:text>
<xsl:choose>
<!-- cdparanoia -->
<xsl:when test="contains($patch.name, '-III')">
<xsl:text>/cdparanoia</xsl:text>
</xsl:when>
<!-- Open Office -->
<xsl:when test="contains($patch.name, 'OOo')">
<xsl:text>/OOo</xsl:text>
</xsl:when>
<!-- QT -->
<xsl:when test="contains($patch.name, 'qt-x')">
<xsl:text>/qt</xsl:text>
</xsl:when>
<!-- XOrg -->
<xsl:when test="contains($patch.name, 'X11R6')">
<xsl:text>/xorg</xsl:text>
</xsl:when>
<!-- General rule -->
<xsl:otherwise>
<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:value-of select="substring-before($patch.name2, '-0')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$patch.name"/>
<xsl:text> . &#x0a;</xsl:text>
</xsl:if>
</xsl:template>
 
</xsl:stylesheet>
 
/trunk/blfs/stylesheets/dump-commands.xsl
0,0 → 1,89
<?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">
 
<!--
$LastChangedBy: randy $
$Date: 2008-08-30 13:59:04 $
-->
 
<!-- 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>&#xA;</xsl:text>
<xsl:text># Run this as root</xsl:text>
<xsl:apply-templates select="userinput"/>
<xsl:text># End root commands</xsl:text>
<xsl:text>&#xA;</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>&#xA;</xsl:text>
<xsl:if test=".//replaceable">
<xsl:text># This block must be edited to suit your needs.</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
<xsl:if test=".//replaceable">
<xsl:text># End of editable block.</xsl:text>
</xsl:if>
<xsl:text>&#xA;</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>
/trunk/blfs/stylesheets/blfs-chunked.xsl
1,45 → 1,25
<?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>
Based on the original lfs-chunked.xsl created by Matthew Burgess -->
<!--
$LastChangedBy: manuel $
$Date: 2008-08-30 13:59:04 $
-->
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
 
<!-- We use XHTML -->
<!--
<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
-->
<xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/xhtml/chunk.xsl"/>
<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
<!-- Including our others customized templates -->
<xsl:include href="xhtml/lfs-admon.xsl"/>
<xsl:include href="xhtml/lfs-index.xsl"/>
<xsl:include href="xhtml/lfs-legalnotice.xsl"/>
<xsl:include href="xhtml/lfs-mixed.xsl"/>
<xsl:include href="xhtml/lfs-navigational.xsl"/>
<xsl:include href="xhtml/lfs-titles.xsl"/>
<xsl:include href="xhtml/lfs-toc.xsl"/>
<!-- LFS top-level chunk templates. -->
<xsl:import href="lfs-xsl/chunkfast.xsl"/>
 
<!-- The CSS Stylesheet -->
<xsl:param name="html.stylesheet" select="'../stylesheets/blfs.css'"/>
<!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
<xsl:param name="book-type">blfs</xsl:param>
 
<!-- Dropping some unwanted style attributes -->
<xsl:param name="ulink.target" select="''"></xsl:param>
<xsl:param name="css.decoration" select="0"></xsl:param>
<!-- No XML declaration -->
<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
<!-- Insert a stylesheet for printing -->
<xsl:template name='user.head.content'>
<link rel='stylesheet' href="../stylesheets/blfs-print.css" type="text/css" media='print'/>
</xsl:template>
<!-- Are sections enumerated? 1 = yes, 0 = no
Note: Activating this will increase a lot rendering time. -->
<xsl:param name="section.autolabel" select="0"/>
 
<xsl:template match="userinput">
<xsl:call-template name="inline.monoseq"/>
</xsl:template>
<!-- Do section labels include the component label? 1 = yes, 0 = no -->
<xsl:param name="section.label.includes.component.label" select="0"/>
 
</xsl:stylesheet>