Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Help with printing a fixed header and footer?

Reply
Thread Tools

Help with printing a fixed header and footer?

 
 
will
Guest
Posts: n/a
 
      08-06-2003
Dear All, can anyone help here?

I need to use XML/XSLT to print out some documents which must all have
the same letterhead and footer section on all pages. The section in
between is dynamic XML, and will be of variable length.

Is it possible in XSLT to specify that this section must appear on
every page in this position?

And what is the best strategy for specifying that the variable XML
data between the header and footer must automatically roll on to
another sheet if necessary?

If anyone could give me a rough idea of whether this is possible, or
could point me in the direction of something on the web that deals
with this challenge, I'd be grateful. I'm pretty new to this stuff.

Thank you.

Will
 
Reply With Quote
 
 
 
 
Mathieu CARTOIXA
Guest
Posts: n/a
 
      08-06-2003
Hi,

If you need to stick with XSLT, then you will have to transform your XML
data into HTML pages, and use a CSS2 compliant to get them printed with the
layout you want. The way to create headers and footers in HTML pages with
CSS2 is explained in the CSS2 Specification (http://www.w3.org/TR/REC-CSS2),
chapter 9.6.1.
If you can use XSL (XSLT + XSL-FO) (http://www.w3.org/TR/xsl), you will
have a much better control of the rendering and create headers and footers
at your will (see chapter 6.4).

Hope this helps.
Mac

"will" <(E-Mail Removed)> a écrit dans le message de news:
http://www.velocityreviews.com/forums/(E-Mail Removed)...
> Dear All, can anyone help here?
>
> I need to use XML/XSLT to print out some documents which must all have
> the same letterhead and footer section on all pages. The section in
> between is dynamic XML, and will be of variable length.
>
> Is it possible in XSLT to specify that this section must appear on
> every page in this position?
>
> And what is the best strategy for specifying that the variable XML
> data between the header and footer must automatically roll on to
> another sheet if necessary?
>
> If anyone could give me a rough idea of whether this is possible, or
> could point me in the direction of something on the web that deals
> with this challenge, I'd be grateful. I'm pretty new to this stuff.
>
> Thank you.
>
> Will



 
Reply With Quote
 
 
 
 
Andy Fish
Guest
Posts: n/a
 
      08-06-2003
XSLT is not a page layout language, it's purely an XML transformation
language, so it depends what output format you are going to generate.

If you're thinking of outputting HTML or plain text and working out where
the end of a page would be, forget it, certainly with XSLT. If you're
outputting plain text and can bank on the same number of lines each page,
write a post-process (not XSL) which counts the lines and puts the footers
on. For HTML you're screwed because it's the rendering engine that decides
how big various fonts are and how much to put on a page.

I would suggest you generate RTF or FO. These have the concept of footer so
you can just specify the footer and leave the page formatting to the
subsequent layout process. AFAIK HTML does not have the concept of a page
header or footer.

Andy

"will" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Dear All, can anyone help here?
>
> I need to use XML/XSLT to print out some documents which must all have
> the same letterhead and footer section on all pages. The section in
> between is dynamic XML, and will be of variable length.
>
> Is it possible in XSLT to specify that this section must appear on
> every page in this position?
>
> And what is the best strategy for specifying that the variable XML
> data between the header and footer must automatically roll on to
> another sheet if necessary?
>
> If anyone could give me a rough idea of whether this is possible, or
> could point me in the direction of something on the web that deals
> with this challenge, I'd be grateful. I'm pretty new to this stuff.
>
> Thank you.
>
> Will



 
Reply With Quote
 
Mathieu CARTOIXA
Guest
Posts: n/a
 
      08-06-2003
Hi,

In this case, all you need is (in HTML, with a compatible browser) to
define a THEAD and a TFOOTER section in your TABLE. If you will use plain
XML, see CSS2 (http://www.w3.org/TR/REC-CSS2), chapter 17.2.
Please note that your table must NOT have the "layout" property set to
"fixed"...
Mac

"will" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
> Just a little clarification. The XSLT creates HTML which is then
> viewed in a browser and printed by the user. My XSLT currently outputs
> tables of a set height to match the A4 page size. This works fine if
> the XML data in the centre of the document is a small volume. But if
> there is a lot of XML data, the current footer will get pushed down
> the page onto the next printed sheet, so I need a way to fix the
> footer to each page, and have the XML data text flowing round it (and
> round the header on the next page).
>
> Thank you, Will



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM
Free Fixed-Width/Fixed-Pitch fonts? johnp HTML 4 05-23-2005 06:14 AM



Advertisments