diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2007-07-05 21:18:33 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2007-07-05 21:18:33 +0000 |
commit | c873d8072e3e1fb78b1be4ba5e3f8e3548d29694 (patch) | |
tree | fb2387ca1b158477659e00660269c92b94f4a00a /stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl | |
parent | bdbaf3eb1f0b1c8ef150764638c7473b9c25db96 (diff) |
Added new-xsl files.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8196 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl')
-rw-r--r-- | stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl new file mode 100644 index 000000000..e1441c742 --- /dev/null +++ b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl @@ -0,0 +1,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$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ 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 or $node/@xml: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> + |