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


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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

Subject: Placement of indexterms

I've been indexing a book in DocBook 5.0 and am running into something
strange.  What I would like to do is to mark an entire section as a
range in the index.  So, I have something like this:

  <title>Using the Internet</title>
  <indexterm class="startofrange" xml:id="idx.chap.using.web">
	... content ...
  <indexterm class="endofrange" startref="idx.chap.using.web"/>

This works fine if there are no subsections in "... content ...". But,
if there are, the <indexterm> at the end is invalid.  That is,
<indexterm> is allowed inside a section *before* any sub-section, but
not after.  The only way to make this example parse is to place the
closing <indexterm> at the end of the last, inner-most section.
Confusing enough?  Here is a better(?) example:

<section>  ...
   <indexterm .../> <!-- A OK-->
   <section> ...
      <section> ...
      <section> ...
        <indexterm .../> <!-- B OK-->
      <indexterm .../> <!-- C BAD-->
   <indexterm .../> <!-- D BAD-->

In this example, only indexterms A and B will parse.  C and D won't.
(Incidentally, the stylesheets will correctly handle an endofrange
indexterm in the <!-- D --> position, even though it doesn't parse.)

While the effective result of putting the indexterm at the "latest"
point where it will parse is no different than putting it at the end of
the section, I think the placement forced by the parser is more
confusing and could lead to confusion and errors as content is edited.

My question is whether this is intentional for reasons I've missed, or
if it is a bug in the schemas?  Anyone have any thoughts?

Dick Hamilton

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