mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 23:13:58 +00:00
added callouts
[SVN r37025]
This commit is contained in:
parent
146e5f926a
commit
c3807f9680
69
xsl/callout.xsl
Normal file
69
xsl/callout.xsl
Normal file
@ -0,0 +1,69 @@
|
||||
<?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 <= $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 <= $callout.unicode.number.limit">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$callout.unicode.start.character = 10102">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$conum = 1">❶</xsl:when>
|
||||
<xsl:when test="$conum = 2">❷</xsl:when>
|
||||
<xsl:when test="$conum = 3">❸</xsl:when>
|
||||
<xsl:when test="$conum = 4">❹</xsl:when>
|
||||
<xsl:when test="$conum = 5">❺</xsl:when>
|
||||
<xsl:when test="$conum = 6">❻</xsl:when>
|
||||
<xsl:when test="$conum = 7">❼</xsl:when>
|
||||
<xsl:when test="$conum = 8">❽</xsl:when>
|
||||
<xsl:when test="$conum = 9">❾</xsl:when>
|
||||
<xsl:when test="$conum = 10">❿</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>
|
29
xsl/html.xsl
29
xsl/html.xsl
@ -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 @@ set toc,title
|
||||
<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 @@ set toc,title
|
||||
<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 @@ set toc,title
|
||||
<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) > 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) > 0">
|
||||
@ -223,7 +224,7 @@ set toc,title
|
||||
</td>
|
||||
<td align="right">
|
||||
<small>
|
||||
<xsl:apply-templates select="ancestor::*/*/copyright"
|
||||
<xsl:apply-templates select="ancestor::*/*/copyright"
|
||||
mode="boost.footer"/>
|
||||
</small>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user