Re: [docbook-apps] Using imageobject twice on title page fails (FO)

2015-04-17 Thread Bob Stayton

Hi,
If you take a peek inside the generated titlepage.templates.xsl, you'll 
see that each of the title pages uses different modes to process their 
elements:


recto page:


  http://www.w3.org/1999/XSL/Format";
  xsl:use-attribute-sets="book.titlepage.recto.style">

  


verso page:


  http://www.w3.org/1999/XSL/Format";
xsl:use-attribute-sets="book.titlepage.verso.style"
space-before="1.5in">

  


For many elements (including mediaobject), these modes eventually apply 
templates in the normal mode.  That's why you get duplicate ids.


You'll need to add a template to your customization layer something like 
this:




  




(Add the namespace prefix d:mediaobject if you are using the namespaced 
stylesheets with DocBook 5).


Bob Stayton
Sagehill Enterprises
b...@sagehill.net

On 4/10/2015 5:52 AM, Kallauch, Benjamin (EEIN) wrote:

Hi group.
I want to display an image (mediaobject) twice on my book titlepages,
first on the recto page and second on the following verso page.
I made a simple extension to the “titlepage.templates.xml” file as
proposed by Bob. Here is an XML snippet:

   
…

…
   
…
When I do this with other elements (i.e. ), everything is fine.
But if I do this with an image, the FOP complains about a previously
used ID:
“javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Property ID "N4000E" (found on
"fo:block") previously used; ID values must be unique within a document!”
I checked the FO-Output and indeed found the image block twice with the
same ID (“N4000E”). For the other elements there is no problem, because
they don’t get an ID (i.e. author).
Question: How can I reuse my image more than once on the recto/verso
title page.
I could insert a second imageobject (same file) and fetch it with
t:predicate="[position() = 2]” as a work around. But somehow I want to
keep my code easy and clean.
Can anyone help? Thanks.
Ben


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



Re: [docbook-apps] Different settings for chunk.section.depth for different parts

2015-04-17 Thread Bob Stayton
Can't be controlled with a parameter, but it can with processing 
instructions.  See:


http://docbook.sourceforge.net/release/xsl/1.78.1/doc/pi/dbhtml_stop-chunking.html

Bob Stayton
Sagehill Enterprises
b...@sagehill.net

On 4/14/2015 3:00 AM, Elias Gerber wrote:

Hello everyone.

Is it possible to define different values for the parameter
'chunk.section.depth' in one book?
In my case my book has two parts, in the first part I would prefer a
chunk.section.depth value of 1, while for the second part a value of 2 would
produce nicer output.

Thanks for any hints

Elias Gerber


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





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



Re: [docbook-apps] AW: Graphical admonition in FO: Alignment?

2015-04-17 Thread Bob Stayton

Hi,
The way I interpret your examples is that just adding the red border to 
the block in the list-item-body changes the alignment of the 
list-item-label.  Is that right?  That should not happen.   What FO 
processor are you using?


Can you be a bit more precise on your need: "What I need is to align the 
list body text with the middle of the graphic, not the top." The "middle 
of the graphic" is a precise point, but the text can span multiple 
lines.  Do you mean the baseline of the first line of the body?


Bob Stayton
Sagehill Enterprises
b...@sagehill.net

On 4/17/2015 12:02 AM, Kallauch, Benjamin (EEIN) wrote:

Dear all,

I made some further tests on the admonition alignment and incidentally
discovered a strange behavior.

If I made the  inside  the item body visible with a red dotted
line, the inner block (built through ) is rendered on
the bottom of its outer block. Here is an example code:






 



As soon as the  is empty and without any graphical content it
seems to be not considered as rendered block. That’s ok, but then the
inner content (apply-templates) ist rendered differently:







 



Any suggestions, how I can control the behavior? Maybe leave out the
 element, because a block will already be rendered due to
apply-templates?

best regards, Ben

*Von:*Kallauch, Benjamin (EEIN)
*Gesendet:* Donnerstag, 16. April 2015 11:25
*An:* docbook-apps@lists.oasis-open.org
*Betreff:* [docbook-apps] Graphical admonition in FO: Alignment?

Dear all,

I have some difficulties to understand how to align the List Item
Graphic with the first text line in the list body. In my example
(attachment) the list body seems to be aligned with the top of the
graphic (the graphic has actually no surrounding white space around).
The background colors and line are set manually to see better what’s
going on. What I need is to align the list body text with the middle of
the graphic, not the top.

Several tests with the fo-attribute “alignment-baseline” did not bring
any solution. Here is my current stylesheet code for generating this
type of admonition:



 

 

 

 

 

 

 

 

 

 

 

 

 




 

 

 

 

 

 

 

 

 

 

 

 



Does anyone has a good idea how to control alignment between list item
labels and their body text?

