Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2005, 01:33 PM
Registered User
 
Join Date: May 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default "[WARNING] Some static content could not fit .....

Good Afternon. I have created a FOP report for a webApp and was using XSLFormatter when i developed it. It renders perfectly in that envoirnemnt. however, when I tried to run it from Java using the TraxInputHandler I cannot seem to gernate the region-before. the error is displays is: "[WARNING] Some static content could not fit in the area." I assumed this to mean what i was displaying was too big for the allotted area but I have slimmed the header down to trand and print just one word and still get the error. Any suggestions would be great!!

My XSL:<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.5" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:pes="http://www.gov.bc.ca/tran/estimate"
    xmlns:pfop="http://www.gov.bc.ca/tran/pesFOP" >


    <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>

    <xsl:template match="/">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

            <fo:layout-master-set>
                <fo:simple-page-master master-name="simpleA4"
                        page-height="8.5in"
                        page-width="11in">


                    <fo:region-body margin-top="2.0in"
                                    margin-bottom="0.5in"
                                    margin-left="0.5in"
                                    margin-right="0.5in"/>

                    <fo:region-before padding="6pt 1in"/>

                </fo:simple-page-master>
            </fo:layout-master-set>

            <fo:page-sequence master-reference="simpleA4">

                 <fo:static-content flow-name="xsl-region-before">
                    <fo:block font-size="10pt">
                        <xsl:apply-templates select="pfop:fopContractRoot"/>
                    </fo:block>
                 </fo:static-content>

                <fo:flow flow-name="xsl-region-body">
                    <fo:block font-size="10pt">
                        <xsl:apply-templates select="/pfop:fopContractRoot/estimate/pages"/>
                    </fo:block>
                    <fo:block id="end-of-report"/>
                </fo:flow>
            </fo:page-sequence>

        </fo:root>
    </xsl:template>

    <xsl:template match="pfop:fopContractRoot">

            <fo:table table-layout="fixed">
            <fo:table-column column-width="3in"/>
            <fo:table-column column-width="4in"/>
            <fo:table-column column-width="3in"/>

                 <fo:table-body>
                    <fo:table-row>
                        <fo:table-cell> #160;</fo:table-cell>
                        <fo:table-cell>
                            <fo:block font-size="12pt" font-weight="bold" text-align="center">
                                PROJECT EXPENDITURES
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell> #160;</fo:table-cell>
                    </fo:table-row>
                </fo:table-body>


        </fo:table>

     </xsl:template>

     <xsl:template match="pages">

        ........Stuff that works! ..........

    </xsl:template>
</xsl:stylesheet>





 
Old June 7th, 2005, 12:12 PM
Registered User
 
Join Date: May 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well this one was a stumper. i found at least 6 other posts in various groups posing the same question with no replies. In the end i managed to get around it by wrapping the body and repeating header in one table. never did find the issue with static-content.

<fo:table table-layout="fixed">

          <fo:table-column column-width="2.3in"/>
          <fo:table-column column-width="1.1in"/>
          <fo:table-column column-width="1.1in"/>
          <fo:table-column column-width="1.1in"/>
          <fo:table-column column-width="1.1in"/>
          <fo:table-column column-width="1.1in"/>
          <fo:table-column column-width="1.1in"/>
          <fo:table-column column-width="1.1in"/>

         <fo:table-header>

        <fo:table-row>
                <fo:table-cell number-columns-spanned="8">
                    <xsl:apply-templates select="//pfop:fopContractRoot"/>
                </fo:table-cell>
            </fo:table-row>
        </fo:table-header>

        <fo:table-body>
            ...table body.....
        </fo:table-body>

    </fo:table>
 </xsl:template>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing fit to page print arnabghosh Javascript How-To 2 July 29th, 2007 05:58 PM
non-static reports to static html files miamikk ASP.NET 2.0 Basics 0 June 4th, 2007 01:48 PM
Best Fit Column Width for Datasheets Nadine Access VBA 4 January 28th, 2007 04:45 PM
design (css) doesn't fit in page gilgalbiblewheel CSS Cascading Style Sheets 1 February 25th, 2005 05:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.