source: stylesheets/xhtml/lfs-mixed.xsl@ 3be2393

6.0
Last change on this file since 3be2393 was a988510, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Numbered sections for HTML output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4090 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 version="1.0">
6
7 <!-- screen -->
8 <xsl:template match="screen">
9 <xsl:choose>
10 <xsl:when test="child::* = userinput">
11 <pre class="userinput">
12 <xsl:apply-templates/>
13 </pre>
14 </xsl:when>
15 <xsl:otherwise>
16 <pre class="{name(.)}">
17 <xsl:apply-templates/>
18 </pre>
19 </xsl:otherwise>
20 </xsl:choose>
21 </xsl:template>
22
23 <xsl:template match="userinput">
24 <xsl:choose>
25 <xsl:when test="ancestor::screen">
26 <kbd class="command">
27 <xsl:apply-templates/>
28 </kbd>
29 </xsl:when>
30 <xsl:otherwise>
31 <xsl:apply-imports/>
32 </xsl:otherwise>
33 </xsl:choose>
34 </xsl:template>
35
36
37 <!-- variablelist -->
38 <xsl:template match="variablelist">
39 <div class="{name(.)}">
40 <xsl:if test="title | bridgehead">
41 <xsl:choose>
42 <xsl:when test="@role = 'materials'">
43 <h2>
44 <xsl:value-of select="title | bridgehead"/>
45 </h2>
46 </xsl:when>
47 <xsl:otherwise>
48 <h3>
49 <xsl:value-of select="title | bridgehead"/>
50 </h3>
51 </xsl:otherwise>
52 </xsl:choose>
53 </xsl:if>
54 <dl>
55 <xsl:if test="@role">
56 <xsl:attribute name="class">
57 <xsl:value-of select="@role"/>
58 </xsl:attribute>
59 </xsl:if>
60 <xsl:apply-templates select="varlistentry"/>
61 </dl>
62 </div>
63 </xsl:template>
64
65 <!-- Body attributes -->
66 <xsl:template name="body.attributes">
67 <xsl:attribute name="id">
68 <xsl:text>lfs</xsl:text>
69 </xsl:attribute>
70 <xsl:attribute name="class">
71 <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
72 </xsl:attribute>
73 </xsl:template>
74
75</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.