This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
XSL: fix trailing "." in xref
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: XSL: fix trailing "." in xref
- From: Jon Willeke <willeke at intersys dot com>
- Date: Wed, 7 Jun 2000 18:21:54 -0400
I'm using DocBook XML 4.0 with version 1.13 of the XSL DocBook Stylesheets.
All my xrefs have a trailing period. For example,
See <xref linkend="foo">, ...
...
<example id="foo">
<title>How to skin a cat</title>
generates the following HTML:
See <a href="#foo">Example 1.</a>, ...
[^-- I don't want this]
...
<a name="foo"></a><b>Example 1. How to skin a cat</b>
The period is put there by common/common.xsl in label.content mode. I've
managed to kludge html/xref.xsl to strip the extra period:
66a67,68
> <!-- *jcw+, 6/7/00: remove trailing "." -->
> <xsl:variable name="jcw-foo">
207a210,219
> </xsl:variable>
> <xsl:choose>
> <xsl:when test="substring($jcw-foo, string-length($jcw-foo),
1)='.'"
>
> <xsl:value-of select="substring($jcw-foo, 1,
string-length($jcw-foo) - 1)"/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="$jcw-foo"/>
> </xsl:otherwise>
> </xsl:choose>
> <!-- *jcw-, 6/7/00 -->
I was hoping someone with more of a big-picture view of the stylesheets
could comment on this.
--
Jon Willeke, Quality Engineer
InterSystems Corp.
One Memorial Drive, Cambridge, MA 02142