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: RE: [docbook] How can I render an element twice without duplicating the ID?


Hi Brad,
I could be misunderstanding your goal, but if you want to have a "table
of contents" for a qandaset (or qandadiv), the stylesheets can already
do that out of the box:

http://www.sagehill.net/docbookxsl/QandAtoc.html

In the case of qandasets/divs, the "toc" is a list of questions (or
whatever label you're using).

Hope that helps.

David

-----Original Message-----
From: Brad Smith [mailto:usernamenumber@gmail.com] 
Sent: Thursday, April 15, 2010 3:47 PM
To: docbook@lists.oasis-open.org
Subject: [docbook] How can I render an element twice without duplicating
the ID?

Hello all,

I am working on stylesheets for a book that will have Q/As and
task-descriptions in it. I want to display the <qandaentry>s without
<answer>s, and the task <step>s without <example>s by default, then
reprint each element in its entirety (ie with answers and examples) in
an appendix at the end.

The approach I'm taking is to override the templates for qandaentry
and step so that they omit the "answer" elements by default, then
create mode="answers-section" templates for them that do include the
answers, and call those at the end of the book template.

The problem I am encountering is that the default fo output
stylesheets, upon which I'm basing mine, add id elements to nearly
everything, it seems, and generate-id() always seems to generate the
same value when run against the same element, even if it's being run a
second time. I've even tried using <xsl:copy-of> to avoid duplicating
IDs, and so far no luck (though I might just not be using it right
yet), and since fop dies if there are two elements with the same ID,
building a pdf fails.

So, I my questions are:
1) Is this a sane way to go about what I want to accomplish?
2a) If so, how can I avoid getting duplicate IDs?
2b) If not, suggestions?

Thanks!
--Brad

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org



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