source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/htmltbl.xsl@ 15c7d39

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 15c7d39 was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="ASCII"?>
2<!--This file was created automatically by html2xhtml-->
3<!--from the HTML stylesheets.-->
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5
6<!-- ********************************************************************
7 $Id: htmltbl.xsl 9501 2012-07-16 00:14:50Z bobstayton $
8 ********************************************************************
9
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://docbook.sf.net/release/xsl/current/ for
12 copyright and other information.
13
14 ******************************************************************** -->
15
16<!-- ==================================================================== -->
17
18<xsl:template match="table" mode="htmlTable">
19 <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml">
20 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
21 <xsl:call-template name="htmlTable"/>
22 </xsl:element>
23</xsl:template>
24
25<xsl:template match="colgroup" mode="htmlTable">
26 <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
27 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
28 <xsl:apply-templates mode="htmlTable"/>
29 </xsl:element>
30</xsl:template>
31
32<xsl:template match="col" mode="htmlTable">
33 <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
34 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
35 </xsl:element>
36</xsl:template>
37
38<!-- Handled by formal.object.title template -->
39<xsl:template match="caption" mode="htmlTable"/>
40
41<xsl:template match="tbody|thead|tfoot|tr" mode="htmlTable">
42 <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
43 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
44 <xsl:apply-templates mode="htmlTable"/>
45 </xsl:element>
46</xsl:template>
47
48<xsl:template match="th|td" mode="htmlTable">
49 <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
50 <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
51 <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
52 </xsl:element>
53</xsl:template>
54
55<!-- don't copy through DocBook-specific attributes on HTML table markup -->
56<!-- default behavior is to not copy through because there are more
57 DocBook attributes than HTML attributes -->
58<xsl:template mode="htmlTableAtt" match="@*"/>
59
60<!-- copy these through -->
61<xsl:template mode="htmlTableAtt" match="@abbr | @align | @axis | @bgcolor | @border | @cellpadding | @cellspacing | @char | @charoff | @class | @dir | @frame | @headers | @height | @lang | @nowrap | @onclick | @ondblclick | @onkeydown | @onkeypress | @onkeyup | @onmousedown | @onmousemove | @onmouseout | @onmouseover | @onmouseup | @rules | @style | @summary | @title | @valign | @valign | @width | @xml:lang">
62 <xsl:copy-of select="."/>
63</xsl:template>
64
65<xsl:template match="@span|@rowspan|@colspan" mode="htmlTableAtt">
66 <!-- No need to copy through the DTD's default value "1" of the attribute -->
67 <xsl:if test="number(.) != 1">
68 <xsl:attribute name="{local-name(.)}">
69 <xsl:value-of select="."/>
70 </xsl:attribute>
71 </xsl:if>
72</xsl:template>
73
74<!-- map floatstyle to HTML float values -->
75<xsl:template match="@floatstyle" mode="htmlTableAtt">
76 <xsl:attribute name="style">
77 <xsl:text>float: </xsl:text>
78 <xsl:choose>
79 <xsl:when test="contains(., 'left')">left</xsl:when>
80 <xsl:when test="contains(., 'right')">right</xsl:when>
81 <xsl:when test="contains(., 'start')">
82 <xsl:value-of select="$direction.align.start"/>
83 </xsl:when>
84 <xsl:when test="contains(., 'end')">
85 <xsl:value-of select="$direction.align.end"/>
86 </xsl:when>
87 <xsl:when test="contains(., 'inside')">
88 <xsl:value-of select="$direction.align.start"/>
89 </xsl:when>
90 <xsl:when test="contains(., 'outside')">
91 <xsl:value-of select="$direction.align.end"/>
92 </xsl:when>
93 <xsl:when test="contains(., 'before')">none</xsl:when>
94 <xsl:when test="contains(., 'none')">none</xsl:when>
95 </xsl:choose>
96 <xsl:text>;</xsl:text>
97 </xsl:attribute>
98</xsl:template>
99
100</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.