home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / xml / gnome / xslt / docbook / html / db2html-title.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2009-03-17  |  3.9 KB  |  127 lines

  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="http://www.w3.org/1999/xhtml"
  21.                 version="1.0">
  22.  
  23. <!--!!==========================================================================
  24. DocBook to HTML - Titles and Subtitles
  25. :Requires: db-chunk db-label db2html-xref gettext
  26.  
  27. This stylesheet is going away
  28. -->
  29.  
  30.  
  31. <!--**==========================================================================
  32. db2html.title.block
  33. Generates a labeled block title
  34. $node: The element to generate a title for
  35. $referent: The element that ${node} is a title for
  36. $lang: The locale of the text in ${node}
  37. $dir: The text direction, either #{ltr} or #{rtl}
  38.  
  39. REMARK: Talk about the different kinds of title blocks
  40. -->
  41. <xsl:template name="db2html.title.block">
  42.   <xsl:param name="node" select="."/>
  43.   <xsl:param name="referent" select="$node/.."/>
  44.   <xsl:param name="lang" select="$node/@lang"/>
  45.   <xsl:param name="dir" select="false()"/>
  46.   <xsl:variable name="depth_in_chunk">
  47.     <xsl:call-template name="db.chunk.depth-in-chunk">
  48.       <xsl:with-param name="node" select="$referent"/>
  49.     </xsl:call-template>
  50.   </xsl:variable>
  51.   <div class="block block-first {local-name($node)}">
  52.     <xsl:choose>
  53.       <xsl:when test="$dir = 'ltr' or $dir = 'rtl'">
  54.         <xsl:attribute name="dir">
  55.           <xsl:value-of select="$dir"/>
  56.         </xsl:attribute>
  57.       </xsl:when>
  58.       <xsl:when test="$lang">
  59.         <xsl:attribute name="dir">
  60.           <xsl:call-template name="l10n.direction">
  61.             <xsl:with-param name="lang" select="$lang"/>
  62.           </xsl:call-template>
  63.         </xsl:attribute>
  64.       </xsl:when>
  65.     </xsl:choose>
  66.     <span class="{local-name($node)}">
  67.       <xsl:call-template name="db2html.anchor">
  68.         <xsl:with-param name="node" select="$node"/>
  69.       </xsl:call-template>
  70.       <span class="label">
  71.         <xsl:call-template name="db.label">
  72.           <xsl:with-param name="node" select="$referent"/>
  73.           <xsl:with-param name="role" select="'header'"/>
  74.           <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  75.         </xsl:call-template>
  76.       </span>
  77.       <xsl:apply-templates select="$node/node()"/>
  78.     </span>
  79.   </div>
  80. </xsl:template>
  81.  
  82. <!--**==========================================================================
  83. db2html.title.header
  84. This template is going away
  85.  
  86. This template is going away
  87. -->
  88. <xsl:template name="db2html.title.header"/>
  89.  
  90.  
  91.  
  92.  
  93. <!-- == Matched Templates == -->
  94.  
  95. <!-- = subtitle = -->
  96. <!-- Handled in db2html.title.header -->
  97. <xsl:template match="subtitle"/>
  98.  
  99.  
  100. <!-- = equation/title = -->
  101. <xsl:template match="equation/title">
  102.   <xsl:call-template name="db2html.title.block"/>
  103. </xsl:template>
  104.  
  105. <!-- = msg/title = -->
  106. <xsl:template match="msg/title">
  107.   <xsl:call-template name="db2html.title.block"/>
  108. </xsl:template>
  109.  
  110. <!-- = msgrel/title = -->
  111. <xsl:template match="msgrel/title">
  112.   <xsl:call-template name="db2html.title.block"/>
  113. </xsl:template>
  114.  
  115. <!-- = msgset/title = -->
  116. <xsl:template match="msgset/title">
  117.   <xsl:call-template name="db2html.title.block"/>
  118. </xsl:template>
  119.  
  120. <!-- = msgsub/title  = -->
  121. <xsl:template match="msgsub/title">
  122.   <xsl:call-template name="db2html.title.block"/>
  123. </xsl:template>
  124.  
  125.  
  126. </xsl:stylesheet>
  127.