You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
3.1 KiB
91 lines
3.1 KiB
<?xml version='1.0'?>
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
version='1.0'>
|
|
|
|
<!-- ********************************************************************
|
|
$Id$
|
|
********************************************************************
|
|
|
|
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">
|
|
<a name="{$id}"/>
|
|
</xsl:if>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="href.target.uri">
|
|
<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: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:template name="href.target.with.base.dir">
|
|
<xsl:param name="object" select="."/>
|
|
<xsl:if test="$manifest.in.base.dir = 0">
|
|
<xsl:value-of select="$base.dir"/>
|
|
</xsl:if>
|
|
<xsl:call-template name="href.target">
|
|
<xsl:with-param name="object" select="$object"/>
|
|
</xsl:call-template>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="dingbat">
|
|
<xsl:param name="dingbat">bullet</xsl:param>
|
|
<xsl:call-template name="dingbat.characters">
|
|
<xsl:with-param name="dingbat" select="$dingbat"/>
|
|
</xsl:call-template>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="dingbat.characters">
|
|
<!-- now that I'm using the real serializer, all that dingbat malarky -->
|
|
<!-- isn't necessary anymore... -->
|
|
<xsl:param name="dingbat">bullet</xsl:param>
|
|
<xsl:choose>
|
|
<xsl:when test="$dingbat='bullet'">•</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='nbsp'"> </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='mdash'">—</xsl:when>
|
|
<xsl:when test="$dingbat='en-dash'">–</xsl:when>
|
|
<xsl:when test="$dingbat='ndash'">–</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:text>•</xsl:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|
|
|