mapref in bookmap PDF fails when using Apache FOP

Post here questions and problems related to editing and publishing DITA content.
rfitzger
Posts: 3
Joined: Wed Apr 27, 2011 4:35 pm

mapref in bookmap PDF fails when using Apache FOP

Post by rfitzger »

Hi,

Does Apache FOP support the mapref element?

We have a bookmap that references another map. For example:

<chapter href="rut1398287544909.xml">
<mapref format="ditamap" href="rut1403546461797.ditamap"/>
</chapter>

When using the "out-of-the-box" DITA Map PDF transform (which uses the Apache FOP), the transform fails:

"fo:page-sequence" is not a valid child of "fo:block"!

I tried changing it to use topicref instead of mapref, as follows, but it still fails:

<chapter href="rut1398287544909.xml">
<topicref format="ditamap" href="rut1403546461797.ditamap"/>
</chapter>

When I comment out the mapref, the PDF builds with Apache FOP.

I have created a very simple map and referenced it in the map just to see if it as something in the referenced map that was causing it to fail, and it still failed.

This PDF builds when using the XEP or Antenna House as the FOP.

I am using Oxygen 16.1, but also tried with Oxygen 14.1. It fails in both versions, although 14.1 said it was successful but no PDF was generated.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: mapref in bookmap PDF fails when using Apache FOP

Post by sorin_ristache »

Hi,

First run the action called Validate and Check for Completeness on the DITA map that is transformed to PDF. This action is available on the toolbar of the DITA Maps Manager view. If there are validation errors please fix these errors before running the PDF transformation. If after that you still get the PDF transformation error please send us a sample DITA map for reproducing the error and all DITA topics included in the sample map.
Regards,
Sorin

<oXygen/> XML Editor Support
rfitzger
Posts: 3
Joined: Wed Apr 27, 2011 4:35 pm

Re: mapref in bookmap PDF fails when using Apache FOP

Post by rfitzger »

Hi,

The only way I could get Apache FOP to build a PDF for this map was to use this syntax for referencing maps:

<chapter href="rut1403546461797.ditamap" format="ditamap"/>

When I have some time, I will put together a small set of sample maps to send you. The one I am working with is too large.

Rhonda
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: mapref in bookmap PDF fails when using Apache FOP

Post by sorin_ristache »

Hi,

It is possible that a bug in the DITA-OT transformation creates an invalid FO file when mapref is used but we need some sample files for reproducing the error. Thank you for letting us know about the workaround that you found.
Regards,
Sorin

<oXygen/> XML Editor Support
imok
Posts: 1
Joined: Sat Jul 18, 2015 6:52 pm

Re: mapref in bookmap PDF fails when using Apache FOP

Post by imok »

Thank you Rhonda!

In case anyone is looking for a sample, here's mine:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<!-- myGuide.ditamap -->
<bookmap>
<booktitle>
<mainbooktitle>My Guide</mainbooktitle>
</booktitle>
<bookmeta>
<bookrights>
<copyrfirst>
<year>2014</year>
</copyrfirst>
<copyrlast>
<year>2015</year>
</copyrlast>
<bookowner name="Joe Example">
<organization>Joe Example Company</organization>
</bookowner>
</bookrights>
</bookmeta>
<frontmatter>
<notices href="concept/copyrightPage.dita"/>
<booklists>
<toc format="dita"/>
</booklists>
</frontmatter>
<chapter href="myGuide_keydefs.ditamap" format="ditamap" processing-role="resource-only"/>
<chapter href="concept/onePage.dita"/>
</bookmap>
Post Reply