Page 1 of 1

mapref in bookmap PDF fails when using Apache FOP

Posted: Wed Nov 12, 2014 2:38 am
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.

Re: mapref in bookmap PDF fails when using Apache FOP

Posted: Wed Nov 12, 2014 6:27 pm
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.

Re: mapref in bookmap PDF fails when using Apache FOP

Posted: Thu Nov 13, 2014 8:59 pm
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

Re: mapref in bookmap PDF fails when using Apache FOP

Posted: Fri Nov 14, 2014 10:45 am
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.

Re: mapref in bookmap PDF fails when using Apache FOP

Posted: Sat Jul 18, 2015 7:26 pm
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>