Re: Customizing a DocBook file with a custom xsl-fo file

Hussein Shafie <[email protected]> Mon, 16 May 2022 15:40:55 +0200
Newsgroups gmane.editors.xxe.general
Message-ID <[email protected]>
My answer assumes that your ".xml" document is a DocBook 5 one, not a 
DocBook 4.x one, not a DocBook 5.1 one.


[email protected] wrote:
> I want to customize my DocBook file with a custom xsl-fo file. In my case I want to edit the existing Header and Footer content.
> 
> I created an xsl file and wanted to connect it with my DocBook file, but it doesn´t work.
> 
> Here are the steps to connect:
> 
> 1. [image001.png]
> 
>  
> 
> 2.  [image002.png]
> 
>  
> 
> 3. [image003.png]
> 
>  
> 
> And then when I’m trying to convert the DocBook file to PDF I´m getting such an error report:
> 
>  
> [image004.png]
>  
> 
>  
> 
> I hope you can support me to solve this problem and make it possible for me to customize my DocBook file.


Your screenshots show that you did everything right, moreover the quick, 
simple and easy way. Congratulations!

--> The problem seem to lie in the content of your custom "xsl_fo_test.xsl".

Please send us (privately to mailto:[email protected] if you prefer) 
your "xsl_fo_test.xsl" so we can give you a precise diagnostic and 
hopefully some fixes. <--



Just for the reference, please find attached to this email, a template 
of what could be such custom ".xsl" file.

This template has been created automatically using the "Customize..." 
button. (You have used "Add" which is OK too; difference explained here: 
http://www.xmlmind.com/xmleditor/_distrib/doc/help/ConversionStylesheetsEditor_reference.html) 
It contains:

----
<?xml version="1.0" encoding="UTF-8"?>
<?stylesheet-label Test?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">

   <xsl:import href="docbook5-config:xsl/fo/docbook.xsl"/>

   <!-- REDEFINE PARAMETERS AND ATTRIBUTE-SETS HERE -->

</xsl:stylesheet>
----



--------------
ALTERNATIVELY: If you prefer to do everything "by hand", the reference 
is found here:
"XMLmind XML Editor - Configuration and Deployment, 5. Customizing an 
existing configuration, 10. Customizing the XSLT style sheets used in 
the Convert Document submenu", 
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customize_xslt.html

A template equivalent to attached "docbook_custom.xsl" is referenced in 
this page:
"DocBook v5+, PDF, PostScript, Copy fo.xsl to custom/", 
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/samples/customize/docbook5/fo.xsl


--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
image001.png (image/png, 74.2 KB) - not displayed
image002.png (image/png, 133.2 KB) - not displayed
image003.png (image/png, 24.3 KB) - not displayed
image004.png (image/png, 121.1 KB) - not displayed
docbook_custom.xsl (application/xslt+xml, 356 B) - not displayed