diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2014-04-26 15:11:58 +0200 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2014-04-26 15:11:58 +0200 |
commit | 140d836e9cd54fb67b969fd82ef7ed19ba574d40 (patch) | |
tree | 0df3e32ee39603d43f9b90fd2f2e1f7cce4249d4 /src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/slides/xhtml/tables.xsl | |
parent | cb3425abe0bc2d05caf401ca24b82a25a81f009d (diff) |
Imported Upstream version 2.3.1upstream/2.3.1
Diffstat (limited to 'src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/slides/xhtml/tables.xsl')
-rw-r--r-- | src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/slides/xhtml/tables.xsl | 334 |
1 files changed, 334 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/slides/xhtml/tables.xsl b/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/slides/xhtml/tables.xsl new file mode 100644 index 0000000..7d5ec6b --- /dev/null +++ b/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/slides/xhtml/tables.xsl @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="ASCII"?> +<!--This file was created automatically by html2xhtml--> +<!--from the HTML stylesheets.--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> + +<xsl:import href="slides-common.xsl"/> + +<xsl:param name="blank.image" select="'blank.png'"/> +<xsl:param name="arrow.image" select="'pointer.png'"/> + +<xsl:param name="toc.bg.color">#6A719C</xsl:param> +<xsl:param name="toc.width">220</xsl:param> + +<xsl:param name="css.stylesheet" select="'slides-table.css'"/> + +<!-- ============================================================ --> + +<xsl:template name="foilgroup-body"> + <table border="0" width="100%" summary="Navigation and body table" cellpadding="0" cellspacing="0"> + <tr> + <td width="{$toc.width}" valign="top" align="left"> + <xsl:if test="$toc.bg.color != ''"> + <xsl:attribute name="bgcolor"> + <xsl:value-of select="$toc.bg.color"/> + </xsl:attribute> + </xsl:if> + <div class="ttoc"> + <xsl:apply-templates select="." mode="t-toc"/> + </div> + </td> + <td> </td> + <td valign="top" align="left"> + <xsl:if test="$body.bg.color != ''"> + <xsl:attribute name="bgcolor"> + <xsl:value-of select="$body.bg.color"/> + </xsl:attribute> + </xsl:if> + <div class="{name(.)}"> + <xsl:apply-templates select="*[name(.) != 'foil' and name(.) != 'foilgroup']"/> + </div> + + <xsl:if test="$foilgroup.toc != 0"> + <dl class="toc"> + <xsl:apply-templates select="foil" mode="toc"/> + </dl> + </xsl:if> + </td> + </tr> + </table> +</xsl:template> + +<xsl:template name="foil-body"> + <table border="0" width="100%" summary="Navigation and body table" cellpadding="0" cellspacing="0"> + <tr> + <td width="{$toc.width}" valign="top" align="left"> + <xsl:if test="$toc.bg.color != ''"> + <xsl:attribute name="bgcolor"> + <xsl:value-of select="$toc.bg.color"/> + </xsl:attribute> + </xsl:if> + <div class="ttoc"> + <xsl:apply-templates select="." mode="t-toc"/> + </div> + </td> + <td> </td> + <td valign="top" align="left"> + <xsl:if test="$body.bg.color != ''"> + <xsl:attribute name="bgcolor"> + <xsl:value-of select="$body.bg.color"/> + </xsl:attribute> + </xsl:if> + <div class="{name(.)}"> + <xsl:apply-templates/> + </div> + </td> + </tr> + </table> +</xsl:template> + +<!-- ============================================================ --> + +<xsl:template match="foilgroup" mode="t-toc"> + <xsl:variable name="thisfoilgroup" select="."/> + + <xsl:for-each select="/slides/foil|/slides/foilgroup"> + <xsl:choose> + <xsl:when test="name(.) = 'foilgroup'"> + <xsl:choose> + <xsl:when test="$thisfoilgroup = ."> + <img alt="+"> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$arrow.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + </xsl:when> + <xsl:otherwise> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + </xsl:otherwise> + </xsl:choose> + + <span class="ttoc-foilgroup"> + <a> + <xsl:attribute name="href"> + <xsl:apply-templates select="." mode="filename"/> + </xsl:attribute> + <xsl:apply-templates select="." mode="toc-title"/> + </a> + </span> + <br/> + + <xsl:if test="$thisfoilgroup = ."> + <xsl:for-each select="foil"> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + + <span class="ttoc-foil"> + <a> + <xsl:attribute name="href"> + <xsl:apply-templates select="." mode="filename"/> + </xsl:attribute> + <xsl:apply-templates select="." mode="toc-title"/> + </a> + </span> + <br/> + </xsl:for-each> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + <span class="ttoc-foil"> + <a> + <xsl:attribute name="href"> + <xsl:apply-templates select="." mode="filename"/> + </xsl:attribute> + <xsl:apply-templates select="." mode="toc-title"/> + </a> + </span> + <br/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> +</xsl:template> + +<xsl:template match="foil" mode="t-toc"> + <xsl:variable name="thisfoil" select="."/> + + <xsl:for-each select="/slides/foil|/slides/foilgroup"> + <xsl:choose> + <xsl:when test="name(.) = 'foilgroup'"> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + <span class="ttoc-foilgroup"> + <a> + <xsl:attribute name="href"> + <xsl:apply-templates select="." mode="filename"/> + </xsl:attribute> + <xsl:apply-templates select="." mode="toc-title"/> + </a> + </span> + <br/> + + <xsl:if test="$thisfoil/ancestor::foilgroup = ."> + <xsl:for-each select="foil"> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + + <xsl:choose> + <xsl:when test="$thisfoil = ."> + <img alt="+"> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$arrow.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + </xsl:when> + <xsl:otherwise> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + </xsl:otherwise> + </xsl:choose> + + <span class="ttoc-foil"> + <a> + <xsl:attribute name="href"> + <xsl:apply-templates select="." mode="filename"/> + </xsl:attribute> + <xsl:apply-templates select="." mode="toc-title"/> + </a> + </span> + <br/> + </xsl:for-each> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <!-- foils only --> + <xsl:for-each select="/slides/foil"> + <xsl:choose> + <xsl:when test="$thisfoil = ."> + <img alt="+"> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$arrow.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + </xsl:when> + <xsl:otherwise> + <img alt=" "> + <xsl:attribute name="src"> + <xsl:call-template name="graphics-file"> + <xsl:with-param name="image" select="$blank.image"/> + </xsl:call-template> + </xsl:attribute> + </img> + </xsl:otherwise> + </xsl:choose> + <span class="ttoc-foil"> + <xsl:apply-templates select="." mode="toc-title"/> + </span> + <br/> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> +</xsl:template> + +<!-- ============================================================ --> + +<xsl:template match="slides" mode="toc-title"> + <xsl:call-template name="nobreak"> + <xsl:with-param name="string"> + <xsl:choose> + <xsl:when test="slidesinfo/titleabbrev"> + <xsl:value-of select="slidesinfo/titleabbrev"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="slidesinfo/title"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="foilgroup" mode="toc-title"> + <xsl:call-template name="nobreak"> + <xsl:with-param name="string"> + <xsl:choose> + <xsl:when test="titleabbrev"> + <xsl:value-of select="titleabbrev"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="title"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="foil" mode="toc-title"> + <xsl:call-template name="nobreak"> + <xsl:with-param name="string"> + <xsl:choose> + <xsl:when test="titleabbrev"> + <xsl:value-of select="titleabbrev"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="title"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template name="nobreak"> + <xsl:param name="string" select="''"/> + <xsl:choose> + <xsl:when test="contains($string, ' ')"> + <xsl:value-of select="substring-before($string, ' ')"/> + <xsl:text> </xsl:text> + <xsl:call-template name="nobreak"> + <xsl:with-param name="string" select="substring-after($string, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ============================================================ --> + +</xsl:stylesheet> |