17 Jun 16:56
Re: xhtml2fo.xsl working with FOP ?
Alexis HAUMONT <alexis.haumont <at> smile.fr>
2002-06-17 14:56:23 GMT
2002-06-17 14:56:23 GMT
Hi,
thanks for you're
I've got several problems regarding html <table> :
Fop seems requires the definition of each column width whereas my
xhtml2fo.xsl doesn't :
Here's my test xhtml fragment :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body>
<table border="1" width="100%" cellspacing="2" cellpadding="1">
<tr>
<td height="10" width="25%"> <p align="left">sdf</p> </td>
<td height="10" width="25%"> <p align="left"> </p> </td>
<td height="10" width="25%"> <p align="left">sdf</p> </td>
<td height="10" width="25%"> <p align="left"> </p> </td>
</tr>
</body>
</html>
Xslt transformation with
[http://www.antennahouse.com/sample1/xhtml2fo/Xhtml2fo.xsl] give me this
.fo :
../..
<fo:flow flow-name="xsl-region-body">
<fo:table-and-caption>
<fo:table width="100%" border-style="1">
<fo:table-body>
<fo:table-row>
<fo:table-cell border-style="solid" border-width="1pt"
padding-start="0.3em" padding-end="2pt" padding-before="2pt"
number-columns-spanned="1" number-rows-spanned="1">
<fo:block> <fo:block text-align="justify" text-indent="1em"
space-before="0.6em" space-after="0.6em">sdf</fo:block> </fo:block>
</fo:table-cell>
../..
which rendered in PDF as.. a blank page.
the <fo:table-column column-width="??"/> are missing.. and FOP doesn't
render anything.
I'm modyfiing the Xslt stylesheet, but I was wondering if someone has
already achieve that job... as FOP doesn't implements table-width
calculation, I guess I'm gone have to compute something for theese
column-width.
say, for the given xhtlk fragment above : column-width = 25% *
table <at> width * page-master <at> page-width ??
or is there some kind of relative column-witdh attribute I may use with
FOP ?
Did you face the same problem ?
Thanks
Alex
Oleg Tkachenko wrote:
> Alexis HAUMONT wrote:
>
>> I want to convert a document containing some XHTML tags to PDF, using
>> an xslt transformation.
>> I've seen several post on the mailing list archive with the same
>> question, few response, and the only stylesheet
>> everyone seems to point to (http://www.antennahouse.com) does not
>> work with xml-FOP, at least not
>> with my very simple XHTML test file containing a simple <table>.
>
> What exactly is the problem?
>
>> Has somenone already succeed in producing a valid xsl:fo file using
>> such a stylesheet ?
>
> I was using that stylesheet sometime ago and I found it rather
> sketchy, so I had to customize it to get support for html's
> frame/rules, cellspacing etc stuff. Anyway it worked exept of
> unsupported by fop objects.
>
RSS Feed