Changeset c40c526
- Timestamp:
- 01/17/2024 06:43:51 PM (3 months ago)
- Branches:
- 12.1, ken/TL2024, lazarus, plabs/newcss, rahul/power-profiles-daemon, trunk, xry111/llvm18
- Children:
- ab6c309
- Parents:
- d4919db
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rd4919db rc40c526 48 48 endif 49 49 50 51 50 blfs: html wget-list 52 51 … … 109 108 stylesheets/blfs-chunked.xsl \ 110 109 $(RENDERTMP)/$(BLFSHTML) 111 $(Q)sed -i 's/xmlns:xlink.*xlink"//' $(BASEDIR)/longindex.html112 110 113 111 @echo "Copying CSS code and images..." … … 143 141 stylesheets/blfs-nochunks.xsl \ 144 142 $(RENDERTMP)/$(BLFSHTML) 145 $(Q)sed -i 's/xmlns:xlink.*xlink"//' $(BASEDIR)/$(NOCHUNKS_OUTPUT)146 143 147 144 @echo "Running Tidy and obfuscate.sh on non-chunked XHTML..." -
stylesheets/lfs-xsl/xhtml/lfs-index.xsl
rd4919db rc40c526 1 <?xml version= '1.0' encoding='ISO-8859-1'?>1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 3 3 <!DOCTYPE xsl:stylesheet [ … … 16 16 version="1.0"> 17 17 18 <!-- This stylesheet controls how the Index is generated. 19 Due how they are created, the original XHTML stylesheets don't make 20 use of the entities from {docbook-xsl}/common/entities.ent. 21 We add the relevant ones in the DOCTYPE to have more readable templates. 22 Also, we remove support for @role and @type based Index due that it is 23 broken when used with @zone based cross-references. --> 24 25 <!-- The file name of the Index page. 26 There is no upstream template with match="index", only a global 27 match="*", thus the next template is enought to force the Index 28 filename. --> 18 <!-- Change the file name of the index page from the default ix01.html. 19 There is no upstream template with match="index", only a global 20 match="*", thus the following is enough to override the index 21 filename. --> 22 29 23 <xsl:template match="index" mode="recursive-chunk-filename"> 30 24 <xsl:text>longindex.html</xsl:text> 31 25 </xsl:template> 32 26 33 <!-- The Index title in the longindex.html page: 34 Removed a lot of code not useful for us. 35 Forced h1 title size. 36 The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl 37 Use the original template now (as in LFS) 38 <xsl:template name="index.titlepage"> 39 <h1 class="index"> 40 <xsl:call-template name="gentext"> 41 <xsl:with-param name="key" select="$index-title"/> 42 </xsl:call-template> 43 </h1> 44 </xsl:template>--> 45 46 <!--Divisions: 47 Translate alphabetical divisions titles to by-type titles. 48 Added gentext support to divisions titles. 49 Using h2 for divisions titles. 50 Changed output from dl format to ul format. --> 51 <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl --> 27 <!-- The original template in {docbook-xsl}/xhtml/autoidx.xsl has 28 a bug (https://github.com/docbook/xslt10-stylesheets/issues/239) 29 that generates a <div> with a wrong xmlns:xlink attribute. So copy it 30 here where the bug does not occur, (and simplify it a lot).--> 31 32 <xsl:template name="generate-basic-index"> 33 <xsl:param name="scope" select="NOTANODE"/> 34 35 <xsl:variable name="terms" select="//indexterm 36 [count(.|key('letter', 37 translate(substring(&primary;, 1, 1), 38 &lowercase;, 39 &uppercase; 40 ) 41 ) [&scope;][1]) = 1]"/> 42 <div class="index"> 43 <xsl:apply-templates select="$terms" mode="index-div-basic"> 44 <xsl:with-param name="position" select="position()"/> 45 <xsl:with-param name="scope" select="$scope"/> 46 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 47 </xsl:apply-templates> 48 </div> 49 </xsl:template> 50 51 <!-- Divisions: 52 Override the default division titles, translating them from the default 53 'A', 'B', etc. to 'Packages', 'Programs', etc. 54 Add gentext support to division titles. 55 Use h2 for division titles instead of the default h3. 56 Change main listings from dl to ul format. 57 The original template is in {docbook-xsl}/xhtml/autoidx.xsl --> 58 52 59 <xsl:template match="indexterm" mode="index-div-basic"> 53 60 <xsl:param name="scope" select="."/> 54 61 <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> 55 62 <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/> 56 <!-- Make sure that we don't generate a div if there are no terms in scope --> 63 <!-- Make sure that we don't generate a div if there are no terms in scope 64 --> 57 65 <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> 58 66 <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> … … 136 144 </xsl:template> 137 145 138 139 Changed the output format from dl to ul.140 Placed the term and separator into strong tags.141 Placed the target links into a div.142 Removed code for unused see and sealso childs. -->143 <!--The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->146 <!-- Primary items: 147 Place term and separator into strong tags. 148 Place target links into a div. 149 Change main listings from dl to ul format. 150 Removed code for unused see and sealso children. 151 The original template is in {docbook-xsl}/xhtml/autoidx.xsl --> 144 152 <xsl:template match="indexterm" mode="index-primary"> 145 153 <xsl:param name="scope" select="."/> … … 153 161 <span class='indexref'> 154 162 <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',concat($key, &sep;, §ion.id;))[&scope;][1])]"> 163 <!--<xsl:for-each select="$refs[not(see) and not(secondary)][count(ancestor::node()|$scope) = count(ancestor::node()) = 0]">--> 155 164 <xsl:apply-templates select="." mode="reference"> 156 165 <xsl:with-param name="scope" select="$scope"/> … … 169 178 </xsl:template> 170 179 171 172 Changed the output format from dl to ul.173 Placed the term and separator into strong tags.174 Placed the target links into a div.175 Removed code for unused tertiary, see, and sealso childs. -->176 <!--The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->180 <!-- Secondary items: 181 Place term and separator into strong tags. 182 Place target links into a div. 183 Change main listings from dl to ul format. 184 Removed code for unused tertiary, see and sealso children. 185 The original template is in {docbook-xsl}/xhtml/autoidx.xsl --> 177 186 <xsl:template match="indexterm" mode="index-secondary"> 178 187 <xsl:param name="scope" select="."/>
Note:
See TracChangeset
for help on using the changeset viewer.