lfs/stylesheets/xhtml/lfs-mixed.xsl
Manuel Canales Esparcia cdb5a78776 HEAD: StyleSheets - fixed the flow of h* tags.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3669 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2004-05-19 23:44:41 +00:00

55 lines
1.4 KiB
XML

<?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">
<!-- screen -->
<xsl:template match="screen">
<xsl:choose>
<!-- Temporally hack -->
<xsl:when test="child::* = userinput">
<pre class="{name(.)}">
<kbd class="command">
<xsl:value-of select="."/>
</kbd>
</pre>
</xsl:when>
<xsl:otherwise>
<pre class="{name(.)}">
<xsl:apply-templates/>
</pre>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- variablelist -->
<xsl:template match="variablelist">
<div class="{name(.)}">
<xsl:if test="title">
<xsl:choose>
<xsl:when test="@role = 'materials'">
<h2>
<xsl:value-of select="title"/>
</h2>
</xsl:when>
<xsl:otherwise>
<h3>
<xsl:value-of select="title"/>
</h3>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<dl>
<xsl:if test="@role">
<xsl:attribute name="class">
<xsl:value-of select="@role"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="varlistentry"/>
</dl>
</div>
</xsl:template>
</xsl:stylesheet>