[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Can FOP output pdf file from XML with XSL

Subject: Can FOP output pdf file from XML with XSL
From: Ser Siew Keok <SKSer@xxxxxxxxxxxxx>
Date: Tue, 4 Sep 2001 09:42:15 +0800
xsl output pdf
	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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.