W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2006

root element error (newbie)

From: jklBruin (sent by Nabble.com) <lists@nabble.com>
Date: Wed, 10 May 2006 11:18:02 -0700 (PDT)
Message-ID: <4325553.post@talk.nabble.com>
To: www-xsl-fo@w3.org


i'm trying to implement converting xsl-fo to pdf on a .Net page.

i''m getting the error message:
Root element must be root, not
http://www.w3.org/1999/XSL/Transform:stylesheet 


here's the xsl i'm using.
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
	xmlns:fo="http://www.w3.org/1999/XSL/Format"
	>

<xsl:template match="/">

<fo:root>
	<fo:layout-master-set>
		<fo:simple-page-master
			margin=".25in"
			page-width="11in"
			page-height="8.5in"
			master-name="first"
		>
			<fo:region-before extent=".25in"/>
			<fo:region-body margin-top=".25in"/>
			<fo:region-after extent=".25in"/>
		</fo:simple-page-master>
	</fo:layout-master-set>

	<fo:page-sequence master-name="first">
		<fo:static-content flow-name="xsl-region-before">
			<xsl:call-template name="header" />
		</fo:static-content>

		<fo:flow flow-name="xsl-region-body">
			<fo:block>
				<fo:table space-after.optimum="1pt" width="8in">
					<fo:table-column column-width="5in"/>
					<fo:table-column column-width="3in"/>
					<fo:table-body>
						<xsl:call-template 	name="content" />
					</fo:table-body>
				</fo:table>
			</fo:block>
		</fo:flow>
	</fo:page-sequence>

</fo:root>
</xsl:template>

<xsl:template name="header" match="/">
	<fo:table-row>
		<fo:table-cell>
			<fo:block font-weight="bold">Heading 1</fo:block>
		</fo:table-cell>
	</fo:table-row>
</xsl:template>

<xsl:template name="content" match="//department/employee">
	<fo:table-row>
		<fo:table-cell>
			<fo:block ><xsl:value-of select="." /></fo:block>
		</fo:table-cell>
	</fo:table-row>
</xsl:template>

</xsl:stylesheet>


any help is GREATLY appreciated. thanks all.


--
View this message in context: http://www.nabble.com/root-element-error-%28newbie%29-t1594050.html#a4325553
Sent from the w3.org - www-xsl-fo forum at Nabble.com.
Received on Wednesday, 10 May 2006 18:18:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:13 GMT