Page 1 of 1

Validation errors in FO files

Posted: Fri Jan 25, 2013 6:47 pm
by reinierk
Why do I get 5165 validation errors when I try to validate a DITA-OT generated FO file? I complains about the silliest of things that I know are allowed.
I tried it with a validation: "Use detected" and with schema: ${frameworks}/fo/xsd/fo.xsd

Is the schema correct?

Oxygen 14.1 on Linux CentOS 6.3

Re: Validation errors in FO files

Posted: Mon Jan 28, 2013 9:47 am
by Radu
Hi Reinier,

The problem with XSL-FO is that there is no tool which can fully and properly validate it. An XML Schema cannot specify all constraints which are in an XSL-FO output file and there is no official XML Schema for validating XSL-FO output. Besides this, some XSL-FO processors like RenderX XEP have their own extensions to the standard. The best validation for me is to process the XSL-FO to PDF and thus let the processor issue warnings and errors as they are encountered.
I tried it with a validation: "Use detected" and with schema: ${frameworks}/fo/xsd/fo.xsd
This is exactly the default schema used by Oxygen for XSL-FO validation, so it was not necessary for you to specify it manually. We derived it from an XML Schema initially developed by RenderX XEP.

I see that RenderX proposed a Relax NG Compact schema as well as a stylesheet for validation:

http://www.renderx.com/tools/validators.html

So you could try those approaches as well, we'll see what we can do on our side to improve XSL-FO validation.

Regards,
Radu

Re: Validation errors in FO files

Posted: Mon Jan 28, 2013 10:00 am
by Radu
Forgot to ask you one thing, could you give us a precise example of a case in which the validation reports false problems?

Regards,
Radu

Re: Validation errors in FO files

Posted: Mon Jan 28, 2013 4:35 pm
by reinierk
The reason I wanted this is to check the output of RenderX xep. It complains about "WARNING: Bad attribute start-indent: Cannot add type Length to type Word". So somewhere I have an attribute wrong. But because xep does not report an input line number and character position you are left completely in the dark....
I will try the RenderX schema, see if that works. I have put the stage3.fo file up on:http://www.OpenSourceAcademy.eu/fileadmin/stage3.fo.gz

Do you see which element has the incorrect attribute start-indent?

Re: Validation errors in FO files

Posted: Mon Jan 28, 2013 4:48 pm
by Radu
Hi Reinier,

You are not the only one with this problem:

https://github.com/dita-ot/dita-ot/issues/1421

And this is a similar issue I added a while ago:

https://github.com/dita-ot/dita-ot/issues/1280

The DITA OT stylesheets specify a value in the XSL-FO which although valid according to the specs is not supported by XEP. But the fallback does not seem to break the PDF layout in any way.

Regards,
Radu

Re: Validation errors in FO files

Posted: Tue Jan 29, 2013 1:50 pm
by reinierk
Yes same here: The PDF looks just fine. But just to prevent "silly" errors from obscuring real ones it is better to loose them by "correcting" the stylesheet.
When are those renderx guys going to improve their error messages... I also asked them to do that. Let wait and see.