OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] Turn off draft mode in selected sections


----- Original Message ----- 
From: "John Brown" <johnbrown105@hotmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Friday, April 04, 2008 5:41 PM
Subject: [docbook-apps] Turn off draft mode in selected sections


> In the DocBook stylesheet tutorial at
> http://docbook.sourceforge.net/release/xsl/current/doc/fo/draft.mode.html
> it says that:
> "individual sections will be treated as draft or final
> independently, depending on how their status attribute is set.
> "
>
> What are the legal values of the status attribute?


> I tried <chapter status="draft"> and that particular chapter
> had the draft watermark, etc, and the rest of the document
> did not. I want the exact opposite, .i.e., I want the book
> to be in draft mode by default, with selected sections in
> "final" mode.

The test used by the stylesheet to add draft markings is this:

<xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">

In other words, it checks ancestors and self for a status attribute, and 
applies it if the closest status is 'draft'.  Any other value does not 
trigger draft markings.  So your usage should work, as should status="no" or 
any other value.

> I only want this because I observed that when draft mode is on,
> the PDF does not have any images except the draft watermark.

I'm curious about this statement.  The draft mode should not affect any 
graphics in the document, and it doesn't in my tests.  What processor are 
you using?

> I thought that something like the following might work:
>
> <book status="draft">
>   <title/>
>   <chapter><title/></chapter>
>   <chapter><title/></chapter>
>   <chapter status="TURN-OFF-DRAFT-MODE"><title/></chapter>
> </book>
> but "no" didn't work.

This worked for me.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net





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