diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-12-19 21:17:48 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-12-19 21:17:48 +0000 |
commit | f7bd105db3cf74fb6d2bfed726cf5d187cb1109f (patch) | |
tree | 0077803fc32f39b293b3860f6ffa765eefcec94f /stylesheets/xhtml/lfs-mixed.xsl | |
parent | 6d3af72bf2b333798eba7b88075fccab9441519f (diff) |
Updated the stylesheets and Makefile.
Removed contrib/, index-pdf.xml and goTidy.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4428 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/xhtml/lfs-mixed.xsl')
-rw-r--r-- | stylesheets/xhtml/lfs-mixed.xsl | 79 |
1 files changed, 35 insertions, 44 deletions
diff --git a/stylesheets/xhtml/lfs-mixed.xsl b/stylesheets/xhtml/lfs-mixed.xsl index 0660116a4..20344d449 100644 --- a/stylesheets/xhtml/lfs-mixed.xsl +++ b/stylesheets/xhtml/lfs-mixed.xsl @@ -9,9 +9,7 @@ <xsl:choose> <xsl:when test="child::* = userinput"> <pre class="userinput"> - <kbd class="command"> - <xsl:value-of select="."/> - </kbd> + <xsl:apply-templates/> </pre> </xsl:when> <xsl:otherwise> @@ -22,6 +20,20 @@ </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> + + <!-- variablelist --> <xsl:template match="variablelist"> <div class="{name(.)}"> @@ -60,48 +72,27 @@ </xsl:attribute> </xsl:template> - <!-- 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> + <!-- 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> - <!-- 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> </xsl:stylesheet> |