This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Can FOP output pdf file from XML with XSL
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] Can FOP output pdf file from XML with XSL
- From: Ser Siew Keok <SKSer at sg dot alpnet dot com>
- Date: Tue, 4 Sep 2001 09:42:15 +0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi there,
Did anyone come across about the FOP error as below?
line 3; column 125; ERROR :null
I have tried this command line : Fop -xsl filename.xsl -xml
filename.xml -pdf filename.pdf
but the error was shown as above.
These xml and xsl file work fine with other tools like Saxon (for
output .fo file) and using XEP to create perfect PDF also.
Hope someone can help me. If my xsl file have problem (see below xsl
file), wonder why it has no problem with Saxon.
Thanks a lot
siew keok
------------------------------------ the 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:output method="xml" version="1.0" indent="yes" />
<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 >
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list