1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version='1.0'>
<!-- ********************************************************************
$Id: fo.xsl,v 1.4 2005/07/15 08:27:48 techtonik Exp $
********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
See ../README or http://nwalsh.com/docbook/xsl/ for copyright
and other information.
******************************************************************** -->
<xsl:template name="anchor">
<xsl:param name="node" select="."/>
<xsl:param name="conditional" select="1"/>
<xsl:variable name="id">
<xsl:call-template name="object.id">
<xsl:with-param name="object" select="$node"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="$conditional = 0 or $node/@id">
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="dingbat">
<xsl:param name="dingbat">bullet</xsl:param>
<xsl:variable name="symbol">
<xsl:choose>
<xsl:when test="$dingbat='bullet'">o</xsl:when>
<xsl:when test="$dingbat='copyright'">©</xsl:when>
<xsl:when test="$dingbat='trademark'">™</xsl:when>
<xsl:when test="$dingbat='trade'">™</xsl:when>
<xsl:when test="$dingbat='registered'">®</xsl:when>
<xsl:when test="$dingbat='service'">(SM)</xsl:when>
<xsl:when test="$dingbat='ldquo'">"</xsl:when>
<xsl:when test="$dingbat='rdquo'">"</xsl:when>
<xsl:when test="$dingbat='lsquo'">'</xsl:when>
<xsl:when test="$dingbat='rsquo'">'</xsl:when>
<xsl:when test="$dingbat='em-dash'">--</xsl:when>
<xsl:when test="$dingbat='en-dash'">-</xsl:when>
<xsl:otherwise>o</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$dingbat.font.family = ''">
<xsl:copy-of select="$symbol"/>
</xsl:when>
<xsl:otherwise>
<fo:inline font-family="{$dingbat.font.family}">
<xsl:copy-of select="$symbol"/>
</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="href.target">
<xsl:param name="context" select="."/>
<xsl:param name="object" select="."/>
<xsl:text>#</xsl:text>
<xsl:call-template name="object.id">
<xsl:with-param name="object" select="$object"/>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
|