~mfisch/yelp-xsl/update-to-3.8.1

« back to all changes in this revision

Viewing changes to xslt/docbook/html/db2html-title.xsl

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-03-17 15:12:22 UTC
  • mfrom: (1.1.16) (11.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120317151222-pnzcgh4actzfkwdb
Tags: 3.3.3-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
2
 
<!--
3
 
This program is free software; you can redistribute it and/or modify it under
4
 
the terms of the GNU Lesser General Public License as published by the Free
5
 
Software Foundation; either version 2 of the License, or (at your option) any
6
 
later version.
7
 
 
8
 
This program is distributed in the hope that it will be useful, but WITHOUT
9
 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
 
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11
 
details.
12
 
 
13
 
You should have received a copy of the GNU Lesser General Public License
14
 
along with this program; see the file COPYING.LGPL.  If not, write to the
15
 
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16
 
02111-1307, USA.
17
 
-->
18
 
 
19
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
20
 
                xmlns:db="http://docbook.org/ns/docbook"
21
 
                xmlns="http://www.w3.org/1999/xhtml"
22
 
                version="1.0">
23
 
 
24
 
<!--!!==========================================================================
25
 
DocBook to HTML - Titles and Subtitles
26
 
:Requires: db-chunk db2html-xref gettext
27
 
 
28
 
This stylesheet is going away
29
 
-->
30
 
 
31
 
 
32
 
<!--**==========================================================================
33
 
db2html.title.block
34
 
Generates a labeled block title
35
 
$node: The element to generate a title for
36
 
$referent: The element that ${node} is a title for
37
 
$lang: The locale of the text in ${node}
38
 
$dir: The text direction, either #{ltr} or #{rtl}
39
 
 
40
 
REMARK: Talk about the different kinds of title blocks
41
 
-->
42
 
<xsl:template name="db2html.title.block">
43
 
  <xsl:param name="node" select="."/>
44
 
  <xsl:param name="referent" select="$node/.."/>
45
 
  <xsl:param name="lang" select="$node/@lang | $node/@xml:lang"/>
46
 
  <xsl:param name="dir" select="false()"/>
47
 
  <xsl:variable name="depth_in_chunk">
48
 
    <xsl:call-template name="db.chunk.depth-in-chunk">
49
 
      <xsl:with-param name="node" select="$referent"/>
50
 
    </xsl:call-template>
51
 
  </xsl:variable>
52
 
  <div class="block {local-name($node)}">
53
 
    <xsl:choose>
54
 
      <xsl:when test="$dir = 'ltr' or $dir = 'rtl'">
55
 
        <xsl:attribute name="dir">
56
 
          <xsl:value-of select="$dir"/>
57
 
        </xsl:attribute>
58
 
      </xsl:when>
59
 
      <xsl:when test="$lang">
60
 
        <xsl:attribute name="dir">
61
 
          <xsl:call-template name="l10n.direction">
62
 
            <xsl:with-param name="lang" select="$lang"/>
63
 
          </xsl:call-template>
64
 
        </xsl:attribute>
65
 
      </xsl:when>
66
 
    </xsl:choose>
67
 
    <span class="{local-name($node)}">
68
 
      <xsl:call-template name="db2html.anchor">
69
 
        <xsl:with-param name="node" select="$node"/>
70
 
      </xsl:call-template>
71
 
      <xsl:apply-templates select="$node/node()"/>
72
 
    </span>
73
 
  </div>
74
 
</xsl:template>
75
 
 
76
 
<!--**==========================================================================
77
 
db2html.title.header
78
 
This template is going away
79
 
 
80
 
This template is going away
81
 
-->
82
 
<xsl:template name="db2html.title.header"/>
83
 
 
84
 
 
85
 
 
86
 
 
87
 
<!-- == Matched Templates == -->
88
 
 
89
 
<!-- = subtitle = -->
90
 
<!-- Handled in db2html.title.header -->
91
 
<xsl:template match="subtitle | db:subtitle"/>
92
 
 
93
 
<!-- = msg/title = -->
94
 
<xsl:template match="msg/title | db:msg/db:title">
95
 
  <xsl:call-template name="db2html.title.block"/>
96
 
</xsl:template>
97
 
 
98
 
<!-- = msgrel/title = -->
99
 
<xsl:template match="msgrel/title | db:msgrel/db:title">
100
 
  <xsl:call-template name="db2html.title.block"/>
101
 
</xsl:template>
102
 
 
103
 
<!-- = msgset/title = -->
104
 
<xsl:template match="msgset/title | db:msgset/db:title">
105
 
  <xsl:call-template name="db2html.title.block"/>
106
 
</xsl:template>
107
 
 
108
 
<!-- = msgsub/title  = -->
109
 
<xsl:template match="msgsub/title | db:msgsub/db:title">
110
 
  <xsl:call-template name="db2html.title.block"/>
111
 
</xsl:template>
112
 
 
113
 
 
114
 
</xsl:stylesheet>