OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: dbfo-need PI and invalid FO in FOP


Hi,

after some testing, it seems I found a bug in the FO stylesheets. However, I thought, I
describe the problem so maybe someone can confirm it or correct me. 
I have the following XML:

-----[ list-example.xml ]----
 <chapter lang="en">
   <title>Test-Chapter</title>
   <para>This is an example.</para>
   <procedure>
     <step>
       <para>Do this.</para>
     </step>
     <?dbfo-need height="5em" ?>
     <step>
       <para>Do that.</para>
     </step>
   </procedure>
 </chapter>

When I translate the above XML into FO, I get the following error:

SEVERE: Exception
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: 
file:/local/doc/trunk/books/en/tmp/listexample.fo:3:391: Error(3/391): fo:list-item-label is missing child elements.
Required Content Model: marker* (%block;)+

According to the FO specification, a fo:list-item-label[1] must have at least on element from 
the %block; parameter entity. So FOP rightly complains. :)

After some search, I found the respective lines in fo/pi.xsl. The attached patch file intruduces
a xsl:if to check for the fop1.extensions and inserts an empty fo:block. However, although it
fixes the validation problem in FOP, it creates a space between the first and second step. 
When I move the PI before the </step> tag, the validation error disappears.

Any idea how to solve this?


Thanks,
Tom

-------
[1] http://www.w3.org/TR/xsl/#fo_list-item-body
$ rpm -q docbook-xsl-stylesheets libxml2 libxslt fop
docbook-xsl-stylesheets-1.75.1-6.1
libxml2-2.7.1-9.7.1
libxslt-1.1.24-19.1
fop-0.95-27.1

pi.diff



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]