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: generating index in plain text

I am creating an XML-based index file from my DocBook 5 XML source. I
made a copy of the javahelp xsl templates to get started.
My problem is that the target format requires that the <term> and the
<title> the term points to must be in plain text (that is, contain no
other markup). The target format follows this pattern:
  <term> stuff </term>
    <title> Title of Section </title>
    <target file="myfile.htm" fragment="#middleofpage"/>

Is there a way to 'clean up' terms and titles so they only have text?
For today I am throwing away index terms that point to a title with
<inlinemediaobject> child.
like so:

1: <xsl:template match="d:indexterm|d:primary|d:secondary" mode="idx">
2:  ... create $text variable ...
3:  <xsl:if test="$text != '' and
4:       create the index term in the new format
5: </xsl:template>

Line 3 looks back for the title that contains the index term, but only
if the title doesn't contain any inlinemediaobject children.
I think that's what it does anyway.

I bet I'm not the first person to have this need to create a new
format from DocBook index terms. Any ideas or suggestions on how I can
efficiently create this format so it doesn't contain other markup
(like inlinequations, inlinemediaobjects and emphasis for example)?

BTW, the inlinemediaobjects are generally math images needed in some
titles. Very few of them, but there they are.
--Tim Arnold

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