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:

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

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>
      <section> ...
        <indexterm .../> <!-- B OK-->
      </section>
      <indexterm .../> <!-- C BAD-->
   </section>
   <indexterm .../> <!-- D BAD-->
</section>

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?

Thanks,
Dick Hamilton
http://rlhamilton.net
http://managingwriters.com




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