Hi,

I tried to run the script with a command line. I used ExampleXML2PDF.class.

/usr/j2sdk1.4.2_04/bin/java -classpath /home/test/lib/fop.jar:/home/test/lib/xalan-2.7.0.jar: /home/test/lib/xercesImpl-2.7.1.jar:/home/test/lib/avalon-framework-4.2.0.jar: /home/test/lib/batik-all-1.6.jar:/home/test/lib/serializer-2.7.0.jar: /home/test/lib/activation.jar:/home/test/lib/commons-io-1.2.jar:xmlgraphics-commons-1.1.jar: /home/test/lib/sax.jar:/home/test/lib/xml-apis-1.3.04.jar: /home/test/lib/xml-apis-1.3.04-ext.jar: /home/test/ embedding.ExampleXML2PDF

I have got the following message :

Preparing...
Input: XML (/home/test/xsl/test.xml)
Stylesheet: /home/test/xsl/test.xsl
Output: PDF (/home/test/out/ResultXML2PDF.pdf)

Transforming...
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Error(Unknown location): For fo:simple-page-master, only one fo:region-body may be declared. at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
       at embedding.ExampleXML2PDF.main(ExampleXML2PDF.java:98)
Caused by: org.apache.fop.fo.ValidationException: Error(Unknown location): For fo:simple-page-master, only one fo:region-body may be declared. at org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.java:870) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:954) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:308) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716)
       ... 9 more
---------
org.apache.fop.fo.ValidationException: Error(Unknown location): For fo:simple-page-master, only one fo:region-body may be declared. at org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.java:870) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:954) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:308) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
       at embedding.ExampleXML2PDF.main(ExampleXML2PDF.java:98)
---------
org.apache.fop.fo.ValidationException: Error(Unknown location): For fo:simple-page-master, only one fo:region-body may be declared.
       at org.apache.fop.fo.FONode.tooManyNodesError(FONode.java:350)
at org.apache.fop.fo.pagination.SimplePageMaster.validateChildNode(SimplePageMaster.java:123) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:303) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185) at org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.java:860) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:954) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:308) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
       at embedding.ExampleXML2PDF.main(ExampleXML2PDF.java:98)


Jeremias Maerki a écrit :
If you haven't done so already, run only the XSLT transformation outside
your application (on the command-line) and inspect the generated FO file.
You may also need to verify that you're using the same XSLT processor in
both environments.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to