Hi Matthias

On 06.06.2005 10:41:37 Matthias Wessendorf wrote:
> Hi there,
> 
> are there any (unit) tests regarding FOP's standard compilance?

We've started a systematic test suite for FOP 1.0dev development. It's
located here:

http://cvs.apache.org/viewcvs.cgi/xml-fop/test/layoutengine/

Some initial documentation is here:
http://wiki.apache.org/xmlgraphics-fop/HowToCreateLayoutEngineTests

Please note that the checks are specific to the development code for FOP
(CVS HEAD) and do not apply to FOP 0.20.5. However, I frequently
cross-check the results with different FO implementations if only to see
that they fail in many tests that FOP already handles fine. *evil grin*

> I'd like to document the FOP behaivor when it becomes an input file that
> contains a <fo:table/> with NO table-layout="fixed".
> So in my case (not a test case (yet)) I saw a PDF file on my disk (so
> "out.size() > 0" is true ;)), but that guy is empty, since
> FOP isn't able to process that <fo:table/>. Such a test case would be
> fine to create automated test on my development cases.

According to the spec an empty fo:table element is illegal. It has to
contain at least one fo:table-body element.

If you like to help extend the test suite, that would be absolutely great!
Just be aware that it doesn't make sense to document what FOP 0.20.5
doesn't do well since that is already documented quite well in the
compliance document on FOP's website and the maintenance branch has been
frozen. But if there are things that FOP 0.20.5 and (!) FOP 1.0dev fail
to do then it would be good to have test cases if just as a reminder for
things that still need to be done.

Glen Mazza mentioned a couple of months ago, that the W3C working group
for XSL also seeks to create a test suite. Maybe they already have
something. I don't know. The old test suite at least is quite outdated
and wasn't updated to the Recommendation level.

> I am using/evaluating (better testing?) some converters (html2fo and
> css2xslfo) to produce FO files from (x)html files. And that pain I
> would like to automate ;)

I don't know if it helps you in this particular case but I've written a
general Java API for converting XML documents to graphical output
(XSL-FO, SVG, XHTML to PDF, PS, SVG or whatever). I haven't published it
since I renamed the whole beast (now JAXG, formerly JAFOP), but I expect
to do that this month. I already use it to do all my private test code
for FOP. I can send you a snapshot if you're interested. I've got
implementations for FOP 0.20.5, FOP 1.0dev, FOray, JFOR and Batik. Write
once, use whatever implementation you would like, basically. Of course,
the conversion of HTML to XSL-FO is outside the scope of JAXG since it's
a process that happens before the actual conversion of the XML dialect
to the final graphical format. But maybe preprocessors like the above
two could be somehow integrated. I'd have to think about that a little,
though.

> Any ideas? Or perhaps existing test cases ? ;)

In the end I think what you really need is support for auto table layout
which neither FOP 0.20.5 and FOP 1.0dev support, yet. When converting
HTML to PDF this automatically comes up. At some point someone has to
start implementing this feature and it's likely not going to be me since
I'm into strict XSL-FO business document where this was never an issue,
yet.

I hope the above helps.

Jeremias Maerki

Reply via email to