[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] dbfo-need PI and invalid FO in FOP
Hi, Indeed, this is a bug in the stylesheets that should be reported. However, the space problem you see when you correct the bug is due to FOP not supporting dbfo-need, or more precisely, not supporting the XSL-FO feature that dbfo-need uses. The processor must be able to execute a negative value for space-before, and FOP cannot. The stylesheet currently ignores dbfo-need when fop.extensions="1", and now it appears it must also ignore it when fop1.extensions="1". Bob Stayton Sagehill Enterprises bobs@sagehill.net ----- Original Message ----- From: "Thomas Schraitle" <tom_schr@web.de> To: <docbook-apps@lists.oasis-open.org> Sent: Thursday, July 02, 2009 6:48 AM Subject: [docbook-apps] 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 > -------------------------------------------------------------------------------- > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]