diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-17 20:07:05 +0000 |
---|---|---|
committer | <> | 2015-07-07 10:18:30 +0000 |
commit | 802da9dd5d4bc18f46a916eedc0c5c1980a15e59 (patch) | |
tree | f78a8637465b7a4c9624fef03d27eb7aeaa779d4 /xhtml | |
parent | 18f63104106b81bf37ca1af774d7be38051e5444 (diff) | |
download | docbook-xsl-master.tar.gz |
Imported from /home/lorry/working-area/delta_docbook-xsl/docbook-xsl-1.78.1.tar.bz2.HEADdocbook-xsl-1.78.1master
Diffstat (limited to 'xhtml')
-rw-r--r-- | xhtml/admon.xsl | 6 | ||||
-rw-r--r-- | xhtml/autoidx.xsl | 4 | ||||
-rw-r--r-- | xhtml/autotoc.xsl | 32 | ||||
-rw-r--r-- | xhtml/block.xsl | 19 | ||||
-rw-r--r-- | xhtml/chunk-common.xsl | 55 | ||||
-rw-r--r-- | xhtml/chunk.xsl | 2 | ||||
-rw-r--r-- | xhtml/chunker.xsl | 10 | ||||
-rw-r--r-- | xhtml/component.xsl | 3 | ||||
-rw-r--r-- | xhtml/docbook-no-doctype.xsl | 538 | ||||
-rw-r--r-- | xhtml/docbook.xsl | 108 | ||||
-rw-r--r-- | xhtml/ebnf.xsl | 6 | ||||
-rw-r--r-- | xhtml/footnote.xsl | 20 | ||||
-rw-r--r-- | xhtml/formal.xsl | 34 | ||||
-rw-r--r-- | xhtml/glossary.xsl | 12 | ||||
-rw-r--r-- | xhtml/graphics.xsl | 53 | ||||
-rw-r--r-- | xhtml/highlight.xsl | 10 | ||||
-rw-r--r-- | xhtml/htmltbl.xsl | 5 | ||||
-rw-r--r-- | xhtml/inline.xsl | 22 | ||||
-rw-r--r-- | xhtml/param.xsl | 10 | ||||
-rw-r--r-- | xhtml/profile-chunk-code.xsl | 6 | ||||
-rw-r--r-- | xhtml/profile-chunk.xsl | 12 | ||||
-rw-r--r-- | xhtml/profile-docbook.xsl | 114 | ||||
-rw-r--r-- | xhtml/profile-onechunk.xsl | 10 | ||||
-rwxr-xr-x | xhtml/titlepage.templates.xml | 739 | ||||
-rw-r--r-- | xhtml/verbatim.xsl | 4 | ||||
-rw-r--r-- | xhtml/xref.xsl | 112 |
26 files changed, 1679 insertions, 267 deletions
diff --git a/xhtml/admon.xsl b/xhtml/admon.xsl index 78e1a67..9c1ff4d 100644 --- a/xhtml/admon.xsl +++ b/xhtml/admon.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: admon.xsl 9352 2012-05-12 23:17:11Z bobstayton $ + $Id: admon.xsl 9728 2013-03-08 00:16:41Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -64,7 +64,7 @@ <div> <xsl:call-template name="common.html.attributes"/> <xsl:call-template name="id.attribute"/> - <xsl:if test="$admon.style != ''"> + <xsl:if test="$admon.style != '' and $make.clean.html = 0"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> @@ -114,7 +114,7 @@ <xsl:with-param name="inherit" select="1"/> </xsl:call-template> <xsl:call-template name="id.attribute"/> - <xsl:if test="$admon.style"> + <xsl:if test="$admon.style != '' and $make.clean.html = 0"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> diff --git a/xhtml/autoidx.xsl b/xhtml/autoidx.xsl index 7215d88..a6abf98 100644 --- a/xhtml/autoidx.xsl +++ b/xhtml/autoidx.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" extension-element-prefixes="exslt" exclude-result-prefixes="exslt" version="1.0"> <!-- ******************************************************************** - $Id: autoidx.xsl 9376 2012-05-24 18:32:40Z bobstayton $ + $Id: autoidx.xsl 9707 2013-01-21 17:18:44Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -539,7 +539,7 @@ <xsl:apply-templates select="." mode="class.attribute"/> <xsl:variable name="title"> <xsl:choose> - <xsl:when test="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]/titleabbrev and $index.prefer.titleabbrev != 0"> + <xsl:when test="$index.prefer.titleabbrev != 0"> <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="titleabbrev.markup"/> </xsl:when> <xsl:otherwise> diff --git a/xhtml/autotoc.xsl b/xhtml/autotoc.xsl index 8d609a2..8e55fd5 100644 --- a/xhtml/autotoc.xsl +++ b/xhtml/autotoc.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: autotoc.xsl 9295 2012-04-19 19:05:29Z bobstayton $ + $Id: autotoc.xsl 9692 2012-12-16 02:31:34Z dcramer $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -69,6 +69,11 @@ <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> @@ -83,6 +88,11 @@ <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:apply-templates select="$nodes.plus" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -95,6 +105,11 @@ <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -108,6 +123,14 @@ </xsl:choose> </xsl:template> +<xsl:template name="toc.list.attributes"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> + + <xsl:attribute name="class">toc</xsl:attribute> +</xsl:template> + <xsl:template name="make.lots"> <xsl:param name="toc.params" select="''"/> <xsl:param name="toc"/> @@ -540,6 +563,8 @@ <xsl:template name="manual-toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="tocentry"/> + <xsl:param name="toc.title.p" select="true()"/> + <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> <!-- be careful, we don't want to change the current document to the other tree! --> @@ -567,6 +592,11 @@ <xsl:if test="$tocentry/*"> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> diff --git a/xhtml/block.xsl b/xhtml/block.xsl index 4be274d..11351cf 100644 --- a/xhtml/block.xsl +++ b/xhtml/block.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: block.xsl 9353 2012-05-12 23:24:54Z bobstayton $ + $Id: block.xsl 9667 2012-11-26 23:10:44Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -248,7 +248,7 @@ <!-- ==================================================================== --> -<xsl:template match="abstract|sidebar"> +<xsl:template match="sidebar"> <div> <xsl:call-template name="common.html.attributes"/> <xsl:call-template name="id.attribute"/> @@ -263,6 +263,21 @@ <xsl:template match="sidebar/sidebarinfo|sidebar/info"/> +<xsl:template match="abstract"> + <div> + <xsl:call-template name="common.html.attributes"/> + <xsl:call-template name="anchor"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="title"> + <xsl:apply-templates select="." mode="title.markup"> + <xsl:with-param name="allow-anchors" select="'1'"/> + </xsl:apply-templates> + </xsl:with-param> + </xsl:call-template> + <xsl:apply-templates/> + </div> +</xsl:template> + <!-- ==================================================================== --> <xsl:template match="msgset"> diff --git a/xhtml/chunk-common.xsl b/xhtml/chunk-common.xsl index ac90cd0..89e2de5 100644 --- a/xhtml/chunk-common.xsl +++ b/xhtml/chunk-common.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl cf ng db"> <!-- ******************************************************************** - $Id: chunk-common.xsl 9362 2012-05-12 23:41:56Z bobstayton $ + $Id: chunk-common.xsl 9717 2013-01-25 18:13:36Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -605,7 +605,7 @@ </xsl:when> <xsl:when test="$css.decoration != 0"> <xsl:attribute name="style"> - <xsl:value-of select="concat('width:100; align:', $direction.align.start, ';')"/> + <xsl:value-of select="concat('width:100; text-align:', $direction.align.start, ';', 'margin-', $direction.align.start, ': 0')"/> </xsl:attribute> </xsl:when> <xsl:otherwise> @@ -963,14 +963,14 @@ <!-- Was it found in the database? --> <xsl:variable name="currentdoc.key"> <xsl:for-each select="$target.database"> - <xsl:value-of select="key('targetdoc-key', $current.docid)/@targetdoc"/> + <xsl:value-of select="key('targetdoc-key', $current.docid)[1]/@targetdoc"/> </xsl:for-each> </xsl:variable> <xsl:choose> <xsl:when test="$currentdoc.key != ''"> <xsl:for-each select="$target.database"> <xsl:call-template name="targetpath"> - <xsl:with-param name="dirnode" select="key('targetdoc-key', $current.docid)/parent::dir"/> + <xsl:with-param name="dirnode" select="key('targetdoc-key', $current.docid)[1]/parent::dir"/> <xsl:with-param name="targetdoc" select="$targetdoc"/> </xsl:call-template> </xsl:for-each> @@ -995,7 +995,7 @@ <!-- In either case, add baseuri from its document entry--> <xsl:variable name="docbaseuri"> <xsl:for-each select="$target.database"> - <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri"/> + <xsl:value-of select="key('targetdoc-key', $targetdoc)[1]/@baseuri"/> </xsl:for-each> </xsl:variable> <xsl:if test="$docbaseuri != ''"> @@ -1007,7 +1007,7 @@ <!-- Just use any baseuri from its document entry --> <xsl:variable name="docbaseuri"> <xsl:for-each select="$target.database"> - <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri"/> + <xsl:value-of select="key('targetdoc-key', $targetdoc)[1]/@baseuri"/> </xsl:for-each> </xsl:variable> <xsl:if test="$docbaseuri != ''"> @@ -1017,21 +1017,38 @@ </xsl:choose> </xsl:variable> - <!-- Form the href information --> - <xsl:if test="not(contains($baseuri, ':'))"> - <!-- if not an absolute uri, add upward path from olink chunk --> - <xsl:value-of select="$upward.from.path"/> - </xsl:if> + <!-- Is this olink to be active? --> + <xsl:variable name="active.olink"> + <xsl:choose> + <xsl:when test="$activate.external.olinks = 0"> + <xsl:choose> + <xsl:when test="$current.docid = ''">1</xsl:when> + <xsl:when test="$targetdoc = ''">1</xsl:when> + <xsl:when test="$targetdoc = $current.docid">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> - <xsl:if test="$baseuri != ''"> - <xsl:value-of select="$baseuri"/> - <xsl:if test="substring($target.href,1,1) != '#'"> - <!--xsl:text>/</xsl:text--> + <xsl:if test="$active.olink != 0"> + <!-- Form the href information --> + <xsl:if test="not(contains($baseuri, ':'))"> + <!-- if not an absolute uri, add upward path from olink chunk --> + <xsl:value-of select="$upward.from.path"/> + </xsl:if> + + <xsl:if test="$baseuri != ''"> + <xsl:value-of select="$baseuri"/> + <xsl:if test="substring($target.href,1,1) != '#'"> + <!--xsl:text>/</xsl:text--> + </xsl:if> + </xsl:if> + <!-- optionally turn off frag for PDF references --> + <xsl:if test="not($insert.olink.pdf.frag = 0 and translate(substring($baseuri, string-length($baseuri) - 3), 'PDF', 'pdf') = '.pdf' and starts-with($target.href, '#') )"> + <xsl:value-of select="$target.href"/> </xsl:if> - </xsl:if> - <!-- optionally turn off frag for PDF references --> - <xsl:if test="not($insert.olink.pdf.frag = 0 and translate(substring($baseuri, string-length($baseuri) - 3), 'PDF', 'pdf') = '.pdf' and starts-with($target.href, '#') )"> - <xsl:value-of select="$target.href"/> </xsl:if> </xsl:if> </xsl:template> diff --git a/xhtml/chunk.xsl b/xhtml/chunk.xsl index 6b74923..b8b25cc 100644 --- a/xhtml/chunk.xsl +++ b/xhtml/chunk.xsl @@ -22,7 +22,7 @@ customizes any presentation templates. Then your chunking customization should import mydocbook.xsl instead of docbook.xsl. --> -<xsl:import href="docbook.xsl"/> +<xsl:import href="docbook-no-doctype.xsl"/> <!-- chunk-common.xsl contains all the named templates for chunking. In a customization file, you import chunk-common.xsl, then diff --git a/xhtml/chunker.xsl b/xhtml/chunker.xsl index e102bd6..625ef84 100644 --- a/xhtml/chunker.xsl +++ b/xhtml/chunker.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="saxon lxslt redirect exsl doc" extension-element-prefixes="saxon redirect lxslt exsl"> <!-- ******************************************************************** - $Id: chunker.xsl 9147 2011-11-12 00:05:44Z bobstayton $ + $Id: chunker.xsl 9656 2012-10-29 18:09:53Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -55,13 +55,13 @@ <!-- put Saxon first to work around a bug in libxslt --> <xsl:when test="element-available('saxon:output')"> <!-- Saxon doesn't make the chunks relative --> - <xsl:value-of select="concat($chunk.base.dir,$base.name)"/> + <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:when test="element-available('exsl:document')"> <!-- EXSL document does make the chunks relative, I think --> <xsl:choose> <xsl:when test="count(parent::*) = 0"> - <xsl:value-of select="concat($chunk.base.dir,$base.name)"/> + <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$base.name"/> @@ -70,7 +70,7 @@ </xsl:when> <xsl:when test="element-available('redirect:write')"> <!-- Xalan doesn't make the chunks relative --> - <xsl:value-of select="concat($chunk.base.dir,$base.name)"/> + <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> @@ -301,7 +301,7 @@ <xsl:with-param name="method" select="$method"/> <xsl:with-param name="encoding" select="$encoding"/> <xsl:with-param name="indent" select="'no'"/> - <xsl:with-param name="omit-xml-declaration" select="'no'"/> + <xsl:with-param name="omit-xml-declaration" select="'yes'"/> <xsl:with-param name="standalone" select="'no'"/> <xsl:with-param name="doctype-public"/> <xsl:with-param name="doctype-system"/> diff --git a/xhtml/component.xsl b/xhtml/component.xsl index d3670fa..40e9e1b 100644 --- a/xhtml/component.xsl +++ b/xhtml/component.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: component.xsl 9356 2012-05-12 23:33:15Z bobstayton $ + $Id: component.xsl 9500 2012-07-15 23:24:21Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -43,7 +43,6 @@ <xsl:element name="h{$level+1}" namespace="http://www.w3.org/1999/xhtml"> <xsl:attribute name="class">title</xsl:attribute> - <xsl:call-template name="id.attribute"/> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="conditional" select="0"/> diff --git a/xhtml/docbook-no-doctype.xsl b/xhtml/docbook-no-doctype.xsl new file mode 100644 index 0000000..58023b0 --- /dev/null +++ b/xhtml/docbook-no-doctype.xsl @@ -0,0 +1,538 @@ +<?xml version="1.0" encoding="ASCII"?> +<!--This file was created automatically by html2xhtml--> +<!--from the HTML stylesheets.--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="db ng exsl exslt" version="1.0"> + +<xsl:output method="xml" encoding="UTF-8" indent="no"/> + +<!-- ******************************************************************** + $Id: docbook.xsl 9605 2012-09-18 10:48:54Z tom_schr $ + ******************************************************************** + + 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:include href="../VERSION.xsl"/> +<xsl:include href="param.xsl"/> +<xsl:include href="../lib/lib.xsl"/> +<xsl:include href="../common/l10n.xsl"/> +<xsl:include href="../common/common.xsl"/> +<xsl:include href="../common/utility.xsl"/> +<xsl:include href="../common/labels.xsl"/> +<xsl:include href="../common/titles.xsl"/> +<xsl:include href="../common/subtitles.xsl"/> +<xsl:include href="../common/gentext.xsl"/> +<xsl:include href="../common/targets.xsl"/> +<xsl:include href="../common/olink.xsl"/> +<xsl:include href="../common/pi.xsl"/> +<xsl:include href="autotoc.xsl"/> +<xsl:include href="autoidx.xsl"/> +<xsl:include href="lists.xsl"/> +<xsl:include href="callout.xsl"/> +<xsl:include href="verbatim.xsl"/> +<xsl:include href="graphics.xsl"/> +<xsl:include href="xref.xsl"/> +<xsl:include href="formal.xsl"/> +<xsl:include href="table.xsl"/> +<xsl:include href="htmltbl.xsl"/> +<xsl:include href="sections.xsl"/> +<xsl:include href="inline.xsl"/> +<xsl:include href="footnote.xsl"/> +<xsl:include href="html.xsl"/> +<xsl:include href="info.xsl"/> +<xsl:include href="keywords.xsl"/> +<xsl:include href="division.xsl"/> +<xsl:include href="toc.xsl"/> +<xsl:include href="index.xsl"/> +<xsl:include href="refentry.xsl"/> +<xsl:include href="math.xsl"/> +<xsl:include href="admon.xsl"/> +<xsl:include href="component.xsl"/> +<xsl:include href="biblio.xsl"/> +<xsl:include href="biblio-iso690.xsl"/> +<xsl:include href="glossary.xsl"/> +<xsl:include href="block.xsl"/> +<xsl:include href="task.xsl"/> +<xsl:include href="qandaset.xsl"/> +<xsl:include href="synop.xsl"/> +<xsl:include href="titlepage.xsl"/> +<xsl:include href="titlepage.templates.xsl"/> +<xsl:include href="pi.xsl"/> +<xsl:include href="ebnf.xsl"/> +<xsl:include href="chunker.xsl"/> +<xsl:include href="html-rtf.xsl"/> +<xsl:include href="annotations.xsl"/> +<xsl:include href="../common/stripns.xsl"/> + +<xsl:param name="stylesheet.result.type" select="'xhtml'"/> +<xsl:param name="htmlhelp.output" select="0"/> + +<!-- ==================================================================== --> + +<xsl:key name="id" match="*" use="@id|@xml:id"/> +<xsl:key name="gid" match="*" use="generate-id()"/> + +<!-- ==================================================================== --> + +<xsl:template match="*"> + <xsl:message> + <xsl:text>Element </xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text> in namespace '</xsl:text> + <xsl:value-of select="namespace-uri(.)"/> + <xsl:text>' encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> + </xsl:message> + + <span style="color: red"> + <xsl:text><</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>></xsl:text> + <xsl:apply-templates/> + <xsl:text></</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>></xsl:text> + </span> +</xsl:template> + +<xsl:template match="text()"> + <xsl:value-of select="."/> +</xsl:template> + +<xsl:template name="body.attributes"><xslo:if xmlns:xslo="http://www.w3.org/1999/XSL/Transform" test="starts-with($writing.mode, 'rl')"><xslo:attribute name="dir">rtl</xslo:attribute></xslo:if> +<!-- no apply-templates; make it empty except for dir for rtl--> +</xsl:template> + +<xsl:template name="head.content.base"> + <xsl:param name="node" select="."/> + <base href="{$html.base}"/> +</xsl:template> + +<xsl:template name="head.content.abstract"> + <xsl:param name="node" select="."/> + <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/> + <xsl:if test="$info and $info/abstract"> + <meta name="description"> + <xsl:attribute name="content"> + <xsl:for-each select="$info/abstract[1]/*"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() < last()"> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </meta> + </xsl:if> +</xsl:template> + +<xsl:template name="head.content.link.made"> + <xsl:param name="node" select="."/> + + <link rev="made" href="{$link.mailto.url}"/> +</xsl:template> + +<xsl:template name="head.content.generator"> + <xsl:param name="node" select="."/> + <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> +</xsl:template> + +<xsl:template name="head.content.style"> + <xsl:param name="node" select="."/> + <style type="text/css"><xsl:text> +body { background-image: url('</xsl:text> +<xsl:value-of select="$draft.watermark.image"/><xsl:text>'); + background-repeat: no-repeat; + background-position: top left; + /* The following properties make the watermark "fixed" on the page. */ + /* I think that's just a bit too distracting for the reader... */ + /* background-attachment: fixed; */ + /* background-position: center center; */ + }</xsl:text> + </style> +</xsl:template> + +<xsl:template name="head.content"> + <xsl:param name="node" select="."/> + <xsl:param name="title"> + <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/> + </xsl:param> + + <xsl:call-template name="user.head.title"> + <xsl:with-param name="title" select="$title"/> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + + <xsl:if test="$html.base != ''"> + <xsl:call-template name="head.content.base"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </xsl:if> + + <!-- Insert links to CSS files or insert literal style elements --> + <xsl:call-template name="generate.css"/> + + <xsl:if test="$html.stylesheet != ''"> + <xsl:call-template name="output.html.stylesheets"> + <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="$html.script != ''"> + <xsl:call-template name="output.html.scripts"> + <xsl:with-param name="scripts" select="normalize-space($html.script)"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="$link.mailto.url != ''"> + <xsl:call-template name="head.content.link.made"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </xsl:if> + + <xsl:call-template name="head.content.generator"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + + <xsl:if test="$generate.meta.abstract != 0"> + <xsl:call-template name="head.content.abstract"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="($draft.mode = 'yes' or ($draft.mode = 'maybe' and ancestor-or-self::*[@status][1]/@status = 'draft')) and $draft.watermark.image != ''"> + <xsl:call-template name="head.content.style"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </xsl:if> + <xsl:apply-templates select="." mode="head.keywords.content"/> +</xsl:template> + +<xsl:template name="output.html.stylesheets"> + <xsl:param name="stylesheets" select="''"/> + + <xsl:choose> + <xsl:when test="contains($stylesheets, ' ')"> + <xsl:variable name="css.filename" select="substring-before($stylesheets, ' ')"/> + + <xsl:call-template name="make.css.link"> + <xsl:with-param name="css.filename" select="$css.filename"/> + </xsl:call-template> + + <xsl:call-template name="output.html.stylesheets"> + <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$stylesheets != ''"> + <xsl:call-template name="make.css.link"> + <xsl:with-param name="css.filename" select="$stylesheets"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="output.html.scripts"> + <xsl:param name="scripts" select="''"/> + + <xsl:choose> + <xsl:when test="contains($scripts, ' ')"> + <xsl:variable name="script.filename" select="substring-before($scripts, ' ')"/> + + <xsl:call-template name="make.script.link"> + <xsl:with-param name="script.filename" select="$script.filename"/> + </xsl:call-template> + + <xsl:call-template name="output.html.scripts"> + <xsl:with-param name="scripts" select="substring-after($scripts, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$scripts != ''"> + <xsl:call-template name="make.script.link"> + <xsl:with-param name="script.filename" select="$scripts"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> +</xsl:template> + +<!-- ============================================================ --> + +<xsl:template match="*" mode="head.keywords.content"> + <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="artheader/keywordset" mode="html.header"/> + <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/> + <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/> + <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/> + <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/> + <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/> + <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/> + <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/> + <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/> + <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/> + <xsl:apply-templates select="info/keywordset" mode="html.header"/> + + <xsl:if test="$inherit.keywords != 0 and parent::*"> + <xsl:apply-templates select="parent::*" mode="head.keywords.content"/> + </xsl:if> +</xsl:template> + +<!-- ============================================================ --> + +<xsl:template name="system.head.content"> + <xsl:param name="node" select="."/> + + <!-- FIXME: When chunking, only the annotations actually used + in this chunk should be referenced. I don't think it + does any harm to reference them all, but it adds + unnecessary bloat to each chunk. --> + <xsl:if test="$annotation.support != 0 and //annotation"> + <xsl:call-template name="add.annotation.links"/> + <script type="text/javascript"> + <xsl:text> +// Create PopupWindow objects</xsl:text> + <xsl:for-each select="//annotation"> + <xsl:text> +var popup_</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text> = new PopupWindow("popup-</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text>"); +</xsl:text> + <xsl:text>popup_</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text>.offsetY = 15; +</xsl:text> + <xsl:text>popup_</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text>.autoHide(); +</xsl:text> + </xsl:for-each> + </script> + + <style type="text/css"> + <xsl:value-of select="$annotation.css"/> + </style> + </xsl:if> + + <!-- system.head.content is like user.head.content, except that + it is called before head.content. This is important because it + means, for example, that <style> elements output by system.head.content + have a lower CSS precedence than the users stylesheet. --> +</xsl:template> + +<!-- ============================================================ --> + +<xsl:template name="user.preroot"> + <!-- Pre-root output, can be used to output comments and PIs. --> + <!-- This must not output any element content! --> +</xsl:template> + +<xsl:template name="user.head.title"> + <xsl:param name="node" select="."/> + <xsl:param name="title"/> + + <title> + <xsl:copy-of select="$title"/> + </title> +</xsl:template> + +<xsl:template name="user.head.content"> + <xsl:param name="node" select="."/> +</xsl:template> + +<xsl:template name="user.header.navigation"> + <xsl:param name="node" select="."/> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:param name="nav.context"/> +</xsl:template> + +<xsl:template name="user.header.content"> + <xsl:param name="node" select="."/> +</xsl:template> + +<xsl:template name="user.footer.content"> + <xsl:param name="node" select="."/> +</xsl:template> + +<xsl:template name="user.footer.navigation"> + <xsl:param name="node" select="."/> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:param name="nav.context"/> +</xsl:template> + +<!-- To use the same stripped nodeset everywhere, it should +be created as a global variable here. +Used by docbook.xsl, chunk-code.xsl and chunkfast.xsl --> +<xsl:variable name="no.namespace"> + <xsl:if test="$exsl.node.set.available != 0 and (*/self::ng:* or */self::db:*)"> + <xsl:apply-templates select="/*" mode="stripNS"/> + </xsl:if> +</xsl:variable> + +<xsl:template match="/"> + <!-- * Get a title for current doc so that we let the user --> + <!-- * know what document we are processing at this point. --> + <xsl:variable name="doc.title"> + <xsl:call-template name="get.doc.title"/> + </xsl:variable> + <xsl:choose> + <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, + toss the namespace and continue. Use the docbook5 namespaced + stylesheets for DocBook5 if you don't want to use this feature.--> + <!-- include extra test for Xalan quirk --> + <xsl:when test="$exsl.node.set.available != 0 and (*/self::ng:* or */self::db:*)"> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title"/> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>stripped namespace before processing</xsl:text> + </xsl:with-param> + </xsl:call-template> + <!-- DEBUG: to save stripped document. + <xsl:message>Saving stripped document.</xsl:message> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/> + <xsl:with-param name="method" select="'xml'"/> + <xsl:with-param name="content"> + <xsl:copy-of select="exsl:node-set($no.namespace)"/> + </xsl:with-param> + </xsl:call-template> + --> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title"/> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>processing stripped document</xsl:text> + </xsl:with-param> + </xsl:call-template> + <xsl:apply-templates select="exsl:node-set($no.namespace)"/> + </xsl:when> + <!-- Can't process unless namespace removed --> + <xsl:when test="*/self::ng:* or */self::db:*"> + <xsl:message terminate="yes"> + <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text> + <xsl:text> cannot proceed.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:choose> + <xsl:when test="count(key('id',$rootid)) = 0"> + <xsl:message terminate="yes"> + <xsl:text>ID '</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>' not found in document.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'"> + <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/> + <xsl:if test="$tex.math.in.alt != ''"> + <xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math"/> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'"> + <xsl:apply-templates select="/" mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="/" mode="process.root"/> + <xsl:if test="$tex.math.in.alt != ''"> + <xsl:apply-templates select="/" mode="collect.tex.math"/> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="process.root"> + <xsl:variable name="doc" select="self::*"/> + + <xsl:call-template name="user.preroot"/> + <xsl:call-template name="root.messages"/> + + <html> + <xsl:call-template name="root.attributes"/> + <head> + <xsl:call-template name="system.head.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + <xsl:call-template name="head.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + <xsl:call-template name="user.head.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + </head> + <body> + <xsl:call-template name="body.attributes"/> + <xsl:call-template name="user.header.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + <xsl:apply-templates select="."/> + <xsl:call-template name="user.footer.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + </body> + </html> + <xsl:value-of select="$html.append"/> + + <!-- Generate any css files only once, not once per chunk --> + <xsl:call-template name="generate.css.files"/> +</xsl:template> + +<xsl:template name="root.attributes"> + <!-- customize to add attributes to <html> element --> +</xsl:template> + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="chunk"> + <xsl:param name="node" select="."/> + + <!-- The default is that we are not chunking... --> + <xsl:text>0</xsl:text> +</xsl:template> + +</xsl:stylesheet> diff --git a/xhtml/docbook.xsl b/xhtml/docbook.xsl index 6e6218a..5f3af4e 100644 --- a/xhtml/docbook.xsl +++ b/xhtml/docbook.xsl @@ -6,7 +6,7 @@ <xsl:output method="xml" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <!-- ******************************************************************** - $Id: docbook.xsl 9396 2012-06-02 21:56:19Z bobstayton $ + $Id: docbook.xsl 9605 2012-09-18 10:48:54Z tom_schr $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -112,18 +112,69 @@ <!-- no apply-templates; make it empty except for dir for rtl--> </xsl:template> +<xsl:template name="head.content.base"> + <xsl:param name="node" select="."/> + <base href="{$html.base}"/> +</xsl:template> + +<xsl:template name="head.content.abstract"> + <xsl:param name="node" select="."/> + <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/> + <xsl:if test="$info and $info/abstract"> + <meta name="description"> + <xsl:attribute name="content"> + <xsl:for-each select="$info/abstract[1]/*"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() < last()"> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </meta> + </xsl:if> +</xsl:template> + +<xsl:template name="head.content.link.made"> + <xsl:param name="node" select="."/> + + <link rev="made" href="{$link.mailto.url}"/> +</xsl:template> + +<xsl:template name="head.content.generator"> + <xsl:param name="node" select="."/> + <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> +</xsl:template> + +<xsl:template name="head.content.style"> + <xsl:param name="node" select="."/> + <style type="text/css"><xsl:text> +body { background-image: url('</xsl:text> +<xsl:value-of select="$draft.watermark.image"/><xsl:text>'); + background-repeat: no-repeat; + background-position: top left; + /* The following properties make the watermark "fixed" on the page. */ + /* I think that's just a bit too distracting for the reader... */ + /* background-attachment: fixed; */ + /* background-position: center center; */ + }</xsl:text> + </style> +</xsl:template> + <xsl:template name="head.content"> <xsl:param name="node" select="."/> <xsl:param name="title"> <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/> </xsl:param> - <title> - <xsl:copy-of select="$title"/> - </title> + <xsl:call-template name="user.head.title"> + <xsl:with-param name="title" select="$title"/> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> <xsl:if test="$html.base != ''"> - <base href="{$html.base}"/> + <xsl:call-template name="head.content.base"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> <!-- Insert links to CSS files or insert literal style elements --> @@ -142,39 +193,25 @@ </xsl:if> <xsl:if test="$link.mailto.url != ''"> - <link rev="made" href="{$link.mailto.url}"/> + <xsl:call-template name="head.content.link.made"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> - <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> + <xsl:call-template name="head.content.generator"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> <xsl:if test="$generate.meta.abstract != 0"> - <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/> - <xsl:if test="$info and $info/abstract"> - <meta name="description"> - <xsl:attribute name="content"> - <xsl:for-each select="$info/abstract[1]/*"> - <xsl:value-of select="normalize-space(.)"/> - <xsl:if test="position() < last()"> - <xsl:text> </xsl:text> - </xsl:if> - </xsl:for-each> - </xsl:attribute> - </meta> - </xsl:if> + <xsl:call-template name="head.content.abstract"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> <xsl:if test="($draft.mode = 'yes' or ($draft.mode = 'maybe' and ancestor-or-self::*[@status][1]/@status = 'draft')) and $draft.watermark.image != ''"> - <style type="text/css"><xsl:text> -body { background-image: url('</xsl:text> -<xsl:value-of select="$draft.watermark.image"/><xsl:text>'); - background-repeat: no-repeat; - background-position: top left; - /* The following properties make the watermark "fixed" on the page. */ - /* I think that's just a bit too distracting for the reader... */ - /* background-attachment: fixed; */ - /* background-position: center center; */ - }</xsl:text> - </style> + <xsl:call-template name="head.content.style"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> <xsl:apply-templates select="." mode="head.keywords.content"/> </xsl:template> @@ -309,6 +346,15 @@ var popup_</xsl:text> <!-- This must not output any element content! --> </xsl:template> +<xsl:template name="user.head.title"> + <xsl:param name="node" select="."/> + <xsl:param name="title"/> + + <title> + <xsl:copy-of select="$title"/> + </title> +</xsl:template> + <xsl:template name="user.head.content"> <xsl:param name="node" select="."/> </xsl:template> diff --git a/xhtml/ebnf.xsl b/xhtml/ebnf.xsl index caf7c58..a6ff6d7 100644 --- a/xhtml/ebnf.xsl +++ b/xhtml/ebnf.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="doc" version="1.0"> <!-- ******************************************************************** - $Id: ebnf.xsl 9358 2012-05-12 23:37:10Z bobstayton $ + $Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -16,7 +16,7 @@ <doc:reference xmlns=""> <referenceinfo xmlns="http://www.w3.org/1999/xhtml"> <releaseinfo role="meta"> -$Id: ebnf.xsl 9358 2012-05-12 23:37:10Z bobstayton $ +$Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $ </releaseinfo> <author><surname>Walsh</surname> <firstname>Norman</firstname></author> @@ -106,7 +106,7 @@ to be incomplete. Don't forget to read the source, too :-)</para> <tr> <td align="{$direction.align.start}" valign="top" width="3%"> <xsl:text>[</xsl:text> - <xsl:number count="production" level="any"/> + <xsl:apply-templates select="." mode="label.markup"/> <xsl:text>]</xsl:text> </td> <td align="{$direction.align.end}" valign="top" width="10%"> diff --git a/xhtml/footnote.xsl b/xhtml/footnote.xsl index fb9696d..d1645b9 100644 --- a/xhtml/footnote.xsl +++ b/xhtml/footnote.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="exsl" version="1.0"> <!-- ******************************************************************** - $Id: footnote.xsl 9361 2012-05-12 23:39:44Z bobstayton $ + $Id: footnote.xsl 9665 2012-11-08 14:26:20Z kosek $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -18,23 +18,29 @@ The footnote text is handled in name="process.footnote". The footnote marker gets an id of @id, while the footnote text gets an id of #ftn.@id. They cross link to each other. --> <xsl:template match="footnote"> - <xsl:variable name="href"> - <xsl:text>#ftn.</xsl:text> + <xsl:variable name="name"> <xsl:call-template name="object.id"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> </xsl:variable> + <xsl:variable name="href"> + <xsl:text>#ftn.</xsl:text> + <xsl:value-of select="$name"/> + </xsl:variable> <a href="{$href}"> <xsl:apply-templates select="." mode="class.attribute"/> + <xsl:if test="$generate.id.attributes = 0"> + <xsl:attribute name="id"> + <xsl:value-of select="$name"/> + </xsl:attribute> + </xsl:if> + <sup> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="id.attribute"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> - <xsl:call-template name="anchor"> - <xsl:with-param name="conditional" select="0"/> - </xsl:call-template> <xsl:text>[</xsl:text> <xsl:apply-templates select="." mode="footnote.number"/> <xsl:text>]</xsl:text> @@ -254,7 +260,7 @@ linkend/id: <xsl:value-of select="@linkend"/> </xsl:when> <xsl:when test="$css.decoration != 0"> <xsl:attribute name="style"> - <xsl:value-of select="concat('width:100; align:', $direction.align.start, ';')"/> + <xsl:value-of select="concat('width:100; text-align:', $direction.align.start, ';', 'margin-', $direction.align.start, ': 0')"/> </xsl:attribute> </xsl:when> <xsl:otherwise> diff --git a/xhtml/formal.xsl b/xhtml/formal.xsl index 5a1f197..d32839a 100644 --- a/xhtml/formal.xsl +++ b/xhtml/formal.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: formal.xsl 9297 2012-04-22 03:56:16Z bobstayton $ + $Id: formal.xsl 9501 2012-07-16 00:14:50Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -203,13 +203,15 @@ </xsl:when> <xsl:otherwise> <!-- do not use xsl:copy because of XHTML's needs --> - <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> - <xsl:apply-templates select="@*" mode="htmlTableAtt"/> - <xsl:attribute name="id"> - <xsl:call-template name="object.id"/> - </xsl:attribute> - <xsl:call-template name="htmlTable"/> - </xsl:element> + <div> + <xsl:call-template name="generate.class.attribute"/> + <xsl:call-template name="id.attribute"/> + <xsl:call-template name="anchor"/> + <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> + <xsl:apply-templates select="@*" mode="htmlTableAtt"/> + <xsl:call-template name="htmlTable"/> + </xsl:element> + </div> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -414,13 +416,15 @@ <xsl:call-template name="informal.object"/> </xsl:when> <xsl:otherwise> - <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> - <xsl:apply-templates select="@*" mode="htmlTableAtt"/> - <xsl:attribute name="id"> - <xsl:call-template name="object.id"/> - </xsl:attribute> - <xsl:call-template name="htmlTable"/> - </xsl:element> + <div> + <xsl:call-template name="generate.class.attribute"/> + <xsl:call-template name="id.attribute"/> + <xsl:call-template name="anchor"/> + <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> + <xsl:apply-templates select="@*" mode="htmlTableAtt"/> + <xsl:call-template name="htmlTable"/> + </xsl:element> + </div> </xsl:otherwise> </xsl:choose> </xsl:template> diff --git a/xhtml/glossary.xsl b/xhtml/glossary.xsl index 6805deb..bb5606b 100644 --- a/xhtml/glossary.xsl +++ b/xhtml/glossary.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink" version="1.0"> <!-- ******************************************************************** - $Id: glossary.xsl 9364 2012-05-12 23:43:04Z bobstayton $ + $Id: glossary.xsl 9709 2013-01-22 18:56:09Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -283,7 +283,12 @@ GlossEntry ::= </xsl:template> <xsl:template match="glossentry/glossterm"> - <xsl:apply-templates/> + <span> + <xsl:apply-templates select="." mode="common.html.attributes"/> + <xsl:call-template name="id.attribute"/> + <xsl:call-template name="anchor"/> + <xsl:apply-templates/> + </span> <xsl:if test="following-sibling::glossterm">, </xsl:if> </xsl:template> @@ -359,6 +364,9 @@ GlossEntry ::= <xsl:template match="glossentry/glossdef"> <dd> + <xsl:apply-templates select="." mode="common.html.attributes"/> + <xsl:call-template name="id.attribute"/> + <xsl:call-template name="anchor"/> <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> <xsl:if test="glossseealso"> <p> diff --git a/xhtml/graphics.xsl b/xhtml/graphics.xsl index f510db2..b90ecd1 100644 --- a/xhtml/graphics.xsl +++ b/xhtml/graphics.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory" xmlns:simg="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.ImageIntrinsics" xmlns:ximg="xalan://com.nwalsh.xalan.ImageIntrinsics" xmlns:xtext="xalan://com.nwalsh.xalan.Text" xmlns:lxslt="http://xml.apache.org/xslt" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink stext xtext lxslt simg ximg" extension-element-prefixes="stext xtext" version="1.0"> <!-- ******************************************************************** - $Id: graphics.xsl 9367 2012-05-12 23:46:35Z bobstayton $ + $Id: graphics.xsl 9710 2013-01-22 19:34:18Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -39,10 +39,17 @@ <div> <xsl:apply-templates select="." mode="common.html.attributes"/> <xsl:call-template name="id.attribute"/> + <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> </xsl:template> +<xsl:template match="screenshot/title"> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> +</xsl:template> + <xsl:template match="screeninfo"> </xsl:template> @@ -339,7 +346,7 @@ <xsl:with-param name="em.size" select="$points.per.em"/> </xsl:call-template> </xsl:variable> - <xsl:value-of select="$cwidth.in.points div 72.0 * $pixels.per.inch * $scale"/> + <xsl:value-of select="round($cwidth.in.points div 72.0 * $pixels.per.inch * $scale)"/> </xsl:if> </xsl:variable> @@ -406,7 +413,7 @@ <xsl:with-param name="em.size" select="$points.per.em"/> </xsl:call-template> </xsl:variable> - <xsl:value-of select="$cdepth.in.points div 72.0 * $pixels.per.inch * $scale"/> + <xsl:value-of select="round($cdepth.in.points div 72.0 * $pixels.per.inch * $scale)"/> </xsl:if> </xsl:variable> @@ -595,7 +602,10 @@ valign: <xsl:value-of select="@valign"/></xsl:message> <xsl:copy-of select="$alt"/> </xsl:when> <xsl:when test="ancestor::figure"> - <xsl:value-of select="normalize-space(ancestor::figure/title)"/> + <xsl:variable name="fig.title"> + <xsl:apply-templates select="ancestor::figure/title/node()"/> + </xsl:variable> + <xsl:value-of select="normalize-space($fig.title)"/> </xsl:when> </xsl:choose> </xsl:with-param> @@ -979,8 +989,12 @@ valign: <xsl:value-of select="@valign"/></xsl:message> </xsl:choose> </xsl:attribute> </xsl:if> + + <xsl:call-template name="extension.process.image.attributes"/> </xsl:template> +<xsl:template name="extension.process.image.attributes"/> + <!-- ==================================================================== --> <xsl:template match="graphic"> @@ -1185,7 +1199,14 @@ valign: <xsl:value-of select="@valign"/></xsl:message> <xsl:call-template name="process.image"> <xsl:with-param name="alt"> - <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/> + <xsl:choose> + <xsl:when test="ancestor::mediaobject/alt"> + <xsl:apply-templates select="ancestor::mediaobject/alt"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/> + </xsl:otherwise> + </xsl:choose> </xsl:with-param> <xsl:with-param name="longdesc"> <xsl:call-template name="write.longdesc"> @@ -1324,6 +1345,10 @@ valign: <xsl:value-of select="@valign"/></xsl:message> <!-- ==================================================================== --> +<xsl:template match="mediaobject/alt"> + <xsl:apply-templates/> +</xsl:template> + <xsl:template match="videoobject"> <xsl:apply-templates select="videodata"/> </xsl:template> @@ -1332,7 +1357,14 @@ valign: <xsl:value-of select="@valign"/></xsl:message> <xsl:call-template name="process.image"> <xsl:with-param name="tag" select="'embed'"/> <xsl:with-param name="alt"> - <xsl:apply-templates select="(../../textobject/phrase)[1]"/> + <xsl:choose> + <xsl:when test="ancestor::mediaobject/alt"> + <xsl:apply-templates select="ancestor::mediaobject/alt"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/> + </xsl:otherwise> + </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:template> @@ -1347,7 +1379,14 @@ valign: <xsl:value-of select="@valign"/></xsl:message> <xsl:call-template name="process.image"> <xsl:with-param name="tag" select="'embed'"/> <xsl:with-param name="alt"> - <xsl:apply-templates select="(../../textobject/phrase)[1]"/> + <xsl:choose> + <xsl:when test="ancestor::mediaobject/alt"> + <xsl:apply-templates select="ancestor::mediaobject/alt"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/> + </xsl:otherwise> + </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:template> diff --git a/xhtml/highlight.xsl b/xhtml/highlight.xsl index 222a055..f1d9eaa 100644 --- a/xhtml/highlight.xsl +++ b/xhtml/highlight.xsl @@ -3,7 +3,7 @@ <!--from the HTML stylesheets.--> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslthl="http://xslthl.sf.net" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xslthl" version="1.0"> <!-- ******************************************************************** - $Id: highlight.xsl 8911 2010-09-28 17:02:06Z abdelazer $ + $Id: highlight.xsl 9725 2013-02-28 14:49:03Z kosek $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -50,11 +50,9 @@ </span> </xsl:template> <xsl:template match="xslthl:html" mode="xslthl"> - <strong> - <em style="color: red"> - <xsl:apply-templates mode="xslthl"/> - </em> - </strong> + <span class="hl-html" style="color: navy; font-weight: bold"> + <xsl:apply-templates mode="xslthl"/> + </span> </xsl:template> <xsl:template match="xslthl:xslt" mode="xslthl"> <strong style="color: #0066FF"> diff --git a/xhtml/htmltbl.xsl b/xhtml/htmltbl.xsl index 9796e6c..1f05962 100644 --- a/xhtml/htmltbl.xsl +++ b/xhtml/htmltbl.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: htmltbl.xsl 9140 2011-10-30 03:42:11Z bobstayton $ + $Id: htmltbl.xsl 9501 2012-07-16 00:14:50Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -18,9 +18,6 @@ <xsl:template match="table" mode="htmlTable"> <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> <xsl:apply-templates select="@*" mode="htmlTableAtt"/> - <xsl:attribute name="id"> - <xsl:call-template name="object.id"/> - </xsl:attribute> <xsl:call-template name="htmlTable"/> </xsl:element> </xsl:template> diff --git a/xhtml/inline.xsl b/xhtml/inline.xsl index bc53ba4..df97997 100644 --- a/xhtml/inline.xsl +++ b/xhtml/inline.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink suwl" version="1.0"> <!-- ******************************************************************** - $Id: inline.xsl 9297 2012-04-22 03:56:16Z bobstayton $ + $Id: inline.xsl 9663 2012-11-06 19:09:16Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -537,14 +537,14 @@ <xsl:template match="function/parameter" priority="2"> <xsl:call-template name="inline.italicmonoseq"/> - <xsl:if test="following-sibling::*"> + <xsl:if test="$function.parens != 0 and following-sibling::*"> <xsl:text>, </xsl:text> </xsl:if> </xsl:template> <xsl:template match="function/replaceable" priority="2"> <xsl:call-template name="inline.italicmonoseq"/> - <xsl:if test="following-sibling::*"> + <xsl:if test="$function.parens != 0 and following-sibling::*"> <xsl:text>, </xsl:text> </xsl:if> </xsl:template> @@ -586,7 +586,21 @@ </xsl:template> <xsl:template match="keycap"> - <xsl:call-template name="inline.boldseq"/> + <xsl:choose> + <xsl:when test="@function and normalize-space(.) = ''"> + <xsl:call-template name="inline.boldseq"> + <xsl:with-param name="content"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'keycap'"/> + <xsl:with-param name="name" select="@function"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.boldseq"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="keycode"> diff --git a/xhtml/param.xsl b/xhtml/param.xsl index 5e3e22e..5fb1c70 100644 --- a/xhtml/param.xsl +++ b/xhtml/param.xsl @@ -5,7 +5,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: param.xweb 9333 2012-05-06 19:41:03Z dcramer $ + $Id: param.xweb 9658 2012-10-29 22:28:34Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -15,6 +15,7 @@ ******************************************************************** --> <xsl:param name="abstract.notitle.enabled" select="0"/> +<xsl:param name="activate.external.olinks" select="1"/> <xsl:param name="admon.graphics.extension">.png</xsl:param> <xsl:param name="admon.graphics" select="0"/> <xsl:param name="admon.graphics.path">images/</xsl:param> @@ -319,15 +320,10 @@ set toc,title <xsl:param name="olink.base.uri"/> <xsl:param name="olink.debug" select="0"/> <xsl:param name="olink.doctitle">no</xsl:param> -<xsl:param name="olink.fragid">fragid=</xsl:param> <xsl:param name="olink.lang.fallback.sequence"/> -<xsl:param name="olink.outline.ext">.olink</xsl:param> <xsl:attribute-set name="olink.properties"> <xsl:attribute name="show-destination">replace</xsl:attribute> </xsl:attribute-set> -<xsl:param name="olink.pubid">pubid</xsl:param> - <xsl:param name="olink.resolver">/cgi-bin/olink</xsl:param> -<xsl:param name="olink.sysid">sysid</xsl:param> <xsl:param name="othercredit.like.author.enabled">0</xsl:param> <xsl:param name="para.propagates.style" select="1"/> <xsl:param name="part.autolabel">I</xsl:param> @@ -426,7 +422,7 @@ set toc,title <xsl:param name="webhelp.base.dir">docs</xsl:param> <xsl:param name="webhelp.common.dir">../common/</xsl:param> <xsl:param name="webhelp.default.topic">index.html</xsl:param> -<xsl:param name="webhelp.include.search.tab">true</xsl:param> +<xsl:param name="webhelp.include.search.tab">1</xsl:param> <xsl:param name="webhelp.indexer.language">en</xsl:param> <xsl:param name="webhelp.start.filename">index.html</xsl:param> <xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/> diff --git a/xhtml/profile-chunk-code.xsl b/xhtml/profile-chunk-code.xsl index 90f540f..8b86447 100644 --- a/xhtml/profile-chunk-code.xsl +++ b/xhtml/profile-chunk-code.xsl @@ -443,7 +443,7 @@ <xsl:choose> <xsl:when test="$rootid != ''"> <xsl:choose> - <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0"> + <xsl:when test="count($profiled-nodes//*[@id=$rootid or @xml:id=$rootid]) = 0"> <xsl:message terminate="yes"> <xsl:text>ID '</xsl:text> <xsl:value-of select="$rootid"/> @@ -455,9 +455,9 @@ <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/> </xsl:if> <xsl:if test="$collect.xref.targets != 'only'"> - <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/> + <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid or @xml:id=$rootid]" mode="process.root"/> <xsl:if test="$tex.math.in.alt != ''"> - <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/> + <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid or @xml:id=$rootid]" mode="collect.tex.math"/> </xsl:if> <xsl:if test="$generate.manifest != 0"> <xsl:call-template name="generate.manifest"> diff --git a/xhtml/profile-chunk.xsl b/xhtml/profile-chunk.xsl index def7fff..eb48e81 100644 --- a/xhtml/profile-chunk.xsl +++ b/xhtml/profile-chunk.xsl @@ -1,10 +1,12 @@ -<?xml version="1.0" encoding="ASCII"?> +<?xml version="1.0" encoding="US-ASCII"?> +<!--This file was created automatically by xsl2profile--> +<!--from the DocBook XSL stylesheets.--> <!--This file was created automatically by html2xhtml--> <!--from the HTML stylesheets.--> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" xmlns:exslt="http://exslt.org/common" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="exsl exslt"> <!-- ******************************************************************** - $Id: profile-chunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + $Id: chunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -22,7 +24,7 @@ customizes any presentation templates. Then your chunking customization should import mydocbook.xsl instead of docbook.xsl. --> -<xsl:import href="docbook.xsl"/> +<xsl:import href="docbook-no-doctype.xsl"/> <!-- chunk-common.xsl contains all the named templates for chunking. In a customization file, you import chunk-common.xsl, then @@ -47,6 +49,6 @@ customizations that use xsl:apply-imports to wrongly apply the chunking version instead of the original non-chunking version to format an element. --> -<xsl:include href="profile-chunk-code.xsl"/> +<xsl:include href="chunk-code.xsl"/> </xsl:stylesheet> diff --git a/xhtml/profile-docbook.xsl b/xhtml/profile-docbook.xsl index b5506d9..366532d 100644 --- a/xhtml/profile-docbook.xsl +++ b/xhtml/profile-docbook.xsl @@ -8,7 +8,7 @@ <xsl:output method="xml" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <!-- ******************************************************************** - $Id: docbook.xsl 9396 2012-06-02 21:56:19Z bobstayton $ + $Id: docbook.xsl 9605 2012-09-18 10:48:54Z tom_schr $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -114,18 +114,69 @@ <!-- no apply-templates; make it empty except for dir for rtl--> </xsl:template> +<xsl:template name="head.content.base"> + <xsl:param name="node" select="."/> + <base href="{$html.base}"/> +</xsl:template> + +<xsl:template name="head.content.abstract"> + <xsl:param name="node" select="."/> + <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/> + <xsl:if test="$info and $info/abstract"> + <meta name="description"> + <xsl:attribute name="content"> + <xsl:for-each select="$info/abstract[1]/*"> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="position() < last()"> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:attribute> + </meta> + </xsl:if> +</xsl:template> + +<xsl:template name="head.content.link.made"> + <xsl:param name="node" select="."/> + + <link rev="made" href="{$link.mailto.url}"/> +</xsl:template> + +<xsl:template name="head.content.generator"> + <xsl:param name="node" select="."/> + <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> +</xsl:template> + +<xsl:template name="head.content.style"> + <xsl:param name="node" select="."/> + <style type="text/css"><xsl:text> +body { background-image: url('</xsl:text> +<xsl:value-of select="$draft.watermark.image"/><xsl:text>'); + background-repeat: no-repeat; + background-position: top left; + /* The following properties make the watermark "fixed" on the page. */ + /* I think that's just a bit too distracting for the reader... */ + /* background-attachment: fixed; */ + /* background-position: center center; */ + }</xsl:text> + </style> +</xsl:template> + <xsl:template name="head.content"> <xsl:param name="node" select="."/> <xsl:param name="title"> <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/> </xsl:param> - <title> - <xsl:copy-of select="$title"/> - </title> + <xsl:call-template name="user.head.title"> + <xsl:with-param name="title" select="$title"/> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> <xsl:if test="$html.base != ''"> - <base href="{$html.base}"/> + <xsl:call-template name="head.content.base"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> <!-- Insert links to CSS files or insert literal style elements --> @@ -144,39 +195,25 @@ </xsl:if> <xsl:if test="$link.mailto.url != ''"> - <link rev="made" href="{$link.mailto.url}"/> + <xsl:call-template name="head.content.link.made"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> - <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> + <xsl:call-template name="head.content.generator"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> <xsl:if test="$generate.meta.abstract != 0"> - <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/> - <xsl:if test="$info and $info/abstract"> - <meta name="description"> - <xsl:attribute name="content"> - <xsl:for-each select="$info/abstract[1]/*"> - <xsl:value-of select="normalize-space(.)"/> - <xsl:if test="position() < last()"> - <xsl:text> </xsl:text> - </xsl:if> - </xsl:for-each> - </xsl:attribute> - </meta> - </xsl:if> + <xsl:call-template name="head.content.abstract"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> <xsl:if test="($draft.mode = 'yes' or ($draft.mode = 'maybe' and ancestor-or-self::*[@status][1]/@status = 'draft')) and $draft.watermark.image != ''"> - <style type="text/css"><xsl:text> -body { background-image: url('</xsl:text> -<xsl:value-of select="$draft.watermark.image"/><xsl:text>'); - background-repeat: no-repeat; - background-position: top left; - /* The following properties make the watermark "fixed" on the page. */ - /* I think that's just a bit too distracting for the reader... */ - /* background-attachment: fixed; */ - /* background-position: center center; */ - }</xsl:text> - </style> + <xsl:call-template name="head.content.style"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> </xsl:if> <xsl:apply-templates select="." mode="head.keywords.content"/> </xsl:template> @@ -311,6 +348,15 @@ var popup_</xsl:text> <!-- This must not output any element content! --> </xsl:template> +<xsl:template name="user.head.title"> + <xsl:param name="node" select="."/> + <xsl:param name="title"/> + + <title> + <xsl:copy-of select="$title"/> + </title> +</xsl:template> + <xsl:template name="user.head.content"> <xsl:param name="node" select="."/> </xsl:template> @@ -364,7 +410,7 @@ Used by docbook.xsl, chunk-code.xsl and chunkfast.xsl --> <xsl:choose> <xsl:when test="$rootid != ''"> <xsl:choose> - <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0"> + <xsl:when test="count($profiled-nodes//*[@id=$rootid or @xml:id=$rootid]) = 0"> <xsl:message terminate="yes"> <xsl:text>ID '</xsl:text> <xsl:value-of select="$rootid"/> @@ -376,9 +422,9 @@ Used by docbook.xsl, chunk-code.xsl and chunkfast.xsl --> <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/> </xsl:if> <xsl:if test="$collect.xref.targets != 'only'"> - <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/> + <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid or @xml:id=$rootid]" mode="process.root"/> <xsl:if test="$tex.math.in.alt != ''"> - <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/> + <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid or @xml:id=$rootid]" mode="collect.tex.math"/> </xsl:if> </xsl:if> </xsl:otherwise> diff --git a/xhtml/profile-onechunk.xsl b/xhtml/profile-onechunk.xsl index b84b3e9..d0a62ea 100644 --- a/xhtml/profile-onechunk.xsl +++ b/xhtml/profile-onechunk.xsl @@ -1,10 +1,12 @@ -<?xml version="1.0" encoding="ASCII"?> +<?xml version="1.0" encoding="US-ASCII"?> +<!--This file was created automatically by xsl2profile--> +<!--from the DocBook XSL stylesheets.--> <!--This file was created automatically by html2xhtml--> <!--from the HTML stylesheets.--> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:exslt="http://exslt.org/common" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="doc exslt"> <!-- ******************************************************************** - $Id: profile-onechunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + $Id: onechunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -15,7 +17,7 @@ <!-- ==================================================================== --> -<xsl:import href="profile-chunk.xsl"/> +<xsl:import href="chunk.xsl"/> <!-- Ok, using the onechunk parameter makes this all work again. --> <!-- It does have the disadvantage that it only works for documents that have --> diff --git a/xhtml/titlepage.templates.xml b/xhtml/titlepage.templates.xml new file mode 100755 index 0000000..6fbe8fc --- /dev/null +++ b/xhtml/titlepage.templates.xml @@ -0,0 +1,739 @@ +<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0" + xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + +<!-- ==================================================================== --> + +<t:titlepage t:element="article" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <hr/> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="set" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <hr/> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="book" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <hr/> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="part" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="division.title" + param:node="ancestor-or-self::part[1]"/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="partintro" t:wrapper="div"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="reference" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <hr/> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refentry" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> +<!-- uncomment this if you want refentry titlepages + <title t:force="1" + t:named-template="refentry.title" + param:node="ancestor-or-self::refentry[1]"/> +--> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator/> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="dedication" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::dedication[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="acknowledgements" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::acknowledgements[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="preface" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="chapter" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="topic" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="appendix" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="section" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect1" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect2" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect3" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect4" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="sect5" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<t:titlepage t:element="simplesect" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="bibliography" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::bibliography[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="glossary" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::glossary[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="index" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::index[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="setindex" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::setindex[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> +<t:titlepage t:element="sidebar" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title + t:named-template="formal.object.heading" + param:object="ancestor-or-self::sidebar[1]"/> + <subtitle/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +</t:templates> diff --git a/xhtml/verbatim.xsl b/xhtml/verbatim.xsl index d25854d..d331aa0 100644 --- a/xhtml/verbatim.xsl +++ b/xhtml/verbatim.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="xalan://com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="sverb xverb lxslt exsl" version="1.0"> <!-- ******************************************************************** - $Id: verbatim.xsl 9297 2012-04-22 03:56:16Z bobstayton $ + $Id: verbatim.xsl 9589 2012-09-02 20:52:15Z tom_schr $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -358,7 +358,7 @@ </xsl:when> <xsl:when test="$listings[1]/@continuation='continues'"> <xsl:call-template name="lastLineNumber"> - <xsl:with-param name="listings" select="listings[position() > 1]"/> + <xsl:with-param name="listings" select="$listings[position() > 1]"/> <xsl:with-param name="number" select="$number + $lines"/> </xsl:call-template> </xsl:when> diff --git a/xhtml/xref.xsl b/xhtml/xref.xsl index de38e53..5627983 100644 --- a/xhtml/xref.xsl +++ b/xhtml/xref.xsl @@ -4,7 +4,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" xmlns:exsl="http://exslt.org/common" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="suwl exsl xlink" version="1.0"> <!-- ******************************************************************** - $Id: xref.xsl 9365 2012-05-12 23:43:49Z bobstayton $ + $Id: xref.xsl 9713 2013-01-22 22:08:30Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -338,7 +338,7 @@ </xsl:choose> </xsl:template> -<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset |biblioset|blockquote|calloutlist|caution|colophon |constraintdef|formalpara|glossdiv|important|indexdiv |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain |msgrel|msgset|msgsub|note|orderedlist|partintro |productionset|qandadiv|refsynopsisdiv|segmentedlist |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to"> +<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset |biblioset|blockquote|calloutlist|caution|colophon |constraintdef|formalpara|glossdiv|important|indexdiv |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain |msgrel|msgset|msgsub|note|orderedlist|partintro |productionset|qandadiv|refsynopsisdiv|screenshot|segmentedlist |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to"> <xsl:param name="referrer"/> <xsl:param name="xrefstyle"/> <xsl:param name="verbose" select="1"/> @@ -996,8 +996,6 @@ <xsl:call-template name="anchor"/> - <xsl:variable name="localinfo" select="@localinfo"/> - <xsl:choose> <!-- olinks resolved by stylesheet and target database --> <xsl:when test="@targetdoc or @targetptr or (@xlink:role=$xolink.role and contains(@xlink:href, '#') )"> @@ -1130,54 +1128,20 @@ </xsl:when> - <!-- Or use old olink mechanism --> <xsl:otherwise> - <xsl:variable name="href"> - <xsl:choose> - <xsl:when test="@linkmode"> - <!-- use the linkmode to get the base URI, use localinfo as fragid --> - <xsl:variable name="modespec" select="key('id',@linkmode)"/> - <xsl:if test="count($modespec) != 1 or local-name($modespec) != 'modespec'"> - <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message> - </xsl:if> - <xsl:value-of select="$modespec"/> - <xsl:if test="@localinfo"> - <xsl:text>#</xsl:text> - <xsl:value-of select="@localinfo"/> - </xsl:if> - </xsl:when> - <xsl:when test="@type = 'href'"> - <xsl:call-template name="olink.outline"> - <xsl:with-param name="outline.base.uri" select="unparsed-entity-uri(@targetdocent)"/> - <xsl:with-param name="localinfo" select="@localinfo"/> - <xsl:with-param name="return" select="'href'"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$olink.resolver"/> - <xsl:text>?</xsl:text> - <xsl:value-of select="$olink.sysid"/> - <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/> - <!-- XSL gives no access to the public identifier (grumble...) --> - <xsl:if test="@localinfo"> - <xsl:text>&</xsl:text> - <xsl:value-of select="$olink.fragid"/> - <xsl:value-of select="@localinfo"/> - </xsl:if> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:choose> - <xsl:when test="$href != ''"> - <a href="{$href}"> - <xsl:apply-templates select="." mode="common.html.attributes"/> - <xsl:call-template name="id.attribute"/> - <xsl:call-template name="olink.hottext"/> - </a> + <xsl:when test="@linkmode or @targetdocent or @localinfo"> + <!-- old olink mechanism --> + <xsl:message> + <xsl:text>ERROR: olink using obsolete attributes </xsl:text> + <xsl:text>@linkmode, @targetdocent, @localinfo are </xsl:text> + <xsl:text>not supported.</xsl:text> + </xsl:message> </xsl:when> <xsl:otherwise> - <xsl:call-template name="olink.hottext"/> + <xsl:message> + <xsl:text>ERROR: olink is missing linking attributes.</xsl:text> + </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:otherwise> @@ -1188,53 +1152,6 @@ <!-- no-op in HTML --> </xsl:template> - -<xsl:template name="olink.outline"> - <xsl:param name="outline.base.uri"/> - <xsl:param name="localinfo"/> - <xsl:param name="return" select="href"/> - - <xsl:variable name="outline-file" select="concat($outline.base.uri, $olink.outline.ext)"/> - - <xsl:variable name="outline" select="document($outline-file,.)/div"/> - - <xsl:variable name="node-href"> - <xsl:choose> - <xsl:when test="$localinfo != ''"> - <xsl:variable name="node" select="$outline// *[@id=$localinfo or @xml:id=$localinfo]"/> - <xsl:value-of select="$node/@href"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$outline/@href"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="node-xref"> - <xsl:choose> - <xsl:when test="$localinfo != ''"> - <xsl:variable name="node" select="$outline// *[@id=$localinfo or @xml:id=$localinfo]"/> - <xsl:copy-of select="$node/xref"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$outline/xref"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:choose> - <xsl:when test="$return = 'href'"> - <xsl:value-of select="$node-href"/> - </xsl:when> - <xsl:when test="$return = 'xref'"> - <xsl:value-of select="$node-xref"/> - </xsl:when> - <xsl:otherwise> - <xsl:copy-of select="$node-xref"/> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - <!-- ==================================================================== --> <xsl:template name="xref.xreflabel"> @@ -1267,9 +1184,8 @@ <xsl:param name="title"/> <xsl:choose> - <!-- FIXME: what about the case where titleabbrev is inside the info? --> - <xsl:when test="$purpose = 'xref' and titleabbrev"> - <xsl:apply-templates select="." mode="titleabbrev.markup"/> + <xsl:when test="$purpose = 'xref'"> + <xsl:copy-of select="$title"/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$title"/> |