Thanks, Ben.




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



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



Re: AW: [docbook-apps] Listings placeable at the End of Printed Output?

2015-04-17 Thread Bob Stayton
Sorry, I assumed you were using DocBook5 and the namespaced version of 
the stylesheets, now I see that you are using DocBook 4.   In the 
customization I gave you, just remove the "d:" namespace prefix from the 
element names, then the stylesheet will recognize the elements in your 
document.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net

On 4/17/2015 2:54 AM, Eisele, Kai Alexander wrote:

Hi,

Sorry, but this does not work for me.

Here some relevant data, that may be necessary for further analysis:

_Used tools/software_

__

XSLT Processor: Saxon Version 9-5-1-8

FO Processor: Apache FOP 1.1

XSL Stylesheet Files Distribution: ZIP-Release 1.78.1 downloaded from
sourceforge.net

DocBook V4.5 edited with XMLmind XML Editor Professional Edition 6.1.0

I inserted the following passages into my XSL customization layer:



http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:d="http://docbook.org/ns/docbook"; version="1.0">

  ...

  

  ...

  

  appendix nop 

  ...

  book toc,title

  ...

  

  

  

  

 

  

 

  

 

 

  

 

 

 

 

   

  

  

   

 

  

 

  

 

 

 

 

   

  

  

   

 

  

  

 

  

 

 

 

 

   

  

  

   

 

  

  

  

  ...



As to the appendix' customization's result in printed output, it just
seems to be ignored by XSLT and FOP.

The processors run through it without any warnings or error messages,
everything appears to be alright, yet no appendix is created in the PDF.
Only the standard book TOC is available in the front of the document.

Maybe I should try the alternative, you mentioned, which is to let the
stylesheet create an appendix or appendices automatically?

Because that is, what should be done as a rule by the XSL customization
layer we need for our print output documentation purposes.

Regards

Kai Alexander Eisele

-Ursprüngliche Nachricht-
Von: Bob Stayton [mailto:b...@sagehill.net]
Gesendet: Mittwoch, 15. April 2015 18:02
An: Eisele, Kai Alexander; docbook-apps@lists.oasis-open.org
Betreff: Re: [docbook-apps] Listings placeable at the End of Printed Output?

Hi,

Yes, it is possible to do this.  You could get the stylesheet to do it
automatically, but you could also use a special appendix file as you
suggest to trigger it only for certain documents.  That appendix would
need a role attribute to trigger the special processing.

In the template matching on the book element in fo/division.xsl, it
calls the "make.book.tocs" template before the content.  That template
checks the "generate.toc" stylesheet param to see which lists to
generate.  You would want to set "generate.toc" to just "book toc,title"

so it doesn't generate the other lists in the front.

Then you create a custom template for your special appendix to generate
the lists of titles, borrowing much of the code from the
"make.book.tocs" template, something like:





  



  



   

  









  





  



  

  



Note you need to change the select attribute for figure from .//figure
(the context relative to the book element) to //figure so the appendix
context can find the figure elements.

This special appendix will also generate an entry in the main TOC,
unless you further customize to turn that off or change its appearance.

Bob Stayton

Sagehill Enterprises

b...@sagehill.net 

On 4/15/2015 3:11 AM, Eisele, Kai Alexander wrote:

 > Hi,

 >

 > Is there any chance to have lists of figures, tables and examples

 > positioned at the end of printed output (PDF documents)?

 >

 > By default, the listings appear at the beginning of the documents

 > right after the actual TOC.

 >

 > Is it possible to customize a sort of document appendix, that contains

 > the lists of figures, tables and examples?

 >

 > Regards

 >

 >

 > *Kai Alexander Eisele*

 > SAP CC

 >

 > *CENIT AG *

 > Industriestraße 52-54

 > D-70565 Stuttgart

 > Phone:  +49 (0) 711-78 25-3241

 > Fax:+49 (0)711 7825 44-4145

 >

 > k.eis...@cenit.de  

 >

 > www.cenit.com  __

 >

 >

 > CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711

 > 7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.de


 > Geschaeftsstellen: Berlin, Frankfurt, Ham

AW: [docbook-apps] Listings placeable at the End of Printed Output?

2015-04-17 Thread Eisele, Kai Alexander
Hi,



Sorry, but this does not work for me.



Here some relevant data, that may be necessary for further analysis:



Used tools/software



XSLT Processor: Saxon Version 9-5-1-8

FO Processor: Apache FOP 1.1

XSL Stylesheet Files Distribution: ZIP-Release 1.78.1 downloaded from 
sourceforge.net

DocBook V4.5 edited with XMLmind XML Editor Professional Edition 6.1.0



I inserted the following passages into my XSL customization layer:





