Hello
 
I'm trying to convert a XML-file to a PDF-file . Now I'm working in DOS ... but I'm getting a FATAL ERROR.
 
This is what I'm doing ...
 
java -cp c:\jdk1.2.2\lib;c:\jdk1.2.2\bin;C:\fop-0_14_0\lib\w3c.jar;C:\fop-0_14_0\fop_bin_0_14_0.jar;C:\xerces-1_4_3\xerces.jar;c:\xp\xp.jar;c:\xt\xt.jar;c:\xt\sax.jar;c:\xt\dom.jar;
-Dorg.xml.sax.parser=com.jclark.xml.sax.Driver org.apache.fop.apps.XTCommandLine doc1.xml documentPDF.xsl doc.pdf
 
When I try to execute this commando ... I get this ...
 
 
C:\fop-0_14_0\stevends>java -cp c:\jdk1.2.2\lib;c:\jdk1.2.2\bin;C:\fop-0_14_0\li
b\w3c.jar;C:\fop-0_14_0\fop_bin_0_14_0.jar;C:\xerces-1_4_3\xerces.jar;c:\xp\xp.j
ar;c:\xt\xt.jar;c:\xt\sax.jar;c:\xt\dom.jar; -Dorg.xml.sax.parser=com.jclark.xml
.sax.Driver org.apache.fop.apps.XTCommandLine doc1.xml documentPDF.xsl doc.pdf
 
FOP-0_14_0
using SAX parser com.jclark.xml.sax.Driver
using renderer org.apache.fop.render.pdf.PDFRenderer
using element mapping org.apache.fop.fo.StandardElementMapping
org.apache.fop.fo.StandardElementMapping is not an element mapping
FATAL ERROR:
 
I tried it with serveral examples ... but they gave the same problem ?
 
But the XTCommandLine class is only mentioned with FOP-0_13_0.  Running under FOP-0_14_0 ... you should use XalanCommandLine ( see website : http://www.aoindustries.com/docs/fop-0_14_0/running.html )  but then I get this as output ...
 
C:\fop-0_14_0\stevends>java -cp c:\jdk1.2.2\lib;c:\jdk1.2.2\bin;C:\fop-0_14_0\li
b\w3c.jar;C:\fop-0_14_0\fop_bin_0_14_0.jar;C:\xerces-1_4_3\xerces.jar;c:\xp\xp.j
ar;c:\xt\xt.jar;c:\xt\sax.jar;c:\xt\dom.jar; -Dorg.xml.sax.parser=com.jclark.xml
.sax.Driver org.apache.fop.apps.XalanCommandLine doc1.xml documentPDF.xsl doc.pd
f
FOP-0_14_0
using SAX parser com.jclark.xml.sax.Driver com.jclark.xml.sax.Driver is not a SAX driver ERROR: Unable to create SAX parser
 
 
How Can I Solve this problem ???
 
In the attachment I've included the xml and xsl-file .
 
 
 
 
Second question : Do you know a manual or examples of creating a PDF-file using JSP .
 
 
 
Regards
Steven
 
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
	
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
<xsl:template match="document">


	
	<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
		<fo:layout-master-set>
		<fo:simple-page-master
			page-master-name="right"
			margin-top="75pt"
			margin-bottom="25pt"
			margin-left="100pt"
			margin-right="50pt">
			<fo:region-body margin-bottom="50pt" />
			<fo:region-after extent="25pt"/>
		</fo:simple-page-master>
		<fo:simple-page-master
			page-master-name="left"
			margin-top="75pt"
			margin-bottom="25pt"
			margin-left="50pt"
			margin-right="100pt">
			<fo:region-body margin-bottom="50pt" />
			<fo:region-after extent="25pt"/>
		</fo:simple-page-master>
		</fo:layout-master-set>
		
		<fo:page-sequence>
			<fo:sequence-specification>
				<fo:sequence-specifier-alternating
				page-master-first="right"
				page-master-odd="right"
				page-master-even="left"/>
			</fo:sequence-specification>
			
			<fo:static-content flow-name="xsl-after">
				<fo:block text-align-last="centered"
				font-size="10pt">
					<fo:page-number/>
				</fo:block>
			</fo:static-content>
			
			<fo:flow>
				<xsl:apply-templates/>
			</fo:flow>
		</fo:page-sequence>
	</fo:root>
</xsl:template>

<xsl:template match="document/title">
	<fo:block font-size="36pt" text-align-last="centered"
		space-before.optimum="24pt">
		<xsl:apply-templates/>
	</fo:block>
</xsl:template>

<xsl:template match="para">
	<fo:block font-size="12pt" text-align="left"
		space-before.optimum="18pt">
		<xsl:apply-templates/>
	</fo:block>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="documentPDF.xsl"?>
<?cocoon-process type="xslt"?>
<document>
<bodycolor>#ffeedd</bodycolor>
<title>What XML means to me.</title>
<author>Anthony Ikeda</author>
<para>Welcome to the first [or second] testing of xml docs.</para>
<para>Hopefully it will test to see if the Explorer 5.5 program on this PC
is functioning properly.</para>
<para>XML seems to be the next greatest technology that I will be working
with. For me that is a great honour (well
maybe not an honour but it's going to be fun).</para>
<para>So far getting used to this new language has been a bit strange as the
 syntax is very different to what I normally use</para>
 <para>But I'm sure as I make use of it, my skills will improve and 
 perhaps I'll develop great web applications with my new skills.</para>
<para>Well it seems the XML to HTML conversion is successful. Next I would
like to try 
creating PDF documents...
</para>
</document>

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

Reply via email to