Page 1 of 1
xsd or DTD validation fro for FOP 0.93
Posted: Wed Mar 17, 2010 5:39 pm
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.
Re: xsd or DTD validation fro for FOP 0.93
Posted: Wed Mar 17, 2010 6:14 pm
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
Re: xsd or DTD validation fro for FOP 0.93
Posted: Wed Mar 17, 2010 6:39 pm
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
Re: xsd or DTD validation fro for FOP 0.93
Posted: Thu Mar 18, 2010 12:05 pm
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.
Re: xsd or DTD validation fro for FOP 0.93
Posted: Thu Mar 18, 2010 12:36 pm
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