473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2468

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

Similar topics

5
by: Buchleitner Martin | last post by:
Hi! I got another problem parsing my XML document: <document> <paragraph> <style val=listing/> <text>listing #1 text</text> </paragraph> <paragraph>
6
by: chris | last post by:
Hi, After going back through the XSL tutorials and the help here I have largely solved the problem of merging two XHTML files, but one small detail remains... The parser outputs <html...
29
by: Thomas | last post by:
Hi I have an XSL stylesheet: <xsl:for-each select="TRACKS/TRACK"> <tr class="TDL"> <td width="90%"><xsl:number value="position()" format="1" /> - <xsl:value-of select="TRACKTITLE"/></td>...
4
by: Kasp | last post by:
Below is a XSL that I can barely understand being a newbie to XSL world. Can someone let me know what do these 3 lines do exactly? - <xsl:attribute name="MemberKey"> <xsl:number level="multiple"...
4
by: sylvain.loiseau | last post by:
Hello Given a node set, I try to compute the total of the string-length value of each node. For instance, with : <xsl:for-each select="//q"> <!-- the length of each node is compute with:...
7
by: Andy Fish | last post by:
Hi, I'm stuck with an XSL problem - can anyone give me any hints? I have some XML with nested formatting tags like this: <text> this is plain <bold> this is bold
1
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
11
by: Rolf Barbakken | last post by:
I have an xml with records like this one: <a:response> <a:href>http://server/public/sol/comp/1049306.eml</a:href> <a:propstat> <a:status>HTTP/1.1 200 OK</a:status> <a:prop>...
14
by: ajfish | last post by:
Hi, I am trying to allocate a unique ID to every instance of tag 'foo' in a large XML document. currently I'm doing this: <xsl:variable name="UniqueId"> <xsl:number count="foo" level="any"/>...
4
by: Christofer Dutz | last post by:
Hi, I am having a small problem, that is driving me nuts. My application reads some Xml and runs 2 Xsl Transformations to generate HTML. As soon as my second XSL introduces some <br/tags, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.