Re: DocBook tables not appearing in PDF generated by Fop

2002-04-08 Thread Steinar Bang
 J.Pietschmann [EMAIL PROTECTED]:

 Steinar Bang wrote:
 J.Pietschmann [EMAIL PROTECTED]:

 Furthermore, remove whatever produced the fo:table-and-caption in
 the FO file (probably specifying a title or caption for the table
 in DocBook).

 What's wrong with it?  Is it an illegal FO construct?  Or is it a
 construct unsupported by Fop?

 Not implemented in FOP. I think these tables are not put into the
 output, or at least the caption will be missing.  Try it yourself.

Use of fo:table-and-caption was the reason no tables appeared in the
output. 

I have fixed it, for now, by defining a new template for table, in my
local XSL style sheet for creating FO from DocBook.  This local style
sheet holds my local settings (A4 instead of letter, turn on saxon
extensions etc.).

Attached is the file with the doctored template (It's the table
template from the DocBook XSL fo style sheet, with the
fo:table-and-caption stuff commented out.

Thanx!


- Steinar


?xml version='1.0'?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version='1.0'
xmlns=http://www.w3.org/TR/xhtml1/transitional;
exclude-result-prefixes=#default
xmlns:fo=http://www.w3.org/1999/XSL/Format;

  xsl:import href=http://no-video6/xml/styles/docbook-xsl-1.48/fo/docbook.xsl/
  xsl:import href=local-common.xsl/

  !-- Changes to defaults --
  xsl:param name=paper.type select='A4' /

  xsl:template match=table
xsl:variable name=id
  xsl:call-template name=object.id/
/xsl:variable
xsl:variable name=prop-columns
  select=.//colspec[contains(@colwidth, '*')]/

fo:block
  xsl:attribute name=span
xsl:choose
  xsl:when test=@pgwide=1all/xsl:when
  xsl:otherwisenone/xsl:otherwise
/xsl:choose
  /xsl:attribute

!--
  fo:table-and-caption id={$id}
xsl:use-attribute-sets=formal.object.properties
keep-together.within-column=1
fo:table-caption
--
  fo:block xsl:use-attribute-sets=formal.title.properties
xsl:apply-templates select=. mode=object.title.markup/
  /fo:block
!--
/fo:table-caption
--
fo:table
  xsl:call-template name=table.frame/
  xsl:if test=count($prop-columns) != 0
xsl:attribute name=table-layoutfixed/xsl:attribute
  /xsl:if
  xsl:apply-templates select=tgroup/
/fo:table
!--
  /fo:table-and-caption
--
/fo:block
  /xsl:template


/xsl:stylesheet


Re: DocBook tables not appearing in PDF generated by Fop

2002-04-05 Thread J.Pietschmann
Steinar Bang wrote:
Tables don't appear in PDF generated by Fop on the following two
platforms:
Look closely at the error message:
...
[INFO]: FOP 0.20.3rc
[INFO]: building formatting object tree
[ERROR]: Error in column-width property value '20%': 
org.apache.fop.fo.expr.PropertyException: No conversion defined
FOP currently does not understand percents for determining
the column width. There are also other problems.
Try to make the columns of the tables fixed width. Consult
your docbook manual how to do it (I don't know).
Furthermore, remove whatever produced the fo:table-and-caption
in the FO file (probably specifying a title or caption for
the table in DocBook).
HTH
J.Pietschmann


RE: DocBook tables not appearing in PDF generated by Fop

2002-04-05 Thread David Cramer
 David Cramer wrote:
  I'm pretty sure Dave Pawson has an FAQ about this,
 I don't remember DocBook specific stuff there, but it's
 already a few weeks since i last looked.

In addition to all the other stuff, Dave maintains a docbook faq for the
docbook and docbook-apps lists. Hope it finds a new home soon. 

David