Page 1 of 1

Problem creating FO

Posted: Wed Mar 05, 2008 8:45 pm
by elel33
I am creating the following transformation scenario:

XSLT tab

xml url: ${currentFileURL}
check box - use "xsl-stylesheet" declaration
saxon 6.5

FO tab

check box - perform fo processing
input - xslt result
method = pdf
processor - built in apache FOP

Output tab

Prompt for file
Open in browser
Saved file

Validation error: First element must be the fo:root formatting object. Found (Namespace URI: "" Local name: "html")instead> Please make sure you are producing a valid XSL-FO object.

I seem to be skipping the FO creation.
Any idea how to change scenario to work?

Thank you,
Lynn

Re: Problem creating FO

Posted: Thu Mar 06, 2008 4:21 pm
by sorin_ristache
Hello,

The XSLT stylesheet specified in the xsl-stylesheet instruction in the current XML document generates HTML output. If you want to apply a FO processing step to the output of the stylesheet then this output must be a valid XSL-FO document, not a HTML one. The error message is generated by the FO processor that tries to process the stylesheet output. The error message says that the root element of the output of the stylesheet is <html> instead of <fo:root>.

Usually the xsl-stylesheet instruction is used for generating HTML output from the XML document directly in the browser where this output is viewed. If you want to generate also XSL-FO output from the same XML document you need a different stylesheet which you can specify in the XSL URL field of the transformation scenario. In this case you should disable the checkbox Use "xml-stylesheet" declaration.


Regards,
Sorin

Re: Problem creating FO

Posted: Thu Mar 06, 2008 6:28 pm
by elel33
Sorin,

Thanks (again) for the response.

Now I am in need of an XSL-FO stylesheet.
Does Oxygen come with one by any (hopeful) chance?

Lynn

Re: Problem creating FO

Posted: Thu Mar 06, 2008 7:03 pm
by sorin_ristache
Hello,

The XSL-FO stylesheet depends on your XML document. oXygen comes with XSL-FO stylesheets for DocBook XML documents and TEI XML documents. These stylesheets are already set in the predefined scenarios for the DocBook to PDF and TEI to PDF transformations. If you have other type of XML documents you have to develop the stylesheet yourself or use a stylesheet already developed by other people. You did not specify what is your type of XML documents.


Regards,
Sorin