source: stylesheets/lfs-xsl/xhtml/lfs-sections.xsl@ 52dcb7d

11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 52dcb7d was 52dcb7d, checked in by Xℹ Ruoyao <xry111@…>, 3 years ago

remove $Date$ and $LastChangedBy$

They are unsupported by Git.

  • Property mode set to 100644
File size: 5.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 <!-- This stylesheet controls how preface, chapter, and sections are handled -->
8
9 <!-- Chunk the first top-level section? 1 = yes, 0 = no
10 If preface and chapters TOC are generated, this must be 1. -->
11 <xsl:param name="chunk.first.sections" select="1"/>
12
13 <!-- preface:
14 Output non sect1 child elements before the TOC -->
15 <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
16 <xsl:template match="preface">
17 <xsl:call-template name="id.warning"/>
18 <div>
19 <xsl:apply-templates select="." mode="class.attribute"/>
20 <xsl:call-template name="dir">
21 <xsl:with-param name="inherit" select="1"/>
22 </xsl:call-template>
23 <xsl:call-template name="language.attribute"/>
24 <xsl:if test="$generate.id.attributes != 0">
25 <xsl:attribute name="id">
26 <xsl:call-template name="object.id"/>
27 </xsl:attribute>
28 </xsl:if>
29 <xsl:call-template name="component.separator"/>
30 <xsl:call-template name="preface.titlepage"/>
31 <xsl:apply-templates/>
32 <xsl:variable name="toc.params">
33 <xsl:call-template name="find.path.params">
34 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
35 </xsl:call-template>
36 </xsl:variable>
37 <xsl:if test="contains($toc.params, 'toc')">
38 <xsl:call-template name="component.toc">
39 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
40 </xsl:call-template>
41 <xsl:call-template name="component.toc.separator"/>
42 </xsl:if>
43 <xsl:call-template name="process.footnotes"/>
44 </div>
45 </xsl:template>
46
47 <!-- chapter:
48 Output non sect1 child elements before the TOC -->
49 <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
50 <xsl:template match="chapter">
51 <xsl:call-template name="id.warning"/>
52 <div>
53 <xsl:apply-templates select="." mode="class.attribute"/>
54 <xsl:call-template name="dir">
55 <xsl:with-param name="inherit" select="1"/>
56 </xsl:call-template>
57 <xsl:call-template name="language.attribute"/>
58 <xsl:if test="$generate.id.attributes != 0">
59 <xsl:attribute name="id">
60 <xsl:call-template name="object.id"/>
61 </xsl:attribute>
62 </xsl:if>
63 <xsl:call-template name="component.separator"/>
64 <xsl:call-template name="chapter.titlepage"/>
65 <xsl:apply-templates/>
66 <xsl:variable name="toc.params">
67 <xsl:call-template name="find.path.params">
68 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
69 </xsl:call-template>
70 </xsl:variable>
71 <xsl:if test="contains($toc.params, 'toc')">
72 <xsl:call-template name="component.toc">
73 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
74 </xsl:call-template>
75 <xsl:call-template name="component.toc.separator"/>
76 </xsl:if>
77 <xsl:call-template name="process.footnotes"/>
78 </div>
79 </xsl:template>
80
81 <!-- sect1:
82 When there is a role attibute, use it as the class value.
83 Process the SVN keywords found in sect1info as a footnote.
84 Removed unused code. -->
85 <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
86 <xsl:template match="sect1">
87 <div>
88 <xsl:choose>
89 <xsl:when test="@role">
90 <xsl:attribute name="class">
91 <xsl:value-of select="@role"/>
92 </xsl:attribute>
93 </xsl:when>
94 <xsl:otherwise>
95 <xsl:apply-templates select="." mode="class.attribute"/>
96 </xsl:otherwise>
97 </xsl:choose>
98 <xsl:call-template name="language.attribute"/>
99 <xsl:call-template name="sect1.titlepage"/>
100 <xsl:apply-templates/>
101 <xsl:apply-templates select="sect1info" mode="svn-keys"/>
102 </div>
103 </xsl:template>
104
105 <!-- sect2:
106 When there is a role attibute, use it as the class value.
107 Removed unused code. -->
108 <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
109 <xsl:template match="sect2">
110 <div>
111 <xsl:choose>
112 <xsl:when test="@role">
113 <xsl:attribute name="class">
114 <xsl:value-of select="@role"/>
115 </xsl:attribute>
116 </xsl:when>
117 <xsl:otherwise>
118 <xsl:attribute name="class">
119 <xsl:value-of select="name(.)"/>
120 </xsl:attribute>
121 </xsl:otherwise>
122 </xsl:choose>
123 <xsl:call-template name="language.attribute"/>
124 <xsl:call-template name="sect2.titlepage"/>
125 <xsl:apply-templates/>
126 </div>
127 </xsl:template>
128
129 <!-- sect1info mode svn-keys:
130 Self-made template to process SVN keywords found in sect1info. -->
131 <xsl:template match="sect1info" mode="svn-keys">
132 <!-- <p class="updated">Last updated --><!-- by
133 <xsl:apply-templates select="othername" mode="svn-keys"/> -->
134 <!-- on
135 <xsl:apply-templates select="date" mode="svn-keys"/>
136 </p>
137comment out entire template for now. We do not use this. bdubbs 2017/12/30 -->
138 </xsl:template>
139
140 <!-- othername mode svn-keys:
141 Self-made template to process the $LastChangedBy SVN keyword. -->
142 <xsl:template match="othername" mode="svn-keys">
143 <xsl:variable name="author">
144 <xsl:value-of select="."/>
145 </xsl:variable>
146 <xsl:variable name="nameonly">
147 <xsl:value-of select="substring($author,16)"/>
148 </xsl:variable>
149 <xsl:value-of select="substring-before($nameonly,'$')"/>
150 </xsl:template>
151
152 <!-- date mode svn-keys:
153 Self-made template to process the $Date SVN keyword. -->
154 <xsl:template match="date" mode="svn-keys">
155 <xsl:variable name="date">
156 <xsl:value-of select="."/>
157 </xsl:variable>
158 <xsl:value-of select="substring($date,7,26)"/>
159 </xsl:template>
160
161</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.