473,326 Members | 2,111 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,326 software developers and data experts.

need of XSLT style/template for display some text on each page of document

hi all,

Actually i am writing data from XML file in to word document file using XSL Transformations file. Thre is a requirement like that some data in xml file should be displayed on top of each page of document just like page header.

anybody can help me to create such kind of XSL template/style..?
Jan 21 '08 #1
1 1813
jkmyoung
2,057 Expert 2GB
The headers and footers for a section are defined somewhat like so:
Somewhere inside the <w:sect> element for the section, you have:
Expand|Select|Wrap|Line Numbers
  1. <w:sectPr wsp:rsidR="00A94EC1">
  2.     <w:hdr w:type="odd">
  3.         <w:p wsp:rsidR="00A94EC1" wsp:rsidRDefault="00A94EC1">
  4.             <w:pPr>
  5.                 <w:pStyle w:val="Header"/>
  6.             </w:pPr>
  7.             <w:r>
  8.                 <w:t>Header Text</w:t>
  9.             </w:r>
  10.         </w:p>
  11.     </w:hdr>
  12.     <w:ftr w:type="odd">
  13.         <w:p wsp:rsidR="00A94EC1" wsp:rsidRDefault="00A94EC1">
  14.             <w:pPr>
  15.                 <w:pStyle w:val="Footer"/>
  16.             </w:pPr>
  17.             <w:r>
  18.                 <w:t>Footer text</w:t>
  19.             </w:r>
  20.         </w:p>
  21.     </w:ftr>
  22.     <w:pgSz w:w="12240" w:h="15840"/>
  23.     <w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="708" w:footer="708" w:gutter="0"/>
  24.     <w:cols w:space="708"/>
  25.     <w:docGrid w:line-pitch="360"/>
  26. </w:sectPr>
  27.  
In the styles section, define both the header and footer styles:
Expand|Select|Wrap|Line Numbers
  1. <w:style w:type="paragraph" w:styleId="Header">
  2.     <w:name w:val="header"/>
  3.     <wx:uiName wx:val="Header"/>
  4.     <w:basedOn w:val="Normal"/>
  5.     <w:rsid w:val="00A94EC1"/>
  6.     <w:pPr>
  7.         <w:pStyle w:val="Header"/>
  8.         <w:tabs>
  9.             <w:tab w:val="center" w:pos="4320"/>
  10.             <w:tab w:val="right" w:pos="8640"/>
  11.         </w:tabs>
  12.     </w:pPr>
  13.     <w:rPr>
  14.         <wx:font wx:val="Times New Roman"/>
  15.     </w:rPr>
  16. </w:style>
  17. <w:style w:type="paragraph" w:styleId="Footer">
  18.     <w:name w:val="footer"/>
  19.     <wx:uiName wx:val="Footer"/>
  20.     <w:basedOn w:val="Normal"/>
  21.     <w:rsid w:val="00A94EC1"/>
  22.     <w:pPr>
  23.         <w:pStyle w:val="Footer"/>
  24.         <w:tabs>
  25.             <w:tab w:val="center" w:pos="4320"/>
  26.             <w:tab w:val="right" w:pos="8640"/>
  27.         </w:tabs>
  28.     </w:pPr>
  29.     <w:rPr>
  30.         <wx:font wx:val="Times New Roman"/>
  31.     </w:rPr>
  32. </w:style>
  33.  
Jan 21 '08 #2

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

Similar topics

20
by: Bernd Fuhrmann | last post by:
Hi! I have some trouble with some simple stupid XSLT-stuff. My stylesheet: ------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"...
0
by: alex | last post by:
I'm new to xslt, and I am attempting to use it to produce a comma-separated-value file from a large, dynamically-generated data file formatted in xml (examples of the xml file and my xslt style...
2
by: Dave Matthews | last post by:
Hi folks, I'm writing a web-page editing tool for my company which will allow staff (with no "technical" expertise) to maintain their own Intranet sites. The content for each webpage is stored...
12
by: gipsy boy | last post by:
Hello, I have sort of a big problem. I would really appreciate any help you could give me. I made a web service in C++ that throws XML to the client (browser). But, the XSLT transormation...
3
by: bjam | last post by:
Hi, I am hoping someone can help with this I am assuming it is pretty basic but I don't see anything that jumps out at me at how to do this. Is there a way to have all the items output from the...
2
by: FrankStallone | last post by:
I am just getting started in XML and I made my first xml, dtd and xslt file and XML spy said they were all valid and they worked. This was the xslt doc that worked. <?xml version="1.0"...
0
by: Christopher M. Lauer | last post by:
I have done my best to answer this question but can not find the proper set of commands. I would like to transform an xml file (in code behind) and display its output in a specific html tag,...
2
by: Scott Sauyet | last post by:
I'm trying to select a subset of a WSDL document using XSLT and a simple text document describing the high-level elements to include. I have it working fine for selecting the services, bindings,...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.