Error in transform.fo2pdf.fop by using a customized pdf plugin

315 views
Skip to first unread message

Marine Martin-Guillerez

unread,
Oct 8, 2015, 5:50:56 AM10/8/15
to DITA-OT Users
Hello,

I have just installed the lastest release of DITA-OT (2.1.1). Before, I worked with DITA-OT 1.5.4.
After this installation and modified my customized files in org.dita.pdf2 plugins (it works well for me), I tried to install a new pdf plugin (I need to have 2 differents pdf output).

If follow, step by step, the process to create a customized pdf plugin explained here : http://www.dita-ot.org/2.1/user-guide/dita2pdf-customization.html.

my plugin is named : com.quality.ddt-pdf

Then, I launch the intergator process. And here are the result of the integration :

Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Buildfile: [path]\DITA-OT2.1.1\integrator.xml
Detected Java version: 1.8 in: C:\Program Files\Java\jdk1.8.0_60\jre
Detected OS: Windows 7
parsing buildfile [path]\DITA-OT2.1.1\integrator.xml with URI = file:/[path]/DITA-OT2.1.1/integrator.xml
Project base dir set to: [path]\DITA-OT2.1.1
parsing buildfile jar:file:/[path]/DITA-OT2.1.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/[path]/DITA-OT2.1.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `strict' is [strict]
Complete build sequence is [strict, install.move, uninstall, uninstall.delete, install.init, install.local, install.download, install, integrate, lax,
 ]

strict:
Project base dir set to: [path]\DITA-OT2.1.1
  [antcall] calling target(s) [integrate] in build file [path]\DITA-OT2.1.1\integrator.xml
parsing buildfile [path]\DITA-OT2.1.1\integrator.xml with URI = file:/D:/SVN_WC/DITA/98-Ext/DITA-OT2.1.1/integrator.xml
Project base dir set to: [path]\DITA-OT2.1.1
Override ignored for property "ant.file.dita.integrator.dir"
Build sequence for target(s) `integrate' is [integrate]
Complete build sequence is [integrate, install.move, uninstall, uninstall.delete, install.init, install.local, install.download, install, lax, strict,
 ]
  [antcall] Entering [path]\DITA-OT2.1.1\integrator.xml...
