Problem creating FO
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 5
- Joined: Thu Jan 24, 2008 8:29 pm
Problem creating FO
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
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
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Problem creating FO
Post 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
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
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Problem creating FO
Post 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
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
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service