Try running your XSL through Xalan first:
java org.apache.xalan.xslt.Process -IN AccessoriesXML.xml -XSL sample.xsl
-OUT access.fo
If that doesn't work, it's a problem with your XSL. If it does, then let us
know your FOP, Xerces, and Xalan versions.
-Steve
-----Original Message-----
From: Ser Siew Keok [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 11:36 PM
To: [EMAIL PROTECTED]
Subject: FOP null error even.
Hi
I have encounter problem with produce PDF file from xml and xsl.
Below is my command line:
----
Fop -xsl sample.xsl -xml AccessoriesXML.xml -PDF access.pdf
----
Error message" null"
But my FOP can generate PDF file from fo file format follow this
command line:
---
Fop access.fo access.pdf
---
----------------below is my xsl file------
<?xml version="1.0" encoding="UTF-16" ?>
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="paper-width" >210mm</xsl:param>
<xsl:param name="paper-height">297mm</xsl:param>
<!-- Content Transform-->
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master margin="20mm 20mm 20mm 20mm"
master-name="PageMaster">
<xsl:attribute name="page-height">
<xsl:value-of select="$paper-height"/>
</xsl:attribute>
<xsl:attribute name="page-width">
<xsl:value-of select="$paper-width"/>
</xsl:attribute>
<fo:region-body margin="0mm 0mm 0mm 0mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="PageMaster">
<fo:flow flow-name="xsl-region-body" >
<xsl:apply-templates />
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="accessory">
<fo:block border-style="solid" border-width="thin" padding="1em">
<fo:block>Accessory</fo:block>
<xsl:apply-templates />
</fo:block>
</xsl:template>
<xsl:template match="name">
<fo:block>
<fo:inline font-weight="bold">name : </fo:inline>
<xsl:apply-templates />
</fo:block>
</xsl:template>
<xsl:template match="price">
<fo:block>
<fo:inline font-weight="bold">price : </fo:inline>
<xsl:apply-templates />
</fo:block>
</xsl:template>
<xsl:template match="description">
<fo:block>
<fo:inline font-weight="bold">description : </fo:inline>
<xsl:apply-templates />
</fo:block>
</xsl:template>
</xsl:stylesheet >
------------------------------------------
My question:
1. Can FOP generate pdf directly from XML with XSL (fo element) ?
2. Can FOP generate html directly from XML with XSL (html element) ?
3. After Unzip the FOP, there is no installer to install. Do I need
to copy certain files into Java folder or do setting on class path (in java
command)? What I do, is copy all file in the FOP folder after extracting
into working folder, and create a commmand shortcut and run from it.
4. Can FOP support CJK languages as well as true type font
(embbeded) ?
Thanks a lot.
Regards
siew keok
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]