Update of /cvsroot/boost/boost/tools/boostbook/xsl
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15538

Modified Files:
        html.xsl 
Added Files:
        callout.xsl 
Log Message:
added callouts

--- NEW FILE: callout.xsl ---
<?xml version="1.0" encoding="utf-8"?>
<!--
   Copyright (c) 2007 Joel de Guzman <djowel -at- gmail.com>

   Distributed under the Boost Software License, Version 1.0.
   (See accompanying file LICENSE_1_0.txt or copy at
   http://www.boost.org/LICENSE_1_0.txt)
  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0">

<xsl:import 
href="http://docbook.sourceforge.net/release/xsl/current/html/callout.xsl"/>
<xsl:import href="relative-href.xsl"/>

<xsl:template name="callout-bug">
  <xsl:param name="conum" select='1'/>

  <xsl:choose>
    <xsl:when test="$callout.graphics != 0
                    and $conum &lt;= $callout.graphics.number.limit">

      <xsl:variable name="relative_callout_graphics_path">
        <xsl:call-template name="href.target.relative">
          <xsl:with-param name="target" select="$callout.graphics.path"/>
        </xsl:call-template>
      </xsl:variable>

      <img 
src="{$relative_callout_graphics_path}{$conum}{$callout.graphics.extension}"
           alt="{$conum}" border="0"/>
    </xsl:when>

    <xsl:when test="$callout.unicode != 0
                    and $conum &lt;= $callout.unicode.number.limit">
      <xsl:choose>
        <xsl:when test="$callout.unicode.start.character = 10102">
          <xsl:choose>
            <xsl:when test="$conum = 1">&#10102;</xsl:when>
            <xsl:when test="$conum = 2">&#10103;</xsl:when>
            <xsl:when test="$conum = 3">&#10104;</xsl:when>
            <xsl:when test="$conum = 4">&#10105;</xsl:when>
            <xsl:when test="$conum = 5">&#10106;</xsl:when>
            <xsl:when test="$conum = 6">&#10107;</xsl:when>
            <xsl:when test="$conum = 7">&#10108;</xsl:when>
            <xsl:when test="$conum = 8">&#10109;</xsl:when>
            <xsl:when test="$conum = 9">&#10110;</xsl:when>
            <xsl:when test="$conum = 10">&#10111;</xsl:when>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:message>
            <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
            <xsl:text>when $callout.unicode.start.character is </xsl:text>
            <xsl:value-of select="$callout.unicode.start.character"/>
          </xsl:message>
          <xsl:text>(</xsl:text>
          <xsl:value-of select="$conum"/>
          <xsl:text>)</xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text>(</xsl:text>
      <xsl:value-of select="$conum"/>
      <xsl:text>)</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

</xsl:stylesheet>

Index: html.xsl
===================================================================
RCS file: /cvsroot/boost/boost/tools/boostbook/xsl/html.xsl,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- html.xsl    13 Nov 2006 16:24:15 -0000      1.27
+++ html.xsl    21 Feb 2007 00:47:37 -0000      1.28
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
    Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
-  
+
    Distributed under the Boost Software License, Version 1.0.
    (See accompanying file LICENSE_1_0.txt or copy at
    http://www.boost.org/LICENSE_1_0.txt)
@@ -20,6 +20,7 @@
   <xsl:import href="admon.xsl"/>
   <xsl:import href="xref.xsl"/>
   <xsl:import href="relative-href.xsl"/>
+  <xsl:import href="callout.xsl"/>
 
   <xsl:param name="admon.style"/>
   <xsl:param name="admon.graphics">1</xsl:param>
@@ -36,7 +37,7 @@
   <xsl:param name="doc.standalone">false</xsl:param>
   <xsl:param name="chunker.output.indent">yes</xsl:param>
   <xsl:param name="toc.max.depth">2</xsl:param>
-  
+
 <xsl:param name="admon.style">
     <!-- Remove the style. Let the CSS do the styling -->
 </xsl:param>
@@ -69,22 +70,22 @@
     <xsl:param name="text"/>
 
     <!-- Remove the "$Date: " -->
-    <xsl:variable name="text.noprefix" 
+    <xsl:variable name="text.noprefix"
       select="substring-after($text, '$Date: ')"/>
 
     <!-- Grab the year -->
     <xsl:variable name="year" select="substring-before($text.noprefix, '/')"/>
-    <xsl:variable name="text.noyear" 
+    <xsl:variable name="text.noyear"
       select="substring-after($text.noprefix, '/')"/>
 
     <!-- Grab the month -->
     <xsl:variable name="month" select="substring-before($text.noyear, '/')"/>
-    <xsl:variable name="text.nomonth" 
+    <xsl:variable name="text.nomonth"
       select="substring-after($text.noyear, '/')"/>
 
     <!-- Grab the year -->
     <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
-    <xsl:variable name="text.noday" 
+    <xsl:variable name="text.noday"
       select="substring-after($text.nomonth, ' ')"/>
 
     <!-- Get the time -->
@@ -116,27 +117,27 @@
     <xsl:param name="text"/>
 
     <!-- Remove the "$Date: " -->
-    <xsl:variable name="text.noprefix" 
+    <xsl:variable name="text.noprefix"
       select="substring-after($text, '$Date: ')"/>
 
     <!-- Grab the year -->
     <xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
-    <xsl:variable name="text.noyear" 
+    <xsl:variable name="text.noyear"
       select="substring-after($text.noprefix, '-')"/>
 
     <!-- Grab the month -->
     <xsl:variable name="month" select="substring-before($text.noyear, '-')"/>
-    <xsl:variable name="text.nomonth" 
+    <xsl:variable name="text.nomonth"
       select="substring-after($text.noyear, '-')"/>
 
     <!-- Grab the year -->
     <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
-    <xsl:variable name="text.noday" 
+    <xsl:variable name="text.noday"
       select="substring-after($text.nomonth, ' ')"/>
 
     <!-- Get the time -->
     <xsl:variable name="time" select="substring-before($text.noday, ' ')"/>
-    <xsl:variable name="text.notime" 
+    <xsl:variable name="text.notime"
       select="substring-after($text.noday, ' ')"/>
 
     <!-- Get the timezone -->
@@ -190,14 +191,14 @@
     <table width="100%">
       <tr>
         <td align="left">
-          <xsl:variable name="revision-nodes" 
+          <xsl:variable name="revision-nodes"
             select="ancestor-or-self::*
                     [not (attribute::rev:last-revision='')]"/>
           <xsl:if test="count($revision-nodes) &gt; 0">
             <xsl:variable name="revision-node"
               select="$revision-nodes[last()]"/>
             <xsl:variable name="revision-text">
-              <xsl:value-of 
+              <xsl:value-of
                 
select="normalize-space($revision-node/attribute::rev:last-revision)"/>
             </xsl:variable>
             <xsl:if test="string-length($revision-text) &gt; 0">
@@ -223,7 +224,7 @@
         </td>
         <td align="right">
           <small>
-            <xsl:apply-templates select="ancestor::*/*/copyright" 
+            <xsl:apply-templates select="ancestor::*/*/copyright"
               mode="boost.footer"/>
           </small>
         </td>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to