You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Richard Sweeney <Ri...@spanlink.co.uk> on 2002/10/03 13:05:24 UTC

Using xslt doesn't work

Hi, I'm trying to use XML Spy along with fop. When I run the command though
I get the following message:

[Error] Unknown formatting obejct ^html
[Error] java.lang.NullPointer.Exception

removing the <html> tags from the xslt file isn't really an option since it
will then trip over on the <head> tag and so on. I get the same error when I
run it from the command line, I'm using

fop -xsl order.xslt -xml order.xml -pdf order.pdf

and I get

[INFO] FOP 0.20.4
[INFO] building formatting object tree
[ERROR] Unknown formatting object ^html
[ERROR] java.lang.NullPointerException

I've tried several examples from XML Spy and none of them work. Obviously
they wouldn't include a feature that doesn't work (...) so I'm guessing that
I'm doing something wrong at some point. Here is part of my xslt file and
part of my xml file that I'm using (they are complete and XML Spy claims
they are valid):

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xsl:template match="/">
		<html>
			<head/>
			<body>
				<xsl:for-each select="Doc">
					<xsl:for-each select="Title">
						<xsl:apply-templates/>
					</xsl:for-each>
					<xsl:for-each select="Company">
						<xsl:apply-templates/>
					</xsl:for-each>
					<xsl:for-each select="Date">
						<xsl:apply-templates/>
					</xsl:for-each>

-----------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by Richard Sweeney
(blank) -->
<Doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\Documents and
Settings\RichardS\Desktop\FOP Stuff\Order.xsd">
	<Title>Order Confirmation</Title>
	<Company>A Company</Company>
	<Date>3rd October 2002</Date>
</Doc>

Re: Using xslt doesn't work

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Richard Sweeney wrote:
> Hi, I'm trying to use XML Spy along with fop. When I run the command though
> I get the following message:
> 
> [Error] Unknown formatting obejct ^html
> [Error] java.lang.NullPointer.Exception
fop is xsl-fo processor and you are wrong if you believe fop able to format html.

-- 
Oleg Tkachenko
Multiconn International, Israel