Changeset 3fe8b511 for stylesheets/xhtml/lfs-mixed.xsl
- Timestamp:
- 01/07/2005 05:14:15 AM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- d8dc77a
- Parents:
- bad8b53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/xhtml/lfs-mixed.xsl
rbad8b53 r3fe8b511 1 1 <?xml version='1.0' encoding='ISO-8859-1'?> 2 3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->4 2 5 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … … 7 5 version="1.0"> 8 6 7 <!-- screen --> 9 8 <xsl:template match="screen"> 10 9 <xsl:choose> 11 <!-- Temporally hack --> 12 <!-- Broke userinput <xsl:when test="child::* = userinput"> 13 <pre class="{name(.)}"> 14 <kbd class="command"> 15 <xsl:value-of select="."/> 16 </kbd> 10 <xsl:when test="child::* = userinput"> 11 <pre class="userinput"> 12 <xsl:apply-templates/> 17 13 </pre> 18 </xsl:when> -->19 <!-- This should be fixed in the XML code -->20 21 <xsl:when test="contains(text() , 'SBU')">22 <p class="sbu">23 <tt>24 <xsl:value-of select="substring-before(text() , 'R')"/>25 <br/>26 <xsl:value-of select="substring-after(text() , 'U')"/>27 </tt>28 </p>29 14 </xsl:when> 30 31 15 <xsl:otherwise> 32 16 <pre class="{name(.)}"> … … 36 20 </xsl:choose> 37 21 </xsl:template> 22 23 <!-- userinput --> 24 <xsl:template match="userinput"> 25 <xsl:choose> 26 <xsl:when test="ancestor::screen"> 27 <kbd class="command"> 28 <xsl:apply-templates/> 29 </kbd> 30 </xsl:when> 31 <xsl:otherwise> 32 <xsl:apply-imports/> 33 </xsl:otherwise> 34 </xsl:choose> 35 </xsl:template> 36 37 <!-- Body attributes --> 38 <xsl:template name="body.attributes"> 39 <xsl:attribute name="id"> 40 <xsl:text>blfs</xsl:text> 41 </xsl:attribute> 42 <xsl:attribute name="class"> 43 <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/> 44 </xsl:attribute> 45 </xsl:template> 46 47 <!-- External URLs in italic font --> 48 <xsl:template match="ulink" name="ulink"> 49 <a> 50 <xsl:if test="@id"> 51 <xsl:attribute name="id"> 52 <xsl:value-of select="@id"/> 53 </xsl:attribute> 54 </xsl:if> 55 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute> 56 <strong> 57 <xsl:choose> 58 <xsl:when test="count(child::node())=0"> 59 <xsl:value-of select="@url"/> 60 </xsl:when> 61 <xsl:otherwise> 62 <xsl:apply-templates/> 63 </xsl:otherwise> 64 </xsl:choose> 65 </strong> 66 </a> 67 </xsl:template> 68 69 <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and. 70 isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. --> 71 <xsl:template name="inline.monoseq"> 72 <xsl:param name="content"> 73 <xsl:call-template name="anchor"/> 74 <xsl:call-template name="simple.xlink"> 75 <xsl:with-param name="content"> 76 <xsl:apply-templates/> 77 </xsl:with-param> 78 </xsl:call-template> 79 </xsl:param> 80 <tt class="{local-name(.)}"> 81 <xsl:if test="@dir"> 82 <xsl:attribute name="dir"> 83 <xsl:value-of select="@dir"/> 84 </xsl:attribute> 85 </xsl:if> 86 <xsl:copy-of select="$content"/> 87 </tt> 88 </xsl:template> 89 90 <xsl:template name="inline.boldmonoseq"> 91 <xsl:param name="content"> 92 <xsl:call-template name="anchor"/> 93 <xsl:call-template name="simple.xlink"> 94 <xsl:with-param name="content"> 95 <xsl:apply-templates/> 96 </xsl:with-param> 97 </xsl:call-template> 98 </xsl:param> 99 <!-- don't put <strong> inside figure, example, or table titles --> 100 <!-- or other titles that may already be represented with <strong>'s. --> 101 <xsl:choose> 102 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' 103 or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')"> 104 <tt class="{local-name(.)}"> 105 <xsl:if test="@dir"> 106 <xsl:attribute name="dir"> 107 <xsl:value-of select="@dir"/> 108 </xsl:attribute> 109 </xsl:if> 110 <xsl:copy-of select="$content"/> 111 </tt> 112 </xsl:when> 113 <xsl:otherwise> 114 <strong class="{local-name(.)}"> 115 <tt> 116 <xsl:if test="@dir"> 117 <xsl:attribute name="dir"> 118 <xsl:value-of select="@dir"/> 119 </xsl:attribute> 120 </xsl:if> 121 <xsl:copy-of select="$content"/> 122 </tt> 123 </strong> 124 </xsl:otherwise> 125 </xsl:choose> 126 </xsl:template> 127 128 <xsl:template name="inline.italicmonoseq"> 129 <xsl:param name="content"> 130 <xsl:call-template name="anchor"/> 131 <xsl:call-template name="simple.xlink"> 132 <xsl:with-param name="content"> 133 <xsl:apply-templates/> 134 </xsl:with-param> 135 </xsl:call-template> 136 </xsl:param> 137 <em class="{local-name(.)}"> 138 <tt> 139 <xsl:if test="@dir"> 140 <xsl:attribute name="dir"> 141 <xsl:value-of select="@dir"/> 142 </xsl:attribute> 143 </xsl:if> 144 <xsl:copy-of select="$content"/> 145 </tt> 146 </em> 147 </xsl:template> 38 148 39 149 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.