469,646 Members | 1,590 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

xsl-fo / pdf: root element help

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.
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <xsl:stylesheet
  4.         xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  5.         xmlns:fo="http://www.w3.org/1999/XSL/Format"
  6.         >
  7.  
  8. <xsl:template match="/">
  9.  
  10. <fo:root>
  11.         <fo:layout-master-set>
  12.                 <fo:simple-page-master
  13.                         margin=".25in"
  14.                         page-width="11in"
  15.                         page-height="8.5in"
  16.                         master-name="first"
  17.                 >
  18.                         <fo:region-before extent=".25in"/>
  19.                         <fo:region-body margin-top=".25in"/>
  20.                         <fo:region-after extent=".25in"/>
  21.                 </fo:simple-page-master>
  22.         </fo:layout-master-set>
  23.  
  24.         <fo:page-sequence master-name="first">
  25.                 <fo:static-content flow-name="xsl-region-before">
  26.                         <xsl:call-template name="header" />
  27.                 </fo:static-content>
  28.  
  29.                 <fo:flow flow-name="xsl-region-body">
  30.                         <fo:block>
  31.                                 <fo:table space-after.optimum="1pt" width="8in">
  32.                                         <fo:table-column column-width="5in"/>
  33.                                         <fo:table-column column-width="3in"/>
  34.                                         <fo:table-body>
  35.                                                 <xsl:call-template name="content" />
  36.                                         </fo:table-body>
  37.                                 </fo:table>
  38.                         </fo:block>
  39.                 </fo:flow>
  40.         </fo:page-sequence>
  41.  
  42. </fo:root>
  43. </xsl:template>
  44.  
  45. <xsl:template name="header" match="/">
  46.         <fo:table-row>
  47.                 <fo:table-cell>
  48.                         <fo:block font-weight="bold">Heading 1</fo:block>
  49.                 </fo:table-cell>
  50.         </fo:table-row>
  51. </xsl:template>
  52.  
  53. <xsl:template name="content" match="//department/employee">
  54.         <fo:table-row>
  55.                 <fo:table-cell>
  56.                         <fo:block ><xsl:value-of select="." /></fo:block>
  57.                 </fo:table-cell>
  58.         </fo:table-row>
  59. </xsl:template>
  60.  
  61. </xsl:stylesheet>

any help is GREATLY appreciated. thanks all.
May 10 '06 #1
0 2318

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Buchleitner Martin | last post: by
6 posts views Thread by chris | last post: by
29 posts views Thread by Thomas | last post: by
4 posts views Thread by Kasp | last post: by
4 posts views Thread by sylvain.loiseau | last post: by
7 posts views Thread by Andy Fish | last post: by
11 posts views Thread by Rolf Barbakken | last post: by
4 posts views Thread by Christofer Dutz | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.