1 <?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:d="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="d" version="1.0">
3 <!-- ********************************************************************
5 This file is part of the XSL DocBook Stylesheet distribution.
6 See ../README or http://cdn.docbook.org/release/xsl/current/ for
7 copyright and other information.
9 ******************************************************************** -->
11 <!-- ==================================================================== -->
13 <xsl:template match="d:table" mode="htmlTable">
14 <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml">
15 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
16 <xsl:call-template name="htmlTable"/>
20 <xsl:template match="d:colgroup" mode="htmlTable">
21 <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
22 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
23 <xsl:apply-templates mode="htmlTable"/>
27 <xsl:template match="d:col" mode="htmlTable">
28 <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
29 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
33 <!-- Handled by formal.object.title template -->
34 <xsl:template match="d:caption" mode="htmlTable"/>
36 <xsl:template match="d:tbody|d:thead|d:tfoot|d:tr" mode="htmlTable">
37 <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
38 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
39 <xsl:apply-templates mode="htmlTable"/>
43 <xsl:template match="d:th|d:td" mode="htmlTable">
44 <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
45 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
46 <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
50 <!-- don't copy through DocBook-specific attributes on HTML table markup -->
51 <!-- default behavior is to not copy through because there are more
52 DocBook attributes than HTML attributes -->
53 <xsl:template mode="htmlTableAtt" match="@*"/>
55 <!-- copy these through -->
56 <xsl:template mode="htmlTableAtt" match="@abbr | @align | @axis | @bgcolor | @border | @cellpadding | @cellspacing | @char | @charoff | @class | @dir | @frame | @headers | @height | @id | @lang | @nowrap | @onclick | @ondblclick | @onkeydown | @onkeypress | @onkeyup | @onmousedown | @onmousemove | @onmouseout | @onmouseover | @onmouseup | @rules | @scope | @style | @summary | @title | @valign | @valign | @width | @xml:id | @xml:lang">
57 <xsl:copy-of select="."/>
60 <xsl:template match="@span|@rowspan|@colspan" mode="htmlTableAtt">
61 <!-- No need to copy through the DTD's default value "1" of the attribute -->
62 <xsl:if test="number(.) != 1">
63 <xsl:attribute name="{local-name(.)}">
64 <xsl:value-of select="."/>
69 <!-- map floatstyle to HTML float values -->
70 <xsl:template match="@floatstyle" mode="htmlTableAtt">
71 <xsl:attribute name="style">
72 <xsl:text>float: </xsl:text>
74 <xsl:when test="contains(., 'left')">left</xsl:when>
75 <xsl:when test="contains(., 'right')">right</xsl:when>
76 <xsl:when test="contains(., 'start')">
77 <xsl:value-of select="$direction.align.start"/>
79 <xsl:when test="contains(., 'end')">
80 <xsl:value-of select="$direction.align.end"/>
82 <xsl:when test="contains(., 'inside')">
83 <xsl:value-of select="$direction.align.start"/>
85 <xsl:when test="contains(., 'outside')">
86 <xsl:value-of select="$direction.align.end"/>
88 <xsl:when test="contains(., 'before')">none</xsl:when>
89 <xsl:when test="contains(., 'none')">none</xsl:when>
91 <xsl:text>;</xsl:text>