http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:d="http://docbook.org/ns/docbook"; version="1.0">

 ...

 

 ...

 

 appendix nop 

 ...

 book toc,title

 ...

 



 

 



 





 



 







 









  

 

 

  



 





 









  

 

 

  



 

 





 









  

 

 

  



 

 



 

 ...







As to the appendix' customization's result in printed output, it just seems to 
be ignored by XSLT and FOP.



The processors run through it without any warnings or error messages, 
everything appears to be alright, yet no appendix is created in the PDF. Only 
the standard book TOC is available in the front of the document.



Maybe I should try the alternative, you mentioned, which is to let the 
stylesheet create an appendix or appendices automatically?



Because that is, what should be done as a rule by the XSL customization layer 
we need for our print output documentation purposes.



Regards

Kai Alexander Eisele





-Ursprüngliche Nachricht-
Von: Bob Stayton [mailto:b...@sagehill.net]
Gesendet: Mittwoch, 15. April 2015 18:02
An: Eisele, Kai Alexander; docbook-apps@lists.oasis-open.org
Betreff: Re: [docbook-apps] Listings placeable at the End of Printed Output?



Hi,

Yes, it is possible to do this.  You could get the stylesheet to do it 
automatically, but you could also use a special appendix file as you suggest to 
trigger it only for certain documents.  That appendix would need a role 
attribute to trigger the special processing.



In the template matching on the book element in fo/division.xsl, it calls the 
"make.book.tocs" template before the content.  That template checks the 
"generate.toc" stylesheet param to see which lists to generate.  You would want 
to set "generate.toc" to just "book toc,title"

so it doesn't generate the other lists in the front.



Then you create a custom template for your special appendix to generate the 
lists of titles, borrowing much of the code from the "make.book.tocs" template, 
something like:







   

 

   

 

   



  

 

   

   

   

   

 

   

   

 

   

 



 

   



Note you need to change the select attribute for figure from .//figure (the 
context relative to the book element) to //figure so the appendix context can 
find the figure elements.



This special appendix will also generate an entry in the main TOC, unless you 
further customize to turn that off or change its appearance.



Bob Stayton

Sagehill Enterprises

b...@sagehill.net



On 4/15/2015 3:11 AM, Eisele, Kai Alexander wrote:

> Hi,

>

> Is there any chance to have lists of figures, tables and examples

> positioned at the end of printed output (PDF documents)?

>

> By default, the listings appear at the beginning of the documents

> right after the actual TOC.

>

> Is it possible to customize a sort of document appendix, that contains

> the lists of figures, tables and examples?

>

> Regards

>

>

> *Kai Alexander Eisele*

> SAP CC

>

> *CENIT AG *

> Industriestraße 52-54

> D-70565 Stuttgart

> Phone:  +49 (0) 711-78 25-3241

> Fax:+49 (0)711 7825 44-4145

>

> k.eis...@cenit.de 

>

> www.cenit.com __

>

>

> CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711

> 7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.de

> Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen,

> Oelsnitz, Ratingen, Saarbruecken

> Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt

> Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des

> Aufsichtsrats), Hubert Leypoldt, Andreas Karrer

> Bankverbindungen:

> Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070

> 0166

> 1040 00 SWIFT-CODE : DEUTDESS,

> Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071

>

[docbook-apps] AW: Graphical admonition in FO: Alignment?

2015-04-17 Thread Kallauch, Benjamin (EEIN)
Dear all,

I made some further tests on the admonition alignment and incidentally 
discovered a strange behavior.

If I made the  inside  the item body visible with a red dotted line, 
the inner block (built through ) is rendered on the bottom of 
its outer block. Here is an example code:


   



As soon as the  is empty and without any graphical content it seems 
to be not considered as rendered block. That's ok, but then the inner content 
(apply-templates) ist rendered differently:


   



Any suggestions, how I can control the behavior? Maybe leave out the  
element, because a block will already be rendered due to apply-templates?

best regards, Ben


Von: Kallauch, Benjamin (EEIN)
Gesendet: Donnerstag, 16. April 2015 11:25
An: docbook-apps@lists.oasis-open.org
Betreff: [docbook-apps] Graphical admonition in FO: Alignment?

Dear all,

I have some difficulties to understand how to align the List Item Graphic with 
the first text line in the list body. In my example (attachment) the list body 
seems to be aligned with the top of the graphic (the graphic has actually no 
surrounding white space around). The background colors and line are set 
manually to see better what's going on. What I need is to align the list body 
text with the middle of the graphic, not the top.

Several tests with the fo-attribute "alignment-baseline" did not bring any 
solution. Here is my current stylesheet code for generating this type of 
admonition:
































Does anyone has a good idea how to control alignment between list item labels 
and their body text?

Thanks, Ben.

[cid:image001.png@01D078EB.885B31F0]



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