Changeset a9fde34e for stylesheets/xhtml/lfs-mixed.xsl
- Timestamp:
- 01/19/2005 06:12:21 PM (20 years ago)
- Children:
- 5156910b
- Parents:
- 0c81bec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/xhtml/lfs-mixed.xsl
r0c81bec ra9fde34e 10 10 <xsl:when test="child::* = userinput"> 11 11 <pre class="userinput"> 12 <kbd class="command"> 13 <xsl:value-of select="."/> 14 </kbd> 12 <xsl:apply-templates/> 15 13 </pre> 16 14 </xsl:when> … … 22 20 </xsl:choose> 23 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 24 36 25 37 <!-- variablelist --> … … 61 73 </xsl:template> 62 74 63 <!-- Sect1 attributes --> 64 <xsl:template match="sect1"> 65 <div> 66 <xsl:choose> 67 <xsl:when test="@role"> 68 <xsl:attribute name="class"> 69 <xsl:value-of select="@role"/> 75 <!-- External URLs in italic font --> 76 <xsl:template match="ulink" name="ulink"> 77 <a> 78 <xsl:if test="@id"> 79 <xsl:attribute name="id"> 80 <xsl:value-of select="@id"/> 81 </xsl:attribute> 82 </xsl:if> 83 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute> 84 <i> 85 <xsl:choose> 86 <xsl:when test="count(child::node())=0"> 87 <xsl:value-of select="@url"/> 88 </xsl:when> 89 <xsl:otherwise> 90 <xsl:apply-templates/> 91 </xsl:otherwise> 92 </xsl:choose> 93 </i> 94 </a> 95 </xsl:template> 96 97 <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and. 98 isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. --> 99 <xsl:template name="inline.monoseq"> 100 <xsl:param name="content"> 101 <xsl:call-template name="anchor"/> 102 <xsl:call-template name="simple.xlink"> 103 <xsl:with-param name="content"> 104 <xsl:apply-templates/> 105 </xsl:with-param> 106 </xsl:call-template> 107 </xsl:param> 108 <tt class="{local-name(.)}"> 109 <xsl:if test="@dir"> 110 <xsl:attribute name="dir"> 111 <xsl:value-of select="@dir"/> 112 </xsl:attribute> 113 </xsl:if> 114 <xsl:copy-of select="$content"/> 115 </tt> 116 </xsl:template> 117 118 <xsl:template name="inline.boldmonoseq"> 119 <xsl:param name="content"> 120 <xsl:call-template name="anchor"/> 121 <xsl:call-template name="simple.xlink"> 122 <xsl:with-param name="content"> 123 <xsl:apply-templates/> 124 </xsl:with-param> 125 </xsl:call-template> 126 </xsl:param> 127 <!-- don't put <strong> inside figure, example, or table titles --> 128 <!-- or other titles that may already be represented with <strong>'s. --> 129 <xsl:choose> 130 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' 131 or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')"> 132 <tt class="{local-name(.)}"> 133 <xsl:if test="@dir"> 134 <xsl:attribute name="dir"> 135 <xsl:value-of select="@dir"/> 136 </xsl:attribute> 137 </xsl:if> 138 <xsl:copy-of select="$content"/> 139 </tt> 140 </xsl:when> 141 <xsl:otherwise> 142 <strong class="{local-name(.)}"> 143 <tt> 144 <xsl:if test="@dir"> 145 <xsl:attribute name="dir"> 146 <xsl:value-of select="@dir"/> 147 </xsl:attribute> 148 </xsl:if> 149 <xsl:copy-of select="$content"/> 150 </tt> 151 </strong> 152 </xsl:otherwise> 153 </xsl:choose> 154 </xsl:template> 155 156 <xsl:template name="inline.italicmonoseq"> 157 <xsl:param name="content"> 158 <xsl:call-template name="anchor"/> 159 <xsl:call-template name="simple.xlink"> 160 <xsl:with-param name="content"> 161 <xsl:apply-templates/> 162 </xsl:with-param> 163 </xsl:call-template> 164 </xsl:param> 165 <em class="{local-name(.)}"> 166 <tt> 167 <xsl:if test="@dir"> 168 <xsl:attribute name="dir"> 169 <xsl:value-of select="@dir"/> 70 170 </xsl:attribute> 71 </xsl:when> 72 <xsl:otherwise> 73 <xsl:attribute name="class"> 74 <xsl:value-of select="name(.)"/> 75 </xsl:attribute> 76 </xsl:otherwise> 77 </xsl:choose> 78 <xsl:call-template name="language.attribute"/> 79 <xsl:call-template name="sect1.titlepage"/> 80 <xsl:apply-templates/> 81 <xsl:call-template name="process.chunk.footnotes"/> 82 </div> 171 </xsl:if> 172 <xsl:copy-of select="$content"/> 173 </tt> 174 </em> 83 175 </xsl:template> 84 176 85 <!-- Sect2 attributes -->86 <xsl:template match="sect2">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:attribute name="class">96 <xsl:value-of select="name(.)"/>97 </xsl:attribute>98 </xsl:otherwise>99 </xsl:choose>100 <xsl:call-template name="language.attribute"/>101 <xsl:call-template name="sect2.titlepage"/>102 <xsl:apply-templates/>103 <xsl:call-template name="process.chunk.footnotes"/>104 </div>105 </xsl:template>106 177 107 178 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.