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


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">
   <para>This is an example.</para>
       <para>Do this.</para>
     <?dbfo-need height="5em" ?>
       <para>Do that.</para>

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?


[1] http://www.w3.org/TR/xsl/#fo_list-item-body
$ rpm -q docbook-xsl-stylesheets libxml2 libxslt fop


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