Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Pagebreaks in Excel-to-HTML transformer

From: Oleg Konovalov <olegkon@--------->
To:
Date: 2/1/2006 4:23:00 AM
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.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent