[XSL-LIST Mailing List Archive Home]
RE: Re: [xsl] Pagebreaks in Excel-HTML transformer
Subject: RE: Re: [xsl] Pagebreaks in Excel-HTML transformer|
Date: Fri, 03 Feb 2006 10:30:39 -0500
You have conflated too many marginally-related pieces. We've been discussing Cocoon, XSLT, and Excel. This has made it difficult to get to the bottom of the problem. This list concerns itself with XSL and throwing Cocoon and Excel into the mix caused confusion.
The good news is that you have come up with the answer you've been looking for. Let me make a few points.
1) To re-emphasize: HTML documents are a single page. There is no concept of a page break.
2) If Excel can read an HTML document (I know it can, I've used it to do this), and can paginate it when printing, then Excel is using some markup that has meaning to it and this markup has no meaning (or a different meaning) to browsers.
3) The HTML "br" element forces a new line in a browser. If Excel interprets this differently (to force a new page when printing) then you will want to change your stylesheet (what you have been referring to as a "transformer") so that a <br> is emitted at the point where the three blank lines now appear. I just changed your stylesheet, replacing this:
<xsl:template match="page-break"><br style="page-break-after:always;"></br></xsl:template>
and ran the transformation. I then opened the resulting file in Excel and did a print preview. That construct does insert page breaks. You have found your answer.
cknell@xxxxxxxxxx - email
From: Oleg Konovalov <olegkon@xxxxxxxxx>
Sent: Fri, 3 Feb 2006 10:01:17 -0500
Subject: Re: [xsl] Pagebreaks in Excel-HTML transformer
I want it to be 1 HTML document which
has many pages, printed 1 table per page.
It should be read by Excel 2000/2003
(or Excel plug-in for IE6)
I think, that tag should be able to separate pages for printing:
<br style="page-break-after:always;"> ,
so my idea is that Excel-HTML transformer
with: <br style="page-break-after:always;">
Does it make sense to you ?
So how do we do that in transformer?
On 2/3/06, cknell@xxxxxxxxxx <cknell@xxxxxxxxxx> wrote:
> I've run your stylesheet against the XML you provided. It produces an HTML file with a single table, visually broken into sections. When I examine the output I see three new lines at each point where you indicate you want a page break.
> HTML doesn't have any concept of a page break. Each document is a page, however long it may be. What is it that you want to appear in your HTML at the points where the three blank lines appear?
> Is it that you wish to produce multiple HTML documents, one for each <page-break>?
> Charles Knell
> cknell@xxxxxxxxxx - email