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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Indexterms in FAQ Questions result in duplicate text?


You have run into one of the compromises that the stylesheet has to make for
HTML.  In the case of the QandA table of contents, it processes the question
element by using <xsl:value-of> on the first child element of <question>.
That gets just its string value, and so the indexterm text is included.  It
gets the string value because it puts it inside an HTML <a> element. Since a
question element can contain arbitrary content, including other cross
references, that would lead to bad HTML because you can't nest links within
links in HTML.

You can work around the problem by putting the <indexterm> after the closing
</para> tag within the <question>.  That way it will not be included in the
first child of question, and it should still work.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Robert A. Ballance" <raballa@sandia.gov>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, June 08, 2004 2:01 PM
Subject: [docbook-apps] Indexterms in FAQ Questions result in duplicate
text?


> If I put an <indexentry> into an FAQ <question>,  the index term gets
> duplicated in the list of questions in the HTML output.
>
> Configuration:  Saxon, Docbook 4.2 XML, and the Docbook-XSL stylesheets
> 1.65.1
>
> Example:
>
> <question>
> <para>
> Can I use
> <indexterm><primary>OOPS</primary></indexterm> docbook as my
> documentation standard?
>    </para>
> </question>
>
> gives the following output in the list of questions
>
> Q:
> Q: Can I use OOPS docbook as my documentation standard?
> Q:
>
> but
> Q: Can I use docbook as my documentation standard?
> A: ...
>
> in the full sequence.
>
> ... Bob Ballance
>
>
>
> To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
>
>
>



To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


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