Hello,

 

You seem to be trying to create a PDF file from your stylesheet which is why
you are getting this error.

 

The typical case is to first transform an XML input file using an XSL
stylesheet to an xsl-fo file. The second step is to transform that xsl-fo
file to pdf. While these are two steps, fop has examples to achieve this in
one step. Take e.g. a look at ExampleXML2PDF.java.

 

Hope this helps,

 

Peter

 

 

 

  _____  

From: Sam Hwang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 03, 2007 10:02 AM
To: fop-users@xmlgraphics.apache.org
Subject: FOP generation error with namespace check

 

Hi all,

I read your I use the demo class ExampleFO2PDF in FOP package to generate a
PDF from an XSL file, but eventually received the following error:

Preparing...

Input: XSL-FO (.\resources\policy_invoice_guangdong.XSL)

Output: PDF (C:\output.pdf)

Transforming...

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser

[INFO] building formatting object tree

[INFO] setting up fonts

[ERROR] Unsupported element encountered: stylesheet (Namespace:
http://www.w3.org/1999/XSL/Transform). Source context: Unknown source (line:
2, col: 125)

[ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.)
or elements from another supported language.

org.apache.fop.apps.FOPException: null:2:125 Root element must be root, not
http://www.w3.org/1999/XSL/Transform:stylesheet

at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:367)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)

at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRoot
ElementHook(Unknown Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.fop.apps.Driver.render(Driver.java:498)

at org.apache.fop.apps.Driver.run(Driver.java:565)

at com.accenture.yoda.fopper.Fopper.convertFO2PDF(Fopper.java:52)

at com.accenture.yoda.fopper.Fopper.main(Fopper.java:86)

 It seems that I need to do something to ignore the namespace checking or to
set up our proxy for the FOP to access the namespace on the internet. But so
far, the proxy I know is in the form of a proxy file, like
http://www.accenture.com/aproxy.proxy, and I was told that we don't have a
SOCKS 5 form of proxy with IP address and port number. So I cannot configure
my JVM with the proxy arugments in this way. Anyone can give me some hints
on this problem? Thank you!

Regards,

Sam Huang

 __________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to