Author: manuel
Date: 2005-04-25 15:25:56 -0600 (Mon, 25 Apr 2005)
New Revision: 5078
Modified:
branches/cross-lfs/BOOK/introduction/changelog.xml
branches/cross-lfs/BOOK/stylesheets/xhtml/lfs-navigational.xsl
Log:
Modified the navigational XSL engine to read the book linearly regardless if
the user choose the reboot or the chroot method.
Modified: branches/cross-lfs/BOOK/introduction/changelog.xml
===================================================================
--- branches/cross-lfs/BOOK/introduction/changelog.xml 2005-04-25 19:36:58 UTC
(rev 5077)
+++ branches/cross-lfs/BOOK/introduction/changelog.xml 2005-04-25 21:25:56 UTC
(rev 5078)
@@ -97,7 +97,8 @@
<listitem><para>April 25, 2005 [manuel]</para>
<itemizedlist>
<listitem><para>Added temp-system/choose.xml to can select the reboot
-or chroot method.</para></listitem>
+or chroot method. Modified the navigational XSL engine to read the book
linearly
+regardless if the user choose the reboot or the chroot
method.</para></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
Modified: branches/cross-lfs/BOOK/stylesheets/xhtml/lfs-navigational.xsl
===================================================================
--- branches/cross-lfs/BOOK/stylesheets/xhtml/lfs-navigational.xsl
2005-04-25 19:36:58 UTC (rev 5077)
+++ branches/cross-lfs/BOOK/stylesheets/xhtml/lfs-navigational.xsl
2005-04-25 21:25:56 UTC (rev 5078)
@@ -22,6 +22,7 @@
<xsl:variable name="up" select="parent::*"/>
<xsl:variable name="row" select="count($prev) > 0 or (count($up) > 0
and generate-id($up) != generate-id($home)) or count($next) >
0"/>
+ <!--Header titles-->
<xsl:if test="$row and $home != .">
<div class="navheader">
<xsl:if test="$home != .">
@@ -39,82 +40,134 @@
</div>
</xsl:if>
<ul class="headerlinks">
+ <!--Prev-->
<xsl:if test="count($prev)>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>
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'ch-chroot-revisedchroot'] or
+ [EMAIL PROTECTED]'ch-reboot-pwdgroup']">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object"
+ select="//[EMAIL
PROTECTED]'ch-temp-system-choose']"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="//[EMAIL
PROTECTED]'ch-temp-system-choose']/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="//[EMAIL
PROTECTED]'ch-temp-system-choose']/title"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <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>
+ </xsl:otherwise>
+ </xsl:choose>
</li>
</xsl:if>
- <xsl:if test="count($next)>0">
+ <!--Next-->
+ <xsl:if test="count($next)>0 and @id!='ch-temp-system-choose'">
<li class="next">
- <a accesskey="n">
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'chapter-chroot'] or
+ [EMAIL PROTECTED]'chapter-reboot']">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object"
+ select="//[EMAIL PROTECTED]'part5']"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="//[EMAIL
PROTECTED]'part5']/title"/>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ <p>
+ <xsl:value-of select="//[EMAIL PROTECTED]'part5']/title"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <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>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:if>
+ <!--Up-->
+ <li class="up">
+ <xsl:if test="count($up)>0 and $up != $home">
+ <a accesskey="u">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$next"/>
+ <xsl:with-param name="object" select="$up"/>
</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:apply-templates select="$up"
mode="object.title.markup"/>
</xsl:attribute>
<xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'next'"/>
+ <xsl:with-param name="direction" select="'up'"/>
</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)>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>
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ </li>
+ <!--Home-->
<li class="home">
<a accesskey="h">
<xsl:attribute name="href">
@@ -149,102 +202,154 @@
<xsl:if test="$row">
<div class="navfooter">
<ul>
+ <!--Prev-->
<xsl:if test="count($prev)>0 and $prev != $home">
<li class="prev">
- <a accesskey="p">
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'ch-chroot-revisedchroot'] or
+ [EMAIL PROTECTED]'ch-reboot-pwdgroup']">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object"
+ select="//[EMAIL
PROTECTED]'ch-temp-system-choose']"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="//[EMAIL
PROTECTED]'ch-temp-system-choose']/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="//[EMAIL
PROTECTED]'ch-temp-system-choose']/title"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <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>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:if>
+ <!--Next-->
+ <xsl:if test="count($next)>0 and @id!='ch-temp-system-choose'">
+ <li class="next">
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'chapter-chroot'] or
+ [EMAIL PROTECTED]'chapter-reboot']">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object"
+ select="//[EMAIL PROTECTED]'part5']"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="//[EMAIL
PROTECTED]'part5']/title"/>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ <p>
+ <xsl:value-of select="//[EMAIL PROTECTED]'part5']/title"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <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>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:if>
+ <!--Up-->
+ <li class="up">
+ <xsl:if test="count($up)>0 and $up != $home">
+ <a accesskey="u">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$prev"/>
+ <xsl:with-param name="object" select="$up"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="title">
- <xsl:value-of select="$prev/title"/>
+ <xsl:apply-templates select="$up"
mode="object.title.markup"/>
</xsl:attribute>
<xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'prev'"/>
+ <xsl:with-param name="direction" select="'up'"/>
</xsl:call-template>
</a>
- <p>
- <xsl:value-of select="$prev/title"/>
- </p>
- </li>
- </xsl:if>
- <xsl:if test="count($next)>0">
- <li class="next">
- <a accesskey="n">
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ </li>
+ <!--Home-->
+ <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="$next"/>
+ <xsl:with-param name="object" select="$home"/>
</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: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="'next'"/>
+ <xsl:with-param name="direction" select="'home'"/>
</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)>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>
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ </li>
</ul>
</div>
</xsl:if>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page