[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Pagebreaks in Excel-to-HTML transformer

Subject: Pagebreaks in Excel-to-HTML transformer
From: Oleg Konovalov <olegkon@xxxxxxxxx>
Date: Tue, 31 Jan 2006 15:58:36 -0500
xslt excel
Hi,

I am trying to fix the following bug in the existing Cocoon 2.0.4/XSLT1.0
app:
it produces the output multipage data file in both Word and Excel,
In Excel at some point (from page 5 of 25) the pagebreaks start
happening 3 lines
after they should be (and increases by 3 more lines on some
of subsequent pages), but there is no such problem in Word.
Happens for both Excel 2000 and 2003.

here is an exerpt from the sitemap:
...
<map:transform type="xslt" src="xslt/cm/{../1}sheet-transform.xsl"
label="transform">
        <map:parameter name="sec_user_id" value="{userId}"/>
        <map:parameter name="page" value="{../1}sheet"/>
</map:transform>
<map:transform type="xslt" src="xslt/excel-html-transform.xsl" label="html">
         <map:parameter name="sec_user_id" value="{userId}"/>
         <map:parameter name="page" value="{../1}sheet"/>
</map:transform>
<map:serialize type="fakeout-xls"/>
</map:act>
</map:match>

There is a very similar part for Word where (so the input to Excel and
Word transformers is the same and has pagebreak tag
in the proper place):
<map:serializer name="fakeout-xls" mime-type="application/vnd.ms-excel"
                src="org.apache.cocoon.serialization.HTMLSerializer"/>
<map:serializer name="fakeout-word" mime-type="application/msword"
                src="org.apache.cocoon.serialization.HTMLSerializer"/>

Here is a fragment of the Excel-html-transformer:
<x:PageBreaks>
        <x:RowBreaks>
             <xsl:for-each select="/document/helper-info/row-breaks/row">
                <x:RowBreak>
                    <x:Row><xsl:value-of select="."/></x:Row>
                </x:RowBreak>
              </xsl:for-each>
           </x:RowBreaks>
</x:PageBreaks>

Looks like the Excel page formatting occurs  in that  HTML serializer,
at least if I put a  standard   <map:serialize type="html"/> insted of
fakeout-xls,
the pages are not showing any pagebreaks at all....

What do you think might be wrong?   Please help !

Here is a snippet of my input XML:
...
<row>
<cell>&nbsp;</cell>
</row>
</table>
<page-break></page-break>     <!--  you can see a page-break between 2
tables ! -->
<table>
<row>
<cell>
<proposal-name>P Plus HMO Alt Tier Test 082605</proposal-name>
</cell>
</row>
<row>
...

If I run that XSLT transformation in XMLSpy2006,
resulting XSLOutput.html does not show any page breaks
at all (none at all in the whole document, it also drops all <table> tags):
...</td>
</tr>
<tr xmlns="">
<td xmlns="">&amp;nbsp;</td>
</tr>
<tr xmlns="">
<td xmlns="" colspan="7" class="xl32">P Plus HMO Alt Tier Test 082605</td>
</tr>

So I it's a serializer interpreting the pagebreaks:
<map:serializer name="fakeout-xls" mime-type="application/vnd.ms-excel"
                src="org.apache.cocoon.serialization.HTMLSerializer"/>

Any ideas what might be wrong there ?  Any known bug ?

Any help is very appreciated.


Thank you in advance,
Oleg.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.