Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Help with printing a fixed header and footer? (http://www.velocityreviews.com/forums/t165336-help-with-printing-a-fixed-header-and-footer.html)

will 08-06-2003 07:02 AM

Help with printing a fixed header and footer?
 
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

Mathieu CARTOIXA 08-06-2003 07:36 AM

Re: Help with printing a fixed header and footer?
 
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" <willcarter@lycos.com> a écrit dans le message de news:
3475918c.0308052302.57d3de54@posting.google.com...
> 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




Andy Fish 08-06-2003 08:11 AM

Re: Help with printing a fixed header and footer?
 
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" <willcarter@lycos.com> wrote in message
news:3475918c.0308052302.57d3de54@posting.google.c 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




Mathieu CARTOIXA 08-06-2003 11:50 AM

Re: Help with printing a fixed header and footer?
 
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" <willcarter@lycos.com> a écrit dans le message de news:
3475918c.0308060219.7fa3bf88@posting.google.com...
> 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





All times are GMT. The time now is 08:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.