• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3   Copyright (c) 2007 Joel de Guzman <djowel -at- gmail.com>
4
5   Distributed under the Boost Software License, Version 1.0.
6   (See accompanying file LICENSE_1_0.txt or copy at
7   http://www.boost.org/LICENSE_1_0.txt)
8  -->
9<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10                version="1.0">
11
12<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/callout.xsl"/>
13
14<!-- Already included in the main style sheet -->
15<!-- <xsl:import href="relative-href.xsl"/> -->
16
17<xsl:template name="callout-bug">
18  <xsl:param name="conum" select='1'/>
19
20  <xsl:choose>
21    <xsl:when test="$callout.graphics != 0
22                    and $conum &lt;= $callout.graphics.number.limit">
23
24      <xsl:variable name="relative_callout_graphics_path">
25        <xsl:call-template name="href.target.relative">
26          <xsl:with-param name="target" select="$callout.graphics.path"/>
27        </xsl:call-template>
28      </xsl:variable>
29
30      <img src="{$relative_callout_graphics_path}{$conum}{$callout.graphics.extension}"
31           alt="{$conum}" border="0"/>
32    </xsl:when>
33
34    <xsl:when test="$callout.unicode != 0
35                    and $conum &lt;= $callout.unicode.number.limit">
36      <xsl:choose>
37        <xsl:when test="$callout.unicode.start.character = 10102">
38          <xsl:choose>
39            <xsl:when test="$conum = 1">&#10102;</xsl:when>
40            <xsl:when test="$conum = 2">&#10103;</xsl:when>
41            <xsl:when test="$conum = 3">&#10104;</xsl:when>
42            <xsl:when test="$conum = 4">&#10105;</xsl:when>
43            <xsl:when test="$conum = 5">&#10106;</xsl:when>
44            <xsl:when test="$conum = 6">&#10107;</xsl:when>
45            <xsl:when test="$conum = 7">&#10108;</xsl:when>
46            <xsl:when test="$conum = 8">&#10109;</xsl:when>
47            <xsl:when test="$conum = 9">&#10110;</xsl:when>
48            <xsl:when test="$conum = 10">&#10111;</xsl:when>
49          </xsl:choose>
50        </xsl:when>
51        <xsl:otherwise>
52          <xsl:message>
53            <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
54            <xsl:text>when $callout.unicode.start.character is </xsl:text>
55            <xsl:value-of select="$callout.unicode.start.character"/>
56          </xsl:message>
57          <xsl:text>(</xsl:text>
58          <xsl:value-of select="$conum"/>
59          <xsl:text>)</xsl:text>
60        </xsl:otherwise>
61      </xsl:choose>
62    </xsl:when>
63    <xsl:otherwise>
64      <xsl:text>(</xsl:text>
65      <xsl:value-of select="$conum"/>
66      <xsl:text>)</xsl:text>
67    </xsl:otherwise>
68  </xsl:choose>
69</xsl:template>
70
71</xsl:stylesheet>
72