Tracker: RFEs

5 indexterms in footnotes - ID: 2821653
Last Update: Comment added ( mcswell )

(I posted this to the docbook mailing list, and Jirka Kosek suggested I
submit an RFE.)

The documentation for DB 5 (I believe this goes back to 4.4) appears to be
inconsistent, or at least misleading, wrt the appearance of indexterms
inside footnotes.

According to the DocBook 5 spec, indexterms can appear in footnotes (See
http://www.docbook.org/tdg5/en/html/indexterm.singular.html "indexterm
(db.indexterm.singular)"; I'm not worried about the startofrange/endofrange
kind of indexterm.) Specifically, the indexterm spec says that footnote is
one of the
possible parents of indexterm, and the footnote page confirms that
indexterm can be a child of footnote.

However, the spec also says (over in the page about footnotes,
http://www.docbook.org/tdg5/en/html/footnote.html, under "Additional
constraints") that "indexterm must not occur in the descendants of
footnote." Taking these two things together, I would understand the
intention to be that the structure
<footnote>
<para>
...<indexterm.../>
</para>
</footnote>
is forbidden. But that raises the question of where in footnotes
indexterms *can* appear; between the footnote and the para inside the
footnote?

I've asked this question (where can indexterms appear in footnotes) on
several forums. The only response I've gotten is that the "Additional
constraints" forbid the appearance of indexterms *anywhere* inside
footnotes. Indeed, XMLmind gives exactly this result: no matter where you
try to put an indexterm inside a footnote, you get an error (from their
Schematron checker, not from their RelaxNG grammar). But if indexterms
*are* forbidden anywhere inside footnotes, then why are indexterms listed
in the spec as a possible child of footnote (and footnotes as possible
parents of indexterms)? Why not just not list them as possible
parent/child?

My own interpretation is that indexterms are supposed to be allowed as
immediate children of footnotes, i.e. in a sister relationship with para,
but not inside the para(s). But I have no idea why there should be such a
restriction; what's wrong with having an indexterm inside a para inside a
footnote?

Summary: I believe that either indexterms should be allowed anywhere inside
footnotes (including in the descendants of footnotes), or else they should
be allowed nowhere under footnotes. If this is done, then the "Additional
constraint" will be unnecessary for indexterms.

(I am agnostic about whether the "Additional constraints" should be used
for the other elements that are currently disallowed under the descendants
of footnotes, or whether those should be replaced by simply disallowing
them under footnotes. Perhaps there is some reason for allowing them but
having the constraints, although the constraints are then subject to the
same potential misinterpretation. The reason for these constraints should
at least be explained and/or exemplified.)


Mike Maxwell ( mcswell ) - 2009-07-15 04:20

5

Open

None

Norman Walsh

DocBook

v5.0

Public


Comments ( 3 )

Date: 2009-07-15 23:52
Sender: mcswell

About Norman Walsh's comment: That's what I figured the reasoning was for
the constraints on appearance in descendants. But if indexterms (etc.) are
not supposed to appear *in* footnotes, including not as immediate children,
then shouldn't indexterms be removed from the list of possible children of
footnote? (And likewise, footnote should not appear in the list of
possible parents of indexterms etc.)

(BTW, what is the reasoning for not having indexterms in footnotes? I've
seen footnotes indexed in lots of books, sometimes as just the page number
they appear on, and sometimes with the footnote number explict:
foo 13 fn. 7
Likewise for endnotes.)


Date: 2009-07-15 23:45
Sender: mcswell

Just to clarify my agnosticism: one of the constraints says that footnotes
cannot occur in the descendants of footnotes; in addition, footnote is not
a child (or parent) of footnote. That makes sense, so I guess I'm a theist
there. It's the other constraints, where an element like indexterm or
example is allowed as a child of footnote but not as a grandchild (if
that's what not occurring among the descendants means) that are puzzling
and might need explanation or exemplification.


Date: 2009-07-15 18:28
Sender: nwalshProject Admin

The intent of the additional constraint is to forbid indexterms from
appearing in footnotes or in the descendants of footnotes. I agree that
it's ambiguously worded at the moment and I'll fix that.

It's a consequence of grammar based schema languages (like DTDs, RELAX NG,
and W3C XML Schema) that it is very difficult to exclude elements from some
contexts. Since indexterms are allowed in para, and in emphasis, and other
children and descedants of para, in order to exclude them from the content
model, I'd have to define alternate patterns for every possible descendant
without indexterm.

That's impractical, so instead we use the common patterns and forbid the
use of indexterm inside footnote with an additional constraint.


Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.