diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2005-01-04 14:18:22 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2005-01-04 14:18:22 +0000 |
commit | 2611a3b43abea5753a07ce8e6d3c448e22cafba9 (patch) | |
tree | c767cb2b5091189be78c3575c904d0a53a73a502 /stylesheets/xhtml | |
parent | 746781c741f049a48e94a7855cbdeafb6467cd63 (diff) |
Updated the unstable XSL files to current testing version,
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4486 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/xhtml')
-rw-r--r-- | stylesheets/xhtml/lfs-mixed.xsl | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/stylesheets/xhtml/lfs-mixed.xsl b/stylesheets/xhtml/lfs-mixed.xsl index 20344d449..e95acc52c 100644 --- a/stylesheets/xhtml/lfs-mixed.xsl +++ b/stylesheets/xhtml/lfs-mixed.xsl @@ -93,6 +93,86 @@ </i> </a> </xsl:template> + + <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and. + isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. --> + <xsl:template name="inline.monoseq"> + <xsl:param name="content"> + <xsl:call-template name="anchor"/> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + <tt class="{local-name(.)}"> + <xsl:if test="@dir"> + <xsl:attribute name="dir"> + <xsl:value-of select="@dir"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </tt> + </xsl:template> + + <xsl:template name="inline.boldmonoseq"> + <xsl:param name="content"> + <xsl:call-template name="anchor"/> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + <!-- don't put <strong> inside figure, example, or table titles --> + <!-- or other titles that may already be represented with <strong>'s. --> + <xsl:choose> + <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' + or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')"> + <tt class="{local-name(.)}"> + <xsl:if test="@dir"> + <xsl:attribute name="dir"> + <xsl:value-of select="@dir"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </tt> + </xsl:when> + <xsl:otherwise> + <strong class="{local-name(.)}"> + <tt> + <xsl:if test="@dir"> + <xsl:attribute name="dir"> + <xsl:value-of select="@dir"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </tt> + </strong> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="inline.italicmonoseq"> + <xsl:param name="content"> + <xsl:call-template name="anchor"/> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + <em class="{local-name(.)}"> + <tt> + <xsl:if test="@dir"> + <xsl:attribute name="dir"> + <xsl:value-of select="@dir"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$content"/> + </tt> + </em> + </xsl:template> </xsl:stylesheet> |