This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: docbook: about paragraphs, cross-references, indexes


Hello Roy,

On Wed, 11 Apr 2001 Roy.Gardiner@natwest.com wrote:
<snip/>
> 2) Index terms which are not ranges go into the text, like this:
> 
> The Tiger<indexterm>
> <primary>Big Cats</primary>
> <secondary>Tigers</secondary></indexterm>
> is a very large cat indeed.  
> 
> If I have multiple tigers, I repeat the whole index term each time. What
> about an index entry with an id= to which I can refer in the text? Shorter
> and easier to maintain - if I want 'Tigers' to become a primary, it only
> changes in one place.
<snip/>

As far as I understood DocBook TDG (The Definitive Guide) the indexterm
element supports the single central definition of indexterms for example
within bookinfo. All you need are elements each having an id-attribute
such that those ids can be referenced from the zone-attribute of an
indexterm. TDG says:

"Zone

The use of Zone implies a spanning index entry. Zone holds the IDs of the
elements to which it applies. Then IndexTerm applies to the contents of
the entire element(s) to which it points. If Zone is used, the phyiscal
placement of the IndexTerm in the flow of the document is
irrelavant." [TDG]

I hacked together a small example which is hopefully most of all
semantically sensible and not too far from real life docbook:

============================================================
<?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "urn:x-oasis:docbook-xml-v4.1.2" [
]>

<book>
  <bookinfo>
    <indexterm significance="normal" zone="here there overthere">
      <primary>Nothing Special</primary>
    </indexterm>
  </bookinfo>
  <chapter>
    <title>A Title</title>
    <para>This chapter is about <emphasis id="here">nothing
special</emphasis>.
</para>
  </chapter>
  <chapter>
    <title>Another Title</title>
    <para>And now to something completely different:
<phrase id="there">nothing special</phrase>.
</para>
  </chapter>
  <chapter>
    <title>One More Title</title>
    <para>And at least we talk about <anchor id="overthere"/> nothing
special.
</para>
  </chapter>
</book>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
End:
-->
================================================================

Hope this helps.
Bye,
Steffen Maier.

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E d- s++:- a-->?@ C(++++) ULC++++$ P+ L++(+++) E++>+++ W++(--) N+ !o
K? w O- M- V? PS+(++) PE(-) Y+ PGP>+++ t 5 X+++ R* tv(-) b+ DI++ D G>++ e
h* r- y? UF
------END GEEK CODE BLOCK------

  http://w3studi.informatik.uni-stuttgart.de/~maiersn/
mailto:Steffen.Maier@studserv.uni-stuttgart.de


------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]