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-callout.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2009-03-17  |  4.5 KB  |  148 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 - Callouts
  25.  
  26. REMARK: Describe this module
  27. -->
  28.  
  29. <!--@@==========================================================================
  30. db2html.co.color
  31. The text color for callout dingbats
  32.  
  33. REMARK: Describe this param
  34. -->
  35. <xsl:param name="db2html.co.color" select="'#FFFFFF'"/>
  36.  
  37. <!--@@==========================================================================
  38. db2html.co.background_color
  39. The background color for callout dingbats
  40.  
  41. REMARK: Describe this param
  42. -->
  43. <xsl:param name="db2html.co.background_color" select="'#000000'"/>
  44.  
  45. <!--@@==========================================================================
  46. db2html.co.border_color
  47. The border color for callout dingbats
  48.  
  49. REMARK: Describe this param
  50. -->
  51. <xsl:param name="db2html.co.border_color" select="'#000000'"/>
  52.  
  53. <!--@@==========================================================================
  54. db2html.co.color.hover
  55. The text color for callout dingbats when hovering
  56.  
  57. REMARK: Describe this param
  58. -->
  59. <xsl:param name="db2html.co.color.hover" select="'#FFFFFF'"/>
  60.  
  61. <!--@@==========================================================================
  62. db2html.co.background_color.hover
  63. The background color for callout dingbats when hovering
  64.  
  65. REMARK: Describe this param
  66. -->
  67. <xsl:param name="db2html.co.background_color.hover" select="'#333333'"/>
  68.  
  69. <!--@@==========================================================================
  70. db2html.co.border_color.hover
  71. The border color for callout dingbats when hovering.
  72.  
  73. REMARK: Describe this param
  74. -->
  75. <xsl:param name="db2html.co.border_color.hover" select="'#333333'"/>
  76.  
  77.  
  78. <!--**==========================================================================
  79. db2html.co.dingbat
  80. Creates a callout dingbat for a #{co} element
  81. $co: The #{co} element to create a callout dingbat for
  82.  
  83. REMARK: Describe this template
  84. -->
  85. <xsl:template name="db2html.co.dingbat">
  86.   <xsl:param name="co" select="."/>
  87.   <span class="co">
  88.     <xsl:value-of select="count(preceding::co) + 1"/>
  89.   </span>
  90. </xsl:template>
  91.  
  92.  
  93. <!--**==========================================================================
  94. db2html.co.dingbats
  95. Renders a callout dingbat for each #{co} referenced in ${arearefs}
  96. $arearefs: A space-separated list of #{co} elements
  97.  
  98. REMARK: Describe this template
  99. -->
  100. <xsl:template name="db2html.co.dingbats">
  101.   <xsl:param name="arearefs" select="@arearefs"/>
  102.   <!-- FIXME -->
  103. </xsl:template>
  104.  
  105.  
  106. <!--**==========================================================================
  107. db2html.callout.css
  108. Outputs CSS that controls the appearance of callouts
  109.  
  110. REMARK: Describe this template
  111. -->
  112. <xsl:template name="db2html.callout.css">
  113. <xsl:text>
  114. span.co {
  115.   margin-left: 0.2em; margin-right: 0.2em;
  116.   padding-left: 0.4em; padding-right: 0.4em;
  117.   border: solid 1px </xsl:text>
  118.   <xsl:value-of select="$db2html.co.border_color"/><xsl:text>;
  119.   -moz-border-radius: 8px;
  120.   background-color: </xsl:text>
  121.   <xsl:value-of select="$db2html.co.background_color"/><xsl:text>;
  122.   color: </xsl:text>
  123.   <xsl:value-of select="$db2html.co.color"/><xsl:text>;
  124.   font-size: 8px;
  125. }
  126. span.co:hover {
  127.   border-color: </xsl:text>
  128.   <xsl:value-of select="$db2html.co.border_color.hover"/><xsl:text>;
  129.   background-color: </xsl:text>
  130.   <xsl:value-of select="$db2html.co.background_color.hover"/><xsl:text>;
  131.   color: </xsl:text>
  132.   <xsl:value-of select="$db2html.co.color.hover"/><xsl:text>;
  133. }
  134. span.co a { text-decoration: none; }
  135. span.co a:hover { text-decoration: none; }
  136. </xsl:text>
  137. </xsl:template>
  138.  
  139.  
  140. <!-- == Matched Templates == -->
  141.  
  142. <!-- = co = -->
  143. <xsl:template match="co">
  144.   <xsl:call-template name="db2html.co.dingbat"/>
  145. </xsl:template>
  146.  
  147. </xsl:stylesheet>
  148.