aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/xhtml
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2007-07-05 22:28:14 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2007-07-05 22:28:14 +0000
commit3a1e4220080239c9fb9e2c9bae0ff2d192be7324 (patch)
treeff2e569687da750b66ea7223eaadd147de9ad8e3 /stylesheets/xhtml
parent369d8b1904a8b83f31c180a17d3fe260968c1cd7 (diff)
Removed old xsl files.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8200 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/xhtml')
-rw-r--r--stylesheets/xhtml/lfs-admon.xsl46
-rw-r--r--stylesheets/xhtml/lfs-index.xsl202
-rw-r--r--stylesheets/xhtml/lfs-legalnotice.xsl80
-rw-r--r--stylesheets/xhtml/lfs-mixed.xsl264
-rw-r--r--stylesheets/xhtml/lfs-navigational.xsl255
-rw-r--r--stylesheets/xhtml/lfs-sections.xsl143
-rw-r--r--stylesheets/xhtml/lfs-titles.xsl117
-rw-r--r--stylesheets/xhtml/lfs-toc.xsl159
-rw-r--r--stylesheets/xhtml/lfs-xref.xsl270
9 files changed, 0 insertions, 1536 deletions
diff --git a/stylesheets/xhtml/lfs-admon.xsl b/stylesheets/xhtml/lfs-admon.xsl
deleted file mode 100644
index 9b03394a9..000000000
--- a/stylesheets/xhtml/lfs-admon.xsl
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!-- Use graphics in admonitions -->
- <xsl:param name="admon.graphics" select="1"/>
- <xsl:param name="admon.graphics.path">../images/</xsl:param>
- <xsl:param name="admon.graphics.extension" select="'.png'"/>
-
- <!-- Changing the output tagging -->
- <xsl:template name="graphical.admonition">
- <xsl:variable name="admon.type">
- <xsl:choose>
- <xsl:when test="local-name(.)='note'">Note</xsl:when>
- <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
- <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
- <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
- <xsl:when test="local-name(.)='important'">Important</xsl:when>
- <xsl:otherwise>Note</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="alt">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="$admon.type"/>
- </xsl:call-template>
- </xsl:variable>
- <div class="{name(.)}">
- <div class ="admonhead">
- <img alt="[{$alt}]">
- <xsl:attribute name="src">
- <xsl:call-template name="admon.graphic"/>
- </xsl:attribute>
- </img>
- <h3 class="admontitle">
- <xsl:apply-templates select="." mode="object.title.markup"/>
- </h3>
- </div>
- <div class="admonbody">
- <xsl:apply-templates/>
- </div>
- </div>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-index.xsl b/stylesheets/xhtml/lfs-index.xsl
deleted file mode 100644
index 15f1f07ec..000000000
--- a/stylesheets/xhtml/lfs-index.xsl
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
-<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
-<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
-<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
-]>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!--Filename-->
- <xsl:template match="index" mode="recursive-chunk-filename">
- <xsl:text>longindex.html</xsl:text>
- </xsl:template>
-
- <!--Title-->
- <xsl:param name="index-title">Index</xsl:param>
-
- <xsl:template match="index" mode="title.markup">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="$index-title"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="index.titlepage">
- <div class="titlepage">
- <h1 class="index">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="$index-title"/>
- </xsl:call-template>
- </h1>
- </div>
- </xsl:template>
-
- <!--Divisions-->
- <xsl:template match="indexterm" mode="index-div">
- <xsl:param name="scope" select="."/>
- <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
- <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
- <!-- Make sure that we don't generate a div if there are no terms in scope -->
- <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
- <div class="indexdiv">
- <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
- <h2>
- <xsl:choose>
- <xsl:when test="$divtitle = 'A'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Packages</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$divtitle = 'B'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Programs</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$divtitle = 'C'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Libraries</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$divtitle = 'D'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Scripts</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$divtitle = 'E'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Others</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$divtitle"/>
- </xsl:otherwise>
- </xsl:choose>
- </h2>
- </xsl:if>
- <ul>
- <xsl:apply-templates select="key('letter', $key)[&scope;]
- [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary">
- <xsl:with-param name="scope" select="$scope"/>
- <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
- </xsl:apply-templates>
- </ul>
- </div>
- </xsl:if>
- </xsl:template>
-
- <!-- Dropping the separator from here-->
- <xsl:template match="indexterm" mode="reference">
- <xsl:param name="scope" select="."/>
- <xsl:call-template name="reference">
- <xsl:with-param name="zones" select="normalize-space(@zone)"/>
- <xsl:with-param name="scope" select="$scope"/>
- </xsl:call-template>
- </xsl:template>
-
- <!-- Changing the output tags and re-addind the separator-->
- <xsl:template match="indexterm" mode="index-primary">
- <xsl:param name="scope" select="."/>
- <xsl:variable name="key" select="&primary;"/>
- <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
- <li>
- <strong class="item">
- <xsl:value-of select="primary"/>
- <xsl:text>: </xsl:text>
- </strong>
- <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
- |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::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
- <xsl:apply-templates select="." mode="reference">
- <xsl:with-param name="scope" select="$scope"/>
- </xsl:apply-templates>
- </xsl:for-each>
- <xsl:if test="$refs/secondary">
- <ul>
- <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
- concat($key, &#34; &#34;, normalize-space(concat(secondary/@sortas,
- secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary">
- <xsl:with-param name="scope" select="$scope"/>
- <xsl:sort select="translate(normalize-space(concat(secondary/@sortas,
- secondary[not(@sortas)])), &lowercase;, &uppercase;)"/>
- </xsl:apply-templates>
- </ul>
- </xsl:if>
- </li>
- </xsl:template>
-
- <xsl:template match="indexterm" mode="index-secondary">
- <xsl:param name="scope" select="."/>
- <xsl:variable name="key" select="concat(&primary;, &#34; &#34;,
- normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/>
- <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
- <li>
- <strong class="secitem">
- <xsl:value-of select="secondary"/>
- <xsl:text>: </xsl:text>
- </strong>
- <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
- |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::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
- <xsl:apply-templates select="." mode="reference">
- <xsl:with-param name="scope" select="$scope"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </li>
- </xsl:template>
-
- <!--Links (This template also fix a bug in the original code)-->
- <xsl:template name="reference">
- <xsl:param name="scope" select="."/>
- <xsl:param name="zones"/>
- <xsl:choose>
- <xsl:when test="contains($zones, ' ')">
- <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
- <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
- <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
- <xsl:variable name="target2" select="key('sections', $zone2)[&scope;]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target.uri">
- <xsl:with-param name="object" select="$target[1]"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
- </a>
- <xsl:text> -- </xsl:text>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target.uri">
- <xsl:with-param name="object" select="$target2[1]"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">description</xsl:with-param>
- </xsl:call-template>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="zone" select="$zones"/>
- <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target.uri">
- <xsl:with-param name="object" select="$target[1]"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- Dropping unneeded anchors -->
- <xsl:template match="indexterm"/>
-
-</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-legalnotice.xsl b/stylesheets/xhtml/lfs-legalnotice.xsl
deleted file mode 100644
index bc677d8d1..000000000
--- a/stylesheets/xhtml/lfs-legalnotice.xsl
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!-- Generating the page -->
- <xsl:template match="legalnotice" mode="titlepage.mode">
- <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
- <xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/>
- <xsl:variable name="title">
- <xsl:apply-templates select="." mode="title.markup"/>
- </xsl:variable>
- <xsl:call-template name="write.chunk">
- <xsl:with-param name="filename" select="$filename"/>
- <xsl:with-param name="quiet" select="$chunk.quietly"/>
- <xsl:with-param name="content">
- <html>
- <head>
- <xsl:call-template name="system.head.content"/>
- <xsl:call-template name="head.content"/>
- <xsl:call-template name="user.head.content"/>
- </head>
- <body>
- <xsl:call-template name="body.attributes"/>
- <div class="{local-name(.)}">
- <xsl:apply-templates mode="titlepage.mode"/>
- </div>
- <div class="navfooter">
- <ul class="footerlinks">
- <li class="home">
- <a accesskey="h">
- <xsl:attribute name="href">
- <xsl:text>../index.html</xsl:text>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:value-of select="/book/bookinfo/title"/>
- <xsl:text> - </xsl:text>
- <xsl:value-of select="/book/bookinfo/subtitle"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'home'"/>
- </xsl:call-template>
- </a>
- </li>
- </ul>
- </div>
- </body>
- </html>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
- <!-- Making the link-->
- <xsl:template match="copyright" mode="titlepage.mode">
- <p class="{name(.)}">
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="'prologue/legalnotice.html'"/>
- </xsl:attribute>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Copyright'"/>
- </xsl:call-template>
- </a>
- <xsl:call-template name="gentext.space"/>
- <xsl:call-template name="dingbat">
- <xsl:with-param name="dingbat">copyright</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="gentext.space"/>
- <xsl:call-template name="copyright.years">
- <xsl:with-param name="years" select="year"/>
- <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
- <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
- </xsl:call-template>
- <xsl:call-template name="gentext.space"/>
- <xsl:apply-templates select="holder" mode="titlepage.mode"/>
- </p>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-mixed.xsl b/stylesheets/xhtml/lfs-mixed.xsl
deleted file mode 100644
index 28460256b..000000000
--- a/stylesheets/xhtml/lfs-mixed.xsl
+++ /dev/null
@@ -1,264 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!-- para -->
- <xsl:template match="para">
- <xsl:choose>
- <xsl:when test="child::ulink[@url=' ']"/>
- <xsl:otherwise>
- <xsl:call-template name="paragraph">
- <xsl:with-param name="class">
- <xsl:if test="@role and $para.propagates.style != 0">
- <xsl:value-of select="@role"/>
- </xsl:if>
- </xsl:with-param>
- <xsl:with-param name="content">
- <xsl:if test="position() = 1 and parent::listitem">
- <xsl:call-template name="anchor">
- <xsl:with-param name="node" select="parent::listitem"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- screen -->
- <xsl:template match="screen">
- <xsl:choose>
- <xsl:when test="child::* = userinput">
- <pre class="userinput">
- <xsl:apply-templates/>
- </pre>
- </xsl:when>
- <xsl:otherwise>
- <pre class="{name(.)}">
- <xsl:apply-templates/>
- </pre>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="userinput">
- <xsl:choose>
- <xsl:when test="ancestor::screen">
- <kbd class="command">
- <xsl:apply-templates/>
- </kbd>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-imports/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- 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">
- <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">
- <xsl:attribute name="id">
- <xsl:text>lfs</xsl:text>
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
- </xsl:attribute>
- </xsl:template>
-
- <!-- External URLs in italic font -->
- <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.
- isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. -->
- <xsl:template name="inline.monoseq">
- <xsl:param name="content">
- <xsl:call-template name="anchor"/>
- <xsl:call-template name="simple.xlink">
- <xsl:with-param name="content">
- <xsl:apply-templates/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:param>
- <tt class="{local-name(.)}">
- <xsl:if test="@dir">
- <xsl:attribute name="dir">
- <xsl:value-of select="@dir"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="$content"/>
- </tt>
- </xsl:template>
-
- <xsl:template name="inline.boldmonoseq">
- <xsl:param name="content">
- <xsl:call-template name="anchor"/>
- <xsl:call-template name="simple.xlink">
- <xsl:with-param name="content">
- <xsl:apply-templates/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:param>
- <!-- don't put <strong> inside figure, example, or table titles -->
- <!-- or other titles that may already be represented with <strong>'s. -->
- <xsl:choose>
- <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure'
- or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')">
- <tt class="{local-name(.)}">
- <xsl:if test="@dir">
- <xsl:attribute name="dir">
- <xsl:value-of select="@dir"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="$content"/>
- </tt>
- </xsl:when>
- <xsl:otherwise>
- <strong class="{local-name(.)}">
- <tt>
- <xsl:if test="@dir">
- <xsl:attribute name="dir">
- <xsl:value-of select="@dir"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="$content"/>
- </tt>
- </strong>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="inline.italicmonoseq">
- <xsl:param name="content">
- <xsl:call-template name="anchor"/>
- <xsl:call-template name="simple.xlink">
- <xsl:with-param name="content">
- <xsl:apply-templates/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:param>
- <em class="{local-name(.)}">
- <tt>
- <xsl:if test="@dir">
- <xsl:attribute name="dir">
- <xsl:value-of select="@dir"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="$content"/>
- </tt>
- </em>
- </xsl:template>
-
- <!-- Total packages size calculation -->
- <xsl:template match="returnvalue">
- <xsl:call-template name="calculation">
- <xsl:with-param name="scope" select="../../variablelist"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="calculation">
- <xsl:param name="scope"/>
- <xsl:param name="total">0</xsl:param>
- <xsl:param name="position">1</xsl:param>
- <xsl:variable name="tokens" select="count($scope/varlistentry)"/>
- <xsl:variable name="token" select="$scope/varlistentry[$position]/term/token"/>
- <xsl:variable name="size" select="substring-before($token,' KB')"/>
- <xsl:variable name="rawsize">
- <xsl:choose>
- <xsl:when test="contains($size,',')">
- <xsl:value-of select="concat(substring-before($size,','),substring-after($size,','))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$size"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$position &lt;= $tokens">
- <xsl:call-template name="calculation">
- <xsl:with-param name="scope" select="$scope"/>
- <xsl:with-param name="position" select="$position +1"/>
- <xsl:with-param name="total" select="$total + $rawsize"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$total &lt; '1000'">
- <xsl:value-of select="$total"/>
- <xsl:text> KB</xsl:text>
- </xsl:when>
- <xsl:when test="$total &gt; '1000' and $total &lt; '5000'">
- <xsl:value-of select="substring($total,1,1)"/>
- <xsl:text>,</xsl:text>
- <xsl:value-of select="substring($total,2)"/>
- <xsl:text> KB</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="round($total div 1024)"/>
- <xsl:text> MB</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-navigational.xsl b/stylesheets/xhtml/lfs-navigational.xsl
deleted file mode 100644
index bab237142..000000000
--- a/stylesheets/xhtml/lfs-navigational.xsl
+++ /dev/null
@@ -1,255 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!-- Dropping the HEAD links -->
- <xsl:template name="html.head">
- <head>
- <xsl:call-template name="system.head.content"/>
- <xsl:call-template name="head.content"/>
- <xsl:call-template name="user.head.content"/>
- </head>
- </xsl:template>
-
- <!-- Header Navigation-->
- <xsl:template name="header.navigation">
- <xsl:param name="prev" select="/foo"/>
- <xsl:param name="next" select="/foo"/>
- <xsl:param name="nav.context"/>
- <xsl:variable name="home" select="/*[1]"/>
- <xsl:variable name="up" select="parent::*"/>
- <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
- and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
- <xsl:if test="$row and $home != .">
- <div class="navheader">
- <xsl:if test="$home != .">
- <div class="headertitles">
- <h4>
- <xsl:apply-templates select="$home" mode="object.title.markup"/>
- <xsl:text> - </xsl:text>
- <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
- </h4>
- <xsl:if test="$up != $home">
- <h3>
- <xsl:apply-templates select="$up" mode="object.title.markup"/>
- </h3>
- </xsl:if>
- </div>
- </xsl:if>
- <ul class="headerlinks">
- <xsl:if test="count($prev)&gt;0 and $prev != $home">
- <li class="prev">
- <a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$prev"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:value-of select="$prev/title"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'prev'"/>
- </xsl:call-template>
- </a>
- <p>
- <xsl:value-of select="$prev/title"/>
- </p>
- </li>
- </xsl:if>
- <xsl:if test="count($next)&gt;0">
- <li class="next">
- <a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$next"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:choose>
- <xsl:when test="local-name($next)='index'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Index</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$next/title"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'next'"/>
- </xsl:call-template>
- </a>
- <p>
- <xsl:choose>
- <xsl:when test="local-name($next)='index'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Index</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$next/title"/>
- </xsl:otherwise>
- </xsl:choose>
- </p>
- </li>
- </xsl:if>
- <li class="up">
- <xsl:if test="count($up)&gt;0 and $up != $home">
- <a accesskey="u">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$up"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="$up" mode="object.title.markup"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'up'"/>
- </xsl:call-template>
- </a>
- </xsl:if>
- <xsl:text>.</xsl:text>
- </li>
- <li class="home">
- <a accesskey="h">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$home"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:value-of select="$home/bookinfo/title"/>
- <xsl:text> - </xsl:text>
- <xsl:value-of select="$home/bookinfo/subtitle"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'home'"/>
- </xsl:call-template>
- </a>
- </li>
- </ul>
- </div>
- </xsl:if>
- </xsl:template>
-
- <!-- Footer Navigation-->
- <xsl:template name="footer.navigation">
- <xsl:param name="prev" select="/foo"/>
- <xsl:param name="next" select="/foo"/>
- <xsl:param name="nav.context"/>
- <xsl:variable name="home" select="/*[1]"/>
- <xsl:variable name="up" select="parent::*"/>
- <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
- or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
- <xsl:if test="$row">
- <div class="navfooter">
- <ul>
- <xsl:if test="count($prev)&gt;0 and $prev != $home">
- <li class="prev">
- <a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$prev"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:value-of select="$prev/title"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'prev'"/>
- </xsl:call-template>
- </a>
- <p>
- <xsl:value-of select="$prev/title"/>
- </p>
- </li>
- </xsl:if>
- <xsl:if test="count($next)&gt;0">
- <li class="next">
- <a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$next"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:choose>
- <xsl:when test="local-name($next)='index'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Index</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$next/title"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'next'"/>
- </xsl:call-template>
- </a>
- <p>
- <xsl:choose>
- <xsl:when test="local-name($next)='index'">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">Index</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$next/title"/>
- </xsl:otherwise>
- </xsl:choose>
- </p>
- </li>
- </xsl:if>
- <li class="up">
- <xsl:if test="count($up)&gt;0 and $up != $home">
- <a accesskey="u">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$up"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="$up" mode="object.title.markup"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'up'"/>
- </xsl:call-template>
- </a>
- </xsl:if>
- <xsl:text>.</xsl:text>
- </li>
- <li class="home">
- <xsl:if test="$home != .">
- <a accesskey="h">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$home"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:value-of select="$home/bookinfo/title"/>
- <xsl:text> - </xsl:text>
- <xsl:value-of select="$home/bookinfo/subtitle"/>
- </xsl:attribute>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'home'"/>
- </xsl:call-template>
- </a>
- </xsl:if>
- <xsl:text>.</xsl:text>
- </li>
- </ul>
- </div>
- </xsl:if>
- </xsl:template>
-
-</xsl:stylesheet>
-
-
diff --git a/stylesheets/xhtml/lfs-sections.xsl b/stylesheets/xhtml/lfs-sections.xsl
deleted file mode 100644
index 17944124d..000000000
--- a/stylesheets/xhtml/lfs-sections.xsl
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
-
- <!-- Sect1 attributes -->
- <xsl:template match="sect1">
- <div>
- <xsl:choose>
- <xsl:when test="@role">
- <xsl:attribute name="class">
- <xsl:value-of select="@role"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">
- <xsl:value-of select="name(.)"/>
- </xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="language.attribute"/>
- <xsl:call-template name="sect1.titlepage"/>
- <xsl:apply-templates/>
- <xsl:call-template name="process.chunk.footnotes"/>
- </div>
- </xsl:template>
-
- <!-- Sect2 attributes -->
- <xsl:template match="sect2">
- <div>
- <xsl:choose>
- <xsl:when test="@role">
- <xsl:attribute name="class">
- <xsl:value-of select="@role"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">
- <xsl:value-of select="name(.)"/>
- </xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="language.attribute"/>
- <xsl:call-template name="sect2.titlepage"/>
- <xsl:apply-templates/>
- <xsl:call-template name="process.chunk.footnotes"/>
- </div>
- </xsl:template>
-
- <!-- Sections numbering -->
- <xsl:param name="section.autolabel" select="1"/>
- <xsl:param name="section.label.includes.component.label" select="1"/>
-
- <!-- Use lowercase roman numbers for sect1 in preface -->
- <xsl:template match="sect1" mode="label.markup">
- <!-- if the parent is a component, maybe label that too -->
- <xsl:variable name="parent.is.component">
- <xsl:call-template name="is.component">
- <xsl:with-param name="node" select=".."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="component.label">
- <xsl:if test="$section.label.includes.component.label != 0
- and $parent.is.component != 0">
- <xsl:variable name="parent.label">
- <xsl:apply-templates select=".." mode="label.markup"/>
- </xsl:variable>
- <xsl:if test="$parent.label != ''">
- <xsl:apply-templates select=".." mode="label.markup"/>
- <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
- </xsl:if>
- </xsl:if>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="@label">
- <xsl:value-of select="@label"/>
- </xsl:when>
- <xsl:when test="$section.autolabel != 0">
- <xsl:copy-of select="$component.label"/>
- <xsl:choose>
- <xsl:when test="ancestor::preface">
- <xsl:number format="i" count="sect1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:number format="1" count="sect1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <!-- Skip numeration for sect2 with empty title -->
- <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
- <xsl:if test="string-length(title) > 0">
- <!-- label the parent -->
- <xsl:variable name="parent.label">
- <xsl:apply-templates select=".." mode="label.markup"/>
- </xsl:variable>
- <xsl:if test="$parent.label != ''">
- <xsl:apply-templates select=".." mode="label.markup"/>
- <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@label">
- <xsl:value-of select="@label"/>
- </xsl:when>
- <xsl:when test="$section.autolabel != 0">
- <xsl:choose>
- <xsl:when test="local-name(.) = 'sect2'">
- <xsl:choose>
- <!-- If the first sect2 isn't numbered, renumber the remainig sections -->
- <xsl:when test="string-length(../sect2[1]/title) = 0">
- <xsl:variable name="totalsect2">
- <xsl:number count="sect2"/>
- </xsl:variable>
- <xsl:number value="$totalsect2 - 1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:number count="sect2"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="local-name(.) = 'sect3'">
- <xsl:number count="sect3"/>
- </xsl:when>
- <xsl:when test="local-name(.) = 'sect4'">
- <xsl:number count="sect4"/>
- </xsl:when>
- <xsl:when test="local-name(.) = 'sect5'">
- <xsl:number count="sect5"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>label.markup: this can't happen!</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- </xsl:template>
-
-</xsl:stylesheet> \ No newline at end of file
diff --git a/stylesheets/xhtml/lfs-titles.xsl b/stylesheets/xhtml/lfs-titles.xsl
deleted file mode 100644
index e44108e59..000000000
--- a/stylesheets/xhtml/lfs-titles.xsl
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <xsl:template name="part.titlepage">
- <div class="titlepage">
- <h1 class="{name(.)}">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:text>. </xsl:text>
- <xsl:value-of select="title"/>
- </h1>
- </div>
- </xsl:template>
-
- <xsl:template name="chapter.titlepage">
- <div class="titlepage">
- <h1 class="{name(.)}">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:text>. </xsl:text>
- <xsl:value-of select="title"/>
- </h1>
- </div>
- </xsl:template>
-
- <xsl:template name="preface.titlepage">
- <div class="titlepage">
- <h1 class="{name(.)}">
- <xsl:value-of select="title"/>
- </h1>
- </div>
- </xsl:template>
-
- <xsl:template name="appendix.titlepage">
- <div class="titlepage">
- <h1 class="{name(.)}">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:text>. </xsl:text>
- <xsl:value-of select="title"/>
- </h1>
- </div>
- </xsl:template>
-
- <xsl:template name="sect1.titlepage">
- <xsl:choose>
- <!-- I should find a better test -->
- <xsl:when test="position() = 4">
- <div class="titlepage">
- <xsl:if test="@id">
- <a id="{@id}" name="{@id}"/>
- </xsl:if>
- <h2 class="{name(.)}">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:text>. </xsl:text>
- <xsl:value-of select="title"/>
- </h2>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <div class="titlepage">
- <h1 class="{name(.)}">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:text>. </xsl:text>
- <xsl:value-of select="title"/>
- </h1>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="sect2.titlepage">
- <xsl:choose>
- <xsl:when test="string-length(title) = 0"/>
- <xsl:otherwise>
- <div class="titlepage">
- <xsl:if test="@id">
- <a id="{@id}" name="{@id}"/>
- </xsl:if>
- <h2 class="{name(.)}">
- <xsl:if test="not(ancestor::preface)">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:text>. </xsl:text>
- </xsl:if>
- <xsl:value-of select="title"/>
- </h2>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="dedication.titlepage">
- <div class="titlepage">
- <h2 class="{name(.)}">
- <xsl:value-of select="title"/>
- </h2>
- </div>
- </xsl:template>
-
- <!-- Added the role param for proper punctuation in xref calls. -->
- <xsl:template match="*" mode="insert.title.markup">
- <xsl:param name="purpose"/>
- <xsl:param name="xrefstyle"/>
- <xsl:param name="title"/>
- <xsl:param name="role"/>
- <xsl:choose>
- <xsl:when test="$purpose = 'xref' and titleabbrev">
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$title"/>
- <xsl:value-of select="$role"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-toc.xsl b/stylesheets/xhtml/lfs-toc.xsl
deleted file mode 100644
index 0a6f39d91..000000000
--- a/stylesheets/xhtml/lfs-toc.xsl
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!-- General settings -->
- <xsl:param name="generate.toc">
- appendix nop
- book toc,title
- chapter nop
- part toc
- preface nop
- qandadiv nop
- qandaset nop
- reference nop
- sect1 nop
- sect2 nop
- sect3 nop
- sect4 nop
- sect5 nop
- section nop
- set nop
- </xsl:param>
-
- <xsl:param name="toc.section.depth">1</xsl:param>
-
- <xsl:param name="toc.max.depth">3</xsl:param>
-
- <!-- Making the TOC -->
- <xsl:template name="make.toc">
- <xsl:param name="toc-context" select="."/>
- <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
- <xsl:if test="$nodes">
- <div class="toc">
- <h3>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key">TableofContents</xsl:with-param>
- </xsl:call-template>
- </h3>
- <ul>
- <xsl:apply-templates select="$nodes" mode="toc">
- <xsl:with-param name="toc-context" select="$toc-context"/>
- </xsl:apply-templates>
- </ul>
- </div>
- </xsl:if>
- </xsl:template>
-
- <!-- Making the subtocs -->
- <xsl:template name="subtoc">
- <xsl:param name="toc-context" select="."/>
- <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
- <xsl:variable name="subtoc">
- <ul>
- <xsl:apply-templates mode="toc" select="$nodes">
- <xsl:with-param name="toc-context" select="$toc-context"/>
- </xsl:apply-templates>
- </ul>
- </xsl:variable>
- <xsl:variable name="depth">
- <xsl:choose>
- <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="depth.from.context"
- select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
- <li class="{name(.)}">
- <xsl:call-template name="toc.line">
- <xsl:with-param name="toc-context" select="$toc-context"/>
- </xsl:call-template>
- <xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0
- and $toc.max.depth &gt; $depth.from.context">
- <xsl:copy-of select="$subtoc"/>
- </xsl:if>
- </li>
- </xsl:template>
-
- <!--Adding the h* tags and dropping redundats links-->
- <xsl:template name="toc.line">
- <xsl:param name="toc-context" select="."/>
- <xsl:param name="depth" select="1"/>
- <xsl:param name="depth.from.context" select="8"/>
- <xsl:choose>
- <xsl:when test="local-name(.) = 'sect1'">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </xsl:when>
- <xsl:when test="local-name(.) = 'appendix'">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </xsl:when>
- <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
- <h4>
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </h4>
- </xsl:when>
- <xsl:when test="local-name(.) = 'part'">
- <h3>
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </h3>
- </xsl:when>
- <xsl:otherwise>
- <h3>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </h3>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-xref.xsl b/stylesheets/xhtml/lfs-xref.xsl
deleted file mode 100644
index f82037fe5..000000000
--- a/stylesheets/xhtml/lfs-xref.xsl
+++ /dev/null
@@ -1,270 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- version="1.0">
-
- <!-- Making a proper punctuation in xref (only for English language).-->
- <xsl:template match="xref" name="xref">
- <xsl:variable name="targets" select="key('id',@linkend)"/>
- <xsl:variable name="target" select="$targets[1]"/>
- <xsl:variable name="refelem" select="local-name($target)"/>
- <xsl:variable name="role" select="@role"/>
- <xsl:call-template name="check.id.unique">
- <xsl:with-param name="linkend" select="@linkend"/>
- </xsl:call-template>
- <xsl:call-template name="anchor"/>
- <xsl:choose>
- <xsl:when test="count($target) = 0">
- <xsl:message>
- <xsl:text>XRef to nonexistent id: </xsl:text>
- <xsl:value-of select="@linkend"/>
- </xsl:message>
- <xsl:text>???</xsl:text>
- </xsl:when>
- <xsl:when test="$target/@xreflabel">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$target"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:call-template name="xref.xreflabel">
- <xsl:with-param name="target" select="$target"/>
- </xsl:call-template>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$target"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
- <a href="{$href}">
- <xsl:if test="$target/title or $target/*/title">
- <xsl:attribute name="title">
- <xsl:apply-templates select="$target" mode="xref-title"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:apply-templates select="$target" mode="xref-to">
- <xsl:with-param name="referrer" select="."/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="xrefstyle">
- <xsl:value-of select="@xrefstyle"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </a>
- <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="section|simplesect|sect1|sect2|sect3|sect4|sect5|refsect1
- |refsect2|refsect3|refsection" mode="xref-to">
- <xsl:param name="referrer"/>
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role"/>
- <xsl:apply-templates select="." mode="object.xref.markup">
- <xsl:with-param name="purpose" select="'xref'"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="referrer" select="$referrer"/>
- <xsl:with-param name="role" select="$role"/>
- </xsl:apply-templates>
- </xsl:template>
-
-
- <xsl:template match="*" mode="object.xref.markup">
- <xsl:param name="purpose"/>
- <xsl:param name="xrefstyle"/>
- <xsl:param name="referrer"/>
- <xsl:param name="role"/>
- <xsl:variable name="template">
- <xsl:choose>
- <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
- <xsl:call-template name="make.gentext.template">
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="referrer" select="$referrer"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
- <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="object.xref.template">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="referrer" select="$referrer"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$template = ''">
- <xsl:message>
- <xsl:text>object.xref.markup: empty xref template</xsl:text>
- <xsl:text> for linkend="</xsl:text>
- <xsl:value-of select="@id"/>
- <xsl:text>" and @xrefstyle="</xsl:text>
- <xsl:value-of select="$xrefstyle"/>
- <xsl:text>"</xsl:text>
- </xsl:message>
- </xsl:if>
- <xsl:call-template name="substitute-markup">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="referrer" select="$referrer"/>
- <xsl:with-param name="template" select="$template"/>
- <xsl:with-param name="role" select="$role"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="substitute-markup">
- <xsl:param name="template" select="''"/>
- <xsl:param name="allow-anchors" select="'0'"/>
- <xsl:param name="title" select="''"/>
- <xsl:param name="subtitle" select="''"/>
- <xsl:param name="label" select="''"/>
- <xsl:param name="pagenumber" select="''"/>
- <xsl:param name="purpose"/>
- <xsl:param name="xrefstyle"/>
- <xsl:param name="referrer"/>
- <xsl:param name="role"/>
- <xsl:choose>
- <xsl:when test="contains($template, '%')">
- <xsl:value-of select="substring-before($template, '%')"/>
- <xsl:variable name="candidate"
- select="substring(substring-after($template, '%'), 1, 1)"/>
- <xsl:choose>
- <xsl:when test="$candidate = 't'">
- <xsl:apply-templates select="." mode="insert.title.markup">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="title">
- <xsl:choose>
- <xsl:when test="$title != ''">
- <xsl:copy-of select="$title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="title.markup">
- <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="$candidate = 's'">
- <xsl:apply-templates select="." mode="insert.subtitle.markup">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="subtitle">
- <xsl:choose>
- <xsl:when test="$subtitle != ''">
- <xsl:copy-of select="$subtitle"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="subtitle.markup">
- <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="$candidate = 'n'">
- <xsl:apply-templates select="." mode="insert.label.markup">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="label">
- <xsl:choose>
- <xsl:when test="$label != ''">
- <xsl:copy-of select="$label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="$candidate = 'p'">
- <xsl:apply-templates select="." mode="insert.pagenumber.markup">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="pagenumber">
- <xsl:choose>
- <xsl:when test="$pagenumber != ''">
- <xsl:copy-of select="$pagenumber"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="pagenumber.markup"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="$candidate = 'd'">
- <xsl:apply-templates select="." mode="insert.direction.markup">
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="direction">
- <xsl:choose>
- <xsl:when test="$referrer">
- <xsl:variable name="referent-is-below">
- <xsl:for-each select="preceding::xref">
- <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$referent-is-below = ''">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'above'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'below'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="$candidate = '%' ">
- <xsl:text>%</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
- </xsl:otherwise>
- </xsl:choose>
- <!-- recurse with the rest of the template string -->
- <xsl:variable name="rest"
- select="substring($template,
- string-length(substring-before($template, '%'))+3)"/>
- <xsl:call-template name="substitute-markup">
- <xsl:with-param name="template" select="$rest"/>
- <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
- <xsl:with-param name="title" select="$title"/>
- <xsl:with-param name="subtitle" select="$subtitle"/>
- <xsl:with-param name="label" select="$label"/>
- <xsl:with-param name="pagenumber" select="$pagenumber"/>
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="referrer" select="$referrer"/>
- <xsl:with-param name="role" select="$role"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$template"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>