[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to suppress vertical whitespace from <indexterm>

Subject: How to suppress vertical whitespace from <indexterm>
From: "Jeffrey Walton noloader@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Mar 2018 23:14:31 -0000
 How to suppress vertical whitespace from <indexterm>
Hi Everyone,

I have a DocBook v4.5 book at
https://github.com/noloader/POWER8-crypto . I am use Ubuntu 16.04
with:

    $ xsltproc --version
    Using libxml 20903, libxslt 10128 and libexslt 817
    xsltproc was compiled against libxml 20903, libxslt 10128 and libexslt 817
    libxslt 10128 was compiled against libxml 20903
    libexslt 817 was compiled against libxml 20903

I use this pattern shown below to generate index entries.
(https://github.com/noloader/POWER8-crypto/blob/master/power8-crypto/ch01.xml#L45)
.

The problem is, the <indexterm> creates extra vertical whitespace
wherever it is present. For example, ch01.xml#L45 (link above) has:

    The book makes frequent references to... <end of paragraph>.
        <indexterm>
        <indexterm>
        <indexterm>
    Both POWER8 machines are IBM POWER System S822 ... <end of paragraph>.

And it produces:

    The book makes frequent references to... <end of paragraph>.
        <whitespace>
        <whitespace>
        <whitespace>
    Both POWER8 machines are IBM POWER System S822 ... <end of paragraph>.

I understand there is space between paragraphs, and I expect "normal"
spacing as if the <indexterm> were not present:

    The book makes frequent references to... <end of paragraph>.
        <whitespace>
    Both POWER8 machines are IBM POWER System S822 ... <end of paragraph>.

I am using this script to build the book:
https://github.com/noloader/POWER8-crypto/blob/master/power8-crypto/make-book.sh
. It is pretty boring and just calls:

    XSL=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
    xsltproc --xinclude "$XSL" book.xml > power8-crypto.fo

My question is, how can I collapse the extra wheitespace into a single
whitespace?

I'm happy to use an xsltproc option to clooapse the whitespace. I am
also happy to use sed or awk to remove them.

Thank you in advance. And my apologies for the long post.

****************************************

Here is a typical application of the <indexterm> pattern.

<para>The book makes frequent references to
<systemitem>gcc112</systemitem> and <systemitem>gcc119</systemitem>
from the GCC Compile Farm...</para>
<indexterm>
<primary>Compile farm</primary>
<secondary>gcc112</secondary>
</indexterm>
<indexterm>
<primary>Compile farm</primary>
<secondary>gcc119</secondary>
</indexterm>
<indexterm>
<primary>Compile farm</primary>
<secondary>POWER8</secondary>
</indexterm>
<para>Both POWER8 machines are IBM POWER System S822 with two CPU
cards...</para>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.