Problems with draft.mode

View: New views
5 Messages — Rating Filter:   Alert me  

Problems with draft.mode

by Nobble :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am having some problems using draft.mode. I have a document with
some <remark>...</remark> elements in it. I have checked that my
customisation layer doesn't contain any occurrences of draft.mode or
remark... so any customisations being applied shouldn't be interfering
with the default behaviour. I have grabbed the latest snapshots of the
DocBook stylesheets.

I am converting the document to pdf via fo and using  apache FOP
version 0.95. I am creating two versions. A draft version with:

xsltproc --xinclude --stringparam draft.mode yes --output
UG.xml.draft.fo
/usr/share/docbook-xsl-latest/customisation/fo/custom.xsl UG.xml
fop.bat -d -fo UG.xml.draft.fo -pdf UG.xml.draft.pdf

and a final version with

xsltproc --xinclude --stringparam draft.mode no --output UG.xml.fo
/usr/share/docbook-xsl-latest/customisation/fo/custom.xsl UG.xml
fop.bat -d -fo UG.xml.fo -pdf UG.xml.pdf

The problem is that the remarks are appearing in the final version as
well as the draft version, but I thought that with draft.mode="no"
they weren't supposed to appear.

Anyone got any ideas about what might be going wrong?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: Problems with draft.mode

by David Cramer (Tech Pubs) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

<remark>s are controlled by a separate parameter:
http://docbook.sourceforge.net/release/xsl/current/doc/html/show.comment
s.html

David

> -----Original Message-----
> From: Paul Suckling [mailto:paul.suckling@...]
> Sent: Friday, June 26, 2009 6:08 AM
> To: DocBook Apps
> Subject: [docbook-apps] Problems with draft.mode
>
> I am having some problems using draft.mode. I have a document
> with some <remark>...</remark> elements in it. I have checked
> that my customisation layer doesn't contain any occurrences
> of draft.mode or remark... so any customisations being
> applied shouldn't be interfering with the default behaviour.
> I have grabbed the latest snapshots of the DocBook stylesheets.
>
> I am converting the document to pdf via fo and using  apache
> FOP version 0.95. I am creating two versions. A draft version with:
>
> xsltproc --xinclude --stringparam draft.mode yes --output
> UG.xml.draft.fo
> /usr/share/docbook-xsl-latest/customisation/fo/custom.xsl
> UG.xml fop.bat -d -fo UG.xml.draft.fo -pdf UG.xml.draft.pdf
>
> and a final version with
>
> xsltproc --xinclude --stringparam draft.mode no --output
> UG.xml.fo
> /usr/share/docbook-xsl-latest/customisation/fo/custom.xsl
> UG.xml fop.bat -d -fo UG.xml.fo -pdf UG.xml.pdf
>
> The problem is that the remarks are appearing in the final
> version as well as the draft version, but I thought that with
> draft.mode="no"
> they weren't supposed to appear.
>
> Anyone got any ideas about what might be going wrong?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail:
> docbook-apps-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Problems with draft.mode

by Nobble :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes. That fixed it. Thanks.

I think the DocBook documentation could be improved in this respect.
The documentation for remark does not make any reference to this
parameter. My expectation from the documentation was that it remarks
would be suppressed automatically when draft.mode was set to 'no'. I
think this would be good default behaviour.

I've got another related problem to deal with now. I have set the
draft.watermark.image parameter to point to a local .png file. When
draft.mode is set to 'yes' I see lots of

background-image="url(file:///C:/<snip>/draft.png)"

attributes in my .fo output. However, I can't see the image in my PDF
output. Anyone got an idea what might be going wrong here?

Thank you.

2009/6/26 David Cramer <dcramer@...>:

> <remark>s are controlled by a separate parameter:
> http://docbook.sourceforge.net/release/xsl/current/doc/html/show.comment
> s.html
>
> David
>
>> -----Original Message-----
>> From: Paul Suckling [mailto:paul.suckling@...]
>> Sent: Friday, June 26, 2009 6:08 AM
>> To: DocBook Apps
>> Subject: [docbook-apps] Problems with draft.mode
>>
>> I am having some problems using draft.mode. I have a document
>> with some <remark>...</remark> elements in it. I have checked
>> that my customisation layer doesn't contain any occurrences
>> of draft.mode or remark... so any customisations being
>> applied shouldn't be interfering with the default behaviour.
>> I have grabbed the latest snapshots of the DocBook stylesheets.
>>
>> I am converting the document to pdf via fo and using  apache
>> FOP version 0.95. I am creating two versions. A draft version with:
>>
>> xsltproc --xinclude --stringparam draft.mode yes --output
>> UG.xml.draft.fo
>> /usr/share/docbook-xsl-latest/customisation/fo/custom.xsl
>> UG.xml fop.bat -d -fo UG.xml.draft.fo -pdf UG.xml.draft.pdf
>>
>> and a final version with
>>
>> xsltproc --xinclude --stringparam draft.mode no --output
>> UG.xml.fo
>> /usr/share/docbook-xsl-latest/customisation/fo/custom.xsl
>> UG.xml fop.bat -d -fo UG.xml.fo -pdf UG.xml.pdf
>>
>> The problem is that the remarks are appearing in the final
>> version as well as the draft version, but I thought that with
>> draft.mode="no"
>> they weren't supposed to appear.
>>
>> Anyone got any ideas about what might be going wrong?
>>
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
>> For additional commands, e-mail:
>> docbook-apps-help@...
>>
>>
>



