atom feed10 messages in org.oasis-open.lists.docbookRE: [docbook] Adding new element to d...
FromSent OnAttachments
John DyerMar 28, 2006 3:38 pm 
Thomas SchraitleMar 29, 2006 8:46 am 
John DyerMar 29, 2006 9:17 am 
Jirka KosekMar 29, 2006 9:49 am.bin
Bob StaytonMar 29, 2006 10:04 am 
Dick HamiltonMar 29, 2006 10:06 am 
John DyerMar 30, 2006 9:58 am 
Chris ChiassonMar 30, 2006 11:20 am 
Jirka KosekMar 30, 2006 12:28 pm.bin
Bob StaytonMar 30, 2006 11:49 pm 
Subject:RE: [docbook] Adding new element to docbook DTD
From:John Dyer (
Date:Mar 29, 2006 9:17:41 am

Tom, Thanks for the info, but I am actually already using profiling. The problem I have is that I need to select parts of my document to print based on multiple profile conditions. The only logical operator docbook supports is OR. Let's say we have two possible conditions (profiles), C1 and C2, and this example appears in my book:

<para condition="C1;C2"> this is a test </para>

This paragraph would be printed if C1 is true OR C2 is true. I would like to have a way to print this paragraph only if C1 is true AND C2 is true. As far as I can tell, docbook does not support this, so my idea is to nest elements with the conditions that need to all be true. Take this example:

<para condition="C1"> <para condition="C2"> this is a test </para> </para>

This actually produces the desired result in terms of printing only if C1 AND C2 are true, but it produces 2 paragraphs. In other words, there is an extra blank line before the text, which is not desirable.

Hopefully that makes a bit more sense.

Thanks, John

-----Original Message----- From: [] Sent: Wednesday, March 29, 2006 10:48 AM To: Subject: Re: [docbook] Adding new element to docbook DTD

Hi John,

On Wednesday 29 March 2006 01:40, John Dyer wrote:

Hi, I would like to add a new element to docbook to allow for more control over conditional processing. Here is an example of what I would like to do:

[...] Am I on the right track here? Is this even possible? If there is a better way, I would like to hear about it. If this is a possible solution, could someone help me fill in the blanks above?

After reading your mail it seems that your problem is better solved with profiling. It's invented for conditional text/processing. The big advantage is that you don't have to customize the DocBook DTD.

It's pretty simple, you just have to add attributes with appropriate values. Another big advantage is that is already pretty well supported by the DocBook stylesheets. For more information see [1] and [2].

------ [1] tml [2]