Changeset 037ab68 for stylesheets
- Timestamp:
- 05/14/2006 11:45:19 AM (18 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 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, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, 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
- Children:
- 9b04fe8
- Parents:
- b4a71ef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/xhtml/lfs-mixed.xsl
rb4a71ef r037ab68 4 4 xmlns="http://www.w3.org/1999/xhtml" 5 5 version="1.0"> 6 7 <!-- para --> 8 <xsl:template match="para"> 9 <xsl:choose> 10 <xsl:when test="child::ulink[@url=' ']"/> 11 <xsl:otherwise> 12 <xsl:call-template name="paragraph"> 13 <xsl:with-param name="class"> 14 <xsl:if test="@role and $para.propagates.style != 0"> 15 <xsl:value-of select="@role"/> 16 </xsl:if> 17 </xsl:with-param> 18 <xsl:with-param name="content"> 19 <xsl:if test="position() = 1 and parent::listitem"> 20 <xsl:call-template name="anchor"> 21 <xsl:with-param name="node" select="parent::listitem"/> 22 </xsl:call-template> 23 </xsl:if> 24 <xsl:call-template name="anchor"/> 25 <xsl:apply-templates/> 26 </xsl:with-param> 27 </xsl:call-template> 28 </xsl:otherwise> 29 </xsl:choose> 30 </xsl:template> 6 31 7 32 <!-- screen --> … … 20 45 </xsl:choose> 21 46 </xsl:template> 22 47 23 48 <xsl:template match="userinput"> 24 49 <xsl:choose> … … 55 80 </xsl:template> 56 81 57 82 58 83 <!-- variablelist --> 59 84 <xsl:template match="variablelist"> … … 69 94 </xsl:choose> 70 95 </xsl:template> 71 96 72 97 73 98 <!-- Body attributes --> … … 102 127 </a> 103 128 </xsl:template> 104 129 105 130 <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and. 106 131 isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. --> … … 123 148 </tt> 124 149 </xsl:template> 125 150 126 151 <xsl:template name="inline.boldmonoseq"> 127 152 <xsl:param name="content"> … … 136 161 <!-- or other titles that may already be represented with <strong>'s. --> 137 162 <xsl:choose> 138 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' 163 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' 139 164 or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')"> 140 165 <tt class="{local-name(.)}"> … … 161 186 </xsl:choose> 162 187 </xsl:template> 163 188 164 189 <xsl:template name="inline.italicmonoseq"> 165 190 <xsl:param name="content"> … … 183 208 </xsl:template> 184 209 210 <!-- Total packages size calculation --> 211 <xsl:template match="returnvalue"> 212 <xsl:call-template name="calculation"> 213 <xsl:with-param name="scope" select="../../variablelist"/> 214 </xsl:call-template> 215 </xsl:template> 216 217 <xsl:template name="calculation"> 218 <xsl:param name="scope"/> 219 <xsl:param name="total">0</xsl:param> 220 <xsl:param name="position">1</xsl:param> 221 <xsl:variable name="tokens" select="count($scope/varlistentry)"/> 222 <xsl:variable name="token" select="$scope/varlistentry[$position]/term/token"/> 223 <xsl:variable name="size" select="substring-before($token,' KB')"/> 224 <xsl:variable name="rawsize"> 225 <xsl:choose> 226 <xsl:when test="contains($size,',')"> 227 <xsl:value-of select="concat(substring-before($size,','),substring-after($size,','))"/> 228 </xsl:when> 229 <xsl:otherwise> 230 <xsl:value-of select="$size"/> 231 </xsl:otherwise> 232 </xsl:choose> 233 </xsl:variable> 234 <xsl:choose> 235 <xsl:when test="$position <= $tokens"> 236 <xsl:call-template name="calculation"> 237 <xsl:with-param name="scope" select="$scope"/> 238 <xsl:with-param name="position" select="$position +1"/> 239 <xsl:with-param name="total" select="$total + $rawsize"/> 240 </xsl:call-template> 241 </xsl:when> 242 <xsl:otherwise> 243 <xsl:choose> 244 <xsl:when test="$total < '1000'"> 245 <xsl:value-of select="$total"/> 246 <xsl:text> KB</xsl:text> 247 </xsl:when> 248 <xsl:when test="$total > '1000' and $total < '5000'"> 249 <xsl:value-of select="substring($total,1,1)"/> 250 <xsl:text>,</xsl:text> 251 <xsl:value-of select="substring($total,2)"/> 252 <xsl:text> KB</xsl:text> 253 </xsl:when> 254 <xsl:otherwise> 255 <xsl:value-of select="round($total div 1024)"/> 256 <xsl:text> MB</xsl:text> 257 </xsl:otherwise> 258 </xsl:choose> 259 </xsl:otherwise> 260 </xsl:choose> 261 </xsl:template> 262 185 263 186 264 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.