OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: indexterm and generated ids


I'm trying to get rid of generated ids in XHTML output.  The
primary reason was Gnome bug


and the fact that ids generated by xsltproc are not stable
(they are based on memory addresses or something like that).

But things got weird with <indexterm>s.  Originally
non-zoned <indexterm>s were used:

    <section id="never">
      <para id="never-1">Never, forget it.</para>

then in index generated with <index> I got

    <dt>Never, <a class="indexterm" href="#never">Never</a></dt>

which links to #never as I would like.  However, the XHTML
also contains a stray, never referenced anchor with a
generated id:

    <div class="section" lang="en" xml:lang="en">
      <div class="titlepage">
            <h2 class="title" style="clear: both"><a id="never"></a>Never</h2>
      <a id="id298057" class="indexterm"></a>
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What's this?
      <p><a id="never-1"></a>Never, forget it.</p>

I thought it was some artefact of <indexterm>s based on
physical location.  So I changed them to zoned:

    <indexterm zone="never"><primary>Never</primary></indexterm>

This did not change anything.  While I can place the zoned
indexterm anywhere I wish in the source, something like

   <a id="id298057" class="indexterm"></a>

still gets generated to the primary flow in the place
corresponding to their physical location.

This seems to be caused by the following template

    <xsl:template match="indexterm">
      <!-- this one must have a name, even if it doesn't have an ID -->
      <xsl:variable name="id">
        <xsl:call-template name="object.id"/>

      <a id="{$id}" class="indexterm"/>

I can override it, making singular zoned indexterms to
really disappear from the primary flow, but the question is
*why* they output anything by defaut, i.e. what can break if
I do this?



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]