Alexis HAUMONT | 17 Jun 14:54
Favicon

xhtml2fo.xsl working with FOP ?

Hi all,

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>.

Has somenone already succeed in producing a valid xsl:fo file using such 
a stylesheet ?

Thanks in advance.
Alex.

Oleg Tkachenko | 17 Jun 16:53

Re: xhtml2fo.xsl working with FOP ?

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.

--

-- 
Oleg Tkachenko
Multiconn International Ltd, Israel

Alexis HAUMONT | 17 Jun 16:56
Favicon

Re: xhtml2fo.xsl working with FOP ?

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">&nbsp;</p> </td>
    <td height="10" width="25%"> <p align="left">sdf</p> </td>
    <td height="10" width="25%"> <p align="left">&nbsp;</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">
(Continue reading)

J.Pietschmann | 17 Jun 23:26

Re: xhtml2fo.xsl working with FOP ?

Alexis HAUMONT wrote:
> <fo:flow flow-name="xsl-region-body">
> <fo:table-and-caption>

fo:table-and-caption is not implemented in FOP. The whole
content is silently dropped.

J.Pietschmann

Alexis HAUMONT | 18 Jun 08:59
Favicon

Re: xhtml2fo.xsl working with FOP ?


> Alexis HAUMONT wrote:
>
>> <fo:flow flow-name="xsl-region-body">
>> <fo:table-and-caption>
>
>
> fo:table-and-caption is not implemented in FOP. The whole
> content is silently dropped.
>
> J.Pietschmann
>
Thanks for that information.
I should have read this : http://xml.apache.org/fop/implemented.html
I guess every tag that doesn't appear in this list is silently ignored.

I'm going to tune the Xhtml2Fo.xsl from antennahouse to work with FOP, 
I'll post that to the List once done.
My project uses an online wysiwig xhtml editor (EditOnPro) and the 
result must be merge with some Xml content extracted from a database to 
produce a digitally signed PDF, I hope once that everything would have 
been so easy.. and its almost.. I just have to tune that stylesheet.

Alex.


Gmane