Build sequence for target(s) `integrate' is [integrate]
Complete build sequence is [integrate, install.move, uninstall, uninstall.delete, install.init, install.local, install.download, install, lax, strict,
 ]

integrate:
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.htmlhelp\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\com.sophos.tocjs\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.eclipsecontent\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.docbook\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.troff\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.eclipsehelp\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.odt\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\com.quality.ddt-pdf\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.xhtml\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.javahelp\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.specialization.eclipsemap\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.wordrtf\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.oasis-open.dita.v1_2\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.base\plugin.xml
[integrate] Read plug-in configuration [path]\DITA-OT2.1.1\plugins\org.dita.specialization.dita11\plugin.xml
[integrate] Writing [path]\DITA-OT2.1.1\resources\plugins.xml
[integrate] Process template [path]\DITA-OT2.1.1\xsl\preprocess\mapref_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.htmlhelp\xsl\map2hhc_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\xsl\common\strings_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.troff\xsl\dita2troff-step2-shell_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\catalog-dita_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\xsl\preprocess\flag_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\xsl\preprocess\mappull_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\xsl\preprocess\maplink_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.odt\xsl\dita2odt_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\xsl\preprocess\conref_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.troff\xsl\dita2troff-ast-shell_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.eclipsecontent\xsl\dita2dynamicdita_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_xep_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.xhtml\xsl\dita2html-base_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.eclipsehelp\build_dita2eclipsehelp_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\xsl\common\allstrings_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\cfg\catalog_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.xhtml\build_dita2xhtml_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\build_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\xsl\preprocess\topicpull_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.eclipsehelp\xsl\map2plugin_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.base\build_preprocess_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.wordrtf\xsl\dita2rtf_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.xhtml\xsl\map2html-coverImpl_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_fop_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\build_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.htmlhelp\xsl\map2hhp_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.docbook\xsl\dita2docbook_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.xhtml\xsl\map2htmltoc_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\xsl\common\topicmerge_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.xhtml\build_general_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_axf_template.xsl
[integrate] Process template [path]\DITA-OT2.1.1\resources\messages_template.xml
[integrate] Process template [path]\DITA-OT2.1.1\plugins\org.dita.eclipsehelp\xsl\map2eclipse_template.xsl
[integrate] Generate configuration properties [path]\DITA-OT2.1.1\lib\org.dita.dost.platform\plugin.properties
[integrate] Generate environment shell [path]\DITA-OT2.1.1\resources\env.sh
[integrate] Generate environment batch [path]\DITA-OT2.1.1\resources\env.bat
      [jar] messages.xml added as messages.xml is outdated.
      [jar] plugins.xml added as plugins.xml is outdated.
      [jar] No sources found.
      [jar] Building jar: [path]\DITA-OT2.1.1\lib\dost-configuration.jar
      [jar] adding directory META-INF/
      [jar] adding entry META-INF/MANIFEST.MF
      [jar] adding entry messages.xml
      [jar] adding entry plugins.xml
      [jar] adding entry configuration.properties
      [jar] adding directory org.dita.dost.platform/
      [jar] adding entry org.dita.dost.platform/plugin.properties
      [jar] No Implementation-Title set.No Implementation-Version set.No Implementation-Vendor set.
      [jar] Location: [path]\DITA-OT2.1.1\integrator.xml:46:
  [antcall] Exiting [path]\DITA-OT2.1.1\integrator.xml.

BUILD SUCCESSFUL
Total time: 0 seconds

My plugin is well integrate and I found it in the file [path]\DITA-OT2.1.1\resources\plugins.xml.

Then, I launch my build command and I had the following error :
[...]
transform.fo2pdf.fop:
      [fop] oct. 08, 2015 11:27:31 AM org.apache.fop.apps.FopFactoryConfigurator configure
      [fop] INFOS: Default page-height set to: 11in
      [fop] oct. 08, 2015 11:27:31 AM org.apache.fop.apps.FopFactoryConfigurator configure
      [fop] INFOS: Default page-width set to: 8.26in
      [fop] [ERROR] Anttask - Error rendering fo file: [path]\Output\temp\topic.fo <org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: The flow-name "even-frontmatter-footer" on fo:static-content could not be mapped to a region-name in the layout-master-set. (See position 1:-1)
      [fop] net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: The flow-name "even-frontmatter-footer" on fo:static-content could not be mapped to a region-name in the layout-master-set. (See position 1:-1)>org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: The flow-name "even-frontmatter-footer" on fo:static-content could not be mapped to a region-name in the layout-master-set. (See position 1:-1)
      [fop] net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: The flow-name "even-frontmatter-footer" on fo:static-content could not be mapped to a region-name in the layout-master-set. (See position 1:-1)
[...]

And when I use the standard pdf plugin, it works well and I have my pdf.
With DITA-OT 1.5.4 I had no trouble with my customized plugin.

Have you any idea to solve this problem ?

Thanks for your help and my apologizes for all my english errors.

Marine

Radu Coravu

unread,
Oct 8, 2015, 6:48:55 AM10/8/15
to Marine Martin-Guillerez, DITA-OT Users
Dear Marine,

Looking in both DITA OT 1.8.5 and 2.1.2, the XSLT template:

DITA-OT/plugins/org.dita.pdf2/cfg/fo/layout-masters.xsl
defines that "even-frontmatter-footer" region name that the publishing 
complains about only if the PDF is set as having mirrored page margins:

    <xsl:if test="$mirror-page-margins">
      <fo:simple-page-master master-name="front-matter-even" xsl:use-attribute-sets="simple-page-master">
        <fo:region-body xsl:use-attribute-sets="region-body__frontmatter.even"/>
        <fo:region-before region-name="even-frontmatter-header" xsl:use-attribute-sets="region-before"/>
        <fo:region-after region-name="even-frontmatter-footer" xsl:use-attribute-sets="region-after"/>
      </fo:simple-page-master>
    </xsl:if>
and in the XSLT:

DITA-OT/plugins/org.dita.pdf2/cfg/fo/attrs/basic-settings.xsl
the mirror-page-margins is set to false() by default:

<xsl:variable name="mirror-page-margins" select="false()"/>
So you need to probably look in similar places in the DITA OT 1.5 
distribution and see what changed there.

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marine Martin-Guillerez

unread,
Oct 8, 2015, 9:46:38 AM10/8/15
to DITA-OT Users, marinemart...@gmail.com
But in my new plugin, I have no layout-masters.xsl.

In my plugin directory, I only have :
com.quality.ddt-pdf/
  cfg/
    common/
      vars/
        en.xml
    fo/
      attrs/
        custom.xsl
      xsl/
        custom.xsl
    catalog.xml
  integrator.xml
  plugin.xml

And, with the layout-master.xsl I had in my customized folder for org.dita.pdf2 I don't have any error while I build my PDF.

And even if I try to modify the layout-master.xsl in my customized folder for org.dita.pdf2, I still have the same error with my new plugin.
So I don't where I'm wrong.

Thanks for your help.

Marine

Marine Martin-Guillerez

unread,
Oct 9, 2015, 12:22:03 PM10/9/15
to DITA-OT Users, marinemart...@gmail.com
Hello,

I found how resolve my problem and you give me help by talking to me of the layout-masters.xsl.
I had another layout-masters in DITA-OT/plugins/org.dita.pdf2/Customized/cfg/fo/

And my DITA-OT/plugins/org.dita.pdf2/Customized/cfg/fo/attrs/custom.xsl ask for this layout-masters.xsl and generate errors with my plugins.

So, I delete the DITA-OT/plugins/org.dita.pdf2/Customized/cfg/fo/layout-masters.xsl
I modify the links for the layout-masters in my DITA-OT/plugins/org.dita.pdf2/Customized/cfg/fo/attrs/custom.xsl

I reported all my modifications in the DITA-OT/plugins/org.dita.pdf2/cfg/fo/layout-masters.xsl and I delete all condition <xsl:if test="$mirror-page-margins">.

And it works. I could build my PDF document either with plugin pdf2, either with my own plugin.

Thanks for your helps, you shown my the way to resolve my errors.


Marine

Le jeudi 8 octobre 2015 12:48:55 UTC+2, Radu Coravu a écrit :

Radu Coravu

unread,
Oct 12, 2015, 1:25:40 AM10/12/15
to Marine Martin-Guillerez, DITA-OT Users
Hi Marine,

I'm glad you found a solution for your problem.

As a side note, in my opinion the proper way to use a PDF customization folder is to copy the folder outside of the DITA OT directory. Also you should overwrite only the templates that you want to change, and not add in the customization folder the entire set of XSLT stylesheets from the main plugin PDF folder:

https://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/dita_pdf_output_customization.html

Regards,
Radu
Reply all
Reply to author
Forward
0 new messages