--
Nashi Power.
http://nashi.podzone.org/
Registered address: 7 Trescoe Gardens, Harrow, Middx., U.K.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: Problems with draft.mode

by David Cramer (Tech Pubs) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So my understanding is that the DocBook DTD/Schema and the DocBook
stylesheets are separate things. The DTD/Schema documentation doesn't
make any assumptions about what tool you're using to process your
documents.

Making show.comments depend on draft.mode would make sense. That way you
could have certain chapters or sections that have @status='draft'. For
those chapters/sections, show.comments would be 1. For other, non-draft,
chapters/sections, show.comments would be 0. This should do that:

<xsl:param name="draft.mode" select="'maybe'"/>
<!-- Be sure draft.mode has been declared before now -->
<xsl:param name="show.comments">
 <xsl:choose>
  <xsl:when test="$draft.mode = 'yes'">1</xsl:when>
  <xsl:when test="$draft.mode = 'maybe' and
ancestor-or-self::*[@status][1]/@status = 'draft'">1</xsl:when>
  <xsl:otherwise>0</xsl:otherwise>
 </xsl:choose>
</xsl:param>

To get that to be considered as the default behavior, log a request at
sourceforge: https://sourceforge.net/tracker/?group_id=21935&atid=373747

David

> -----Original Message-----
> From: Paul Suckling [mailto:paul.suckling@...]
> Sent: Friday, June 26, 2009 10:21 AM
> To: DocBook Apps
> Subject: Re: [docbook-apps] Problems with draft.mode
>
> Yes. That fixed it. Thanks.
>
> I think the DocBook documentation could be improved in this respect.
> The documentation for remark does not make any reference to
> this parameter. My expectation from the documentation was
> that it remarks would be suppressed automatically when
> draft.mode was set to 'no'. I think this would be good
> default behaviour.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Problems with draft.mode

by Nobble :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can confirm that that works for yes and no, but I haven't tested for maybe.

I have submitted it at sourceforge as you requested anyhow.

Thank you again!

2009/6/26 David Cramer <dcramer@...>:

> So my understanding is that the DocBook DTD/Schema and the DocBook
> stylesheets are separate things. The DTD/Schema documentation doesn't
> make any assumptions about what tool you're using to process your
> documents.
>
> Making show.comments depend on draft.mode would make sense. That way you
> could have certain chapters or sections that have @status='draft'. For
> those chapters/sections, show.comments would be 1. For other, non-draft,
> chapters/sections, show.comments would be 0. This should do that:
>
> <xsl:param name="draft.mode" select="'maybe'"/>
> <!-- Be sure draft.mode has been declared before now -->
> <xsl:param name="show.comments">
>  <xsl:choose>
>  <xsl:when test="$draft.mode = 'yes'">1</xsl:when>
>  <xsl:when test="$draft.mode = 'maybe' and
> ancestor-or-self::*[@status][1]/@status = 'draft'">1</xsl:when>
>  <xsl:otherwise>0</xsl:otherwise>
>  </xsl:choose>
> </xsl:param>
>
> To get that to be considered as the default behavior, log a request at
> sourceforge: https://sourceforge.net/tracker/?group_id=21935&atid=373747
>
> David
>
>> -----Original Message-----
>> From: Paul Suckling [mailto:paul.suckling@...]
>> Sent: Friday, June 26, 2009 10:21 AM
>> To: DocBook Apps
>> Subject: Re: [docbook-apps] Problems with draft.mode
>>
>> Yes. That fixed it. Thanks.
>>
>> I think the DocBook documentation could be improved in this respect.
>> The documentation for remark does not make any reference to
>> this parameter. My expectation from the documentation was
>> that it remarks would be suppressed automatically when
>> draft.mode was set to 'no'. I think this would be good
>> default behaviour.
>



--
Nashi Power.
http://nashi.podzone.org/
Registered address: 7 Trescoe Gardens, Harrow, Middx., U.K.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...