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] Adding new element to docbook DTD


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: tom_schr@web.de [mailto:tom_schr@web.de] 
Sent: Wednesday, March 29, 2006 10:48 AM
To: docbook@lists.oasis-open.org
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].


Tom

------
[1]
http://docbook.sourceforge.net/release/xsl/current/doc/tools/profiling.h
tml
[2] http://www.sagehill.net/docbookxsl/Profiling.html

--
Thomas Schraitle

---------------------------------------------------------------------
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]