Hi Paul,
Actually, the use of entity here is not the problem. You would get the same results if you replace the entity reference with the glossterm element itself.

The problem is the use of @linkend to refer to a glossary database. The linkend attribute can only reach an id that exists in the same document, and the glossary database elements do not. They are selected and loaded into the stylesheet to generate the glossary output, but never get into the main document.

However, there is a workaround. If you set the stylesheet param glossterm.auto.link="1" and use this form of inline glossterm (either directly or in an entity declaration), you will get a hot link:

 <glossterm baseform="entitytest">a test</glossterm>

This doc provides more information about the autolinking feature and the @baseform attribute:

 http://www.sagehill.net/docbookxsl/LinkToGlossary.html


Bob Stayton
Sagehill Enterprises
[email protected]

--------------------------------------------------
From: "Paul Slezak" <[email protected]>
Sent: Thursday, August 22, 2013 8:25 AM
To: <[email protected]>
Subject: [docbook-apps] entities and glossary database

Docbook 5

It appears that entities with linkends referring to a glossary database glossentry do not get the links.

Given:

&myentitytest; defined as <glossterm linkend="gloss-entitytest">a test</glossterm>

and a  glossary file containing

    <glossary>
        <glossentry id="gloss-entitytest">
            <glossterm>entitytest</glossterm>
            <glossdef>
                <para>
                    a definition
                </para>
            </glossdef>
        </glossentry>
    </glossary>

The following snippet:

    <para>
        &myentitytest;
    </para>
    <glossary role="auto"/>

pulls in the glossary definition but does not establish the link

However, the following in one file does establish the link.

The glossary file contains
   <para>
        &myentitytest;
    </para>
    <glossary>
        <glossentry id="gloss-entitytest">
            <glossterm>entitytest</glossterm>
            <glossdef>
                <para>
                    a definition
                </para>
            </glossdef>
        </glossentry>
    </glossary>



Is there something I can do do get the first case to work with the role="auto"? I am using xsltproc with the docbook-xsl-ns-1.78.1 stylesheets.

Thanks,
Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to