xsd or DTD validation fro for FOP 0.93

Here should go questions about transforming XML with XSLT and FOP.
duveit
Posts: 4
Joined: Wed Mar 17, 2010 5:10 pm

xsd or DTD validation fro for FOP 0.93

Post by duveit »

To make it short, what do the namespaces for a FOP 0.93 FO-xml file look like?

Mine is currently

Code: Select all

<fo:root xmlns:ddi="http://www.icpsr.umich.edu/DDI" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:doc="http://www.icpsr.umich.edu/doc"
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions" xmlns:math="http://exslt.org/math"
xmlns:n1="http://www.icpsr.umich.edu/DDI"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema">
Which is from the FOP 0.20.5 era.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: xsd or DTD validation fro for FOP 0.93

Post by adrian »

Hello,

I don't think they changed:

Code: Select all

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
http://xmlgraphics.apache.org/fop/0.95/extensions.html

But I see that you have there a lot of other namespaces, not sure about these...

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: xsd or DTD validation fro for FOP 0.93

Post by Radu »

Hi,

Apache FOP 0.93 (the latest is in fact 0.95) is just a FO processing tool and just like Apache FOP 0.20.5 applies to XSL-FO 1.1 files. The newer Apache FOP versions just implements more of the XSL-FO standard than the predecessors.

But:
Apache FOP also defines some extension namespaces like:

Code: Select all

xmlns:fox="http://xml.apache.org/fop/extensions"


An example of incompatibility:
One of the place where these extensions were used by the older Apache FOPs was to describe the table of contents for the generated PDF file (using fox:outline elements).

As the new Apache FOP versions (0.95 for sure) support the fo:bookmark-tree tags to define the table of contents the old fox:outline constructs need to be translated to fo:bookmark-tree constructs.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
duveit
Posts: 4
Joined: Wed Mar 17, 2010 5:10 pm

Re: xsd or DTD validation fro for FOP 0.93

Post by duveit »

Thanks, Radu, the fox:outline to bookmark is the issue here, as I cant seem to validate my FOP xml with the bookmark-tree + bookmarks.
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: xsd or DTD validation fro for FOP 0.93

Post by Radu »

Hi,

There is no official XML Schema used to validate XSL-FO as it is not yet an official standard.
For example the XML Schema Oxygen uses to validate XSL-FO reports fo:bookmark-tree as invalid although the XSL-FO specifications regards it as valid. Under these circumstances the FO processor is the real validator in this case and if it can transform the FO file without warnings, then the FO file is valid.

I'm adding a link to a FO file created by the Docbook framework which specifies the Table of Contents using fo:bookmark-tree and is transformed correctly to PDF by Apache FOP 0.95:
http://www.oxygenxml.com/forum/files/sample.fo

Maybe it will help you see where the element needs to be included if you are generating FO using a custom XSLT stylesheet.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply