DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39712>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39712

           Summary: NullPointerExeption on table border-
                    separation="0.04167in"
           Product: Fop
           Version: 0.92
          Platform: PC
               URL: http://www.dimari.de
        OS/Version: Windows Server 2003
            Status: NEW
          Keywords: FixedInTrunk
          Severity: critical
          Priority: P1
         Component: fo tree
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


In the new FOP Version we got the NullPointerExeption always when we use the 
attribute "border-separation" on table. This bug is easy to find. Try the 
following xsl.

Background: the new altova stylevision 2006 make intensive use of border-
separation when you want to design tables. The previous version had a different 
handling. That was the reason why the bug was discovered.
Because of the advantages of FOP 0.92 we don't want to go back to FOP 0.20.5 
(this Version has no problems).

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:fn="http://www.w3.org/2005/xpath-functions"; 
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
    <xsl:output version="1.0" method="html" encoding="UTF-8" indent="no" />
    <xsl:variable name="fo:layout-master-set">
        <fo:layout-master-set>
            <fo:simple-page-master master-name="default-page" page-
height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in">
                <fo:region-body margin-top="0.79in" margin-bottom="0.79in" />
            </fo:simple-page-master>
        </fo:layout-master-set>
    </xsl:variable>
    <xsl:template match="/">
        <xsl:variable name="maxwidth" select="7.30000" />
        <fo:root>
            <xsl:copy-of select="$fo:layout-master-set" />
            <fo:page-sequence master-reference="default-page" initial-page-
number="1" format="1">
                <fo:flow flow-name="xsl-region-body">
                    <fo:block>
                        <xsl:variable name="tablewidth0" select="$maxwidth * 
1.00000" />
                        <xsl:variable name="sumcolumnwidths0" 
select="0.04167" />
                        <xsl:variable name="defaultcolumns0" select="1" />
                        <xsl:variable name="defaultcolumnwidth0">
                            <xsl:choose>
                                <xsl:when test="$defaultcolumns0 &gt; 0">
                                    <xsl:value-of select="($tablewidth0 - 
$sumcolumnwidths0) div $defaultcolumns0" />
                                </xsl:when>
                                <xsl:otherwise>
                                    <xsl:value-of select="0.000" />
                                </xsl:otherwise>
                            </xsl:choose>
                        </xsl:variable>
                        <xsl:variable name="columnwidth0_0" 
select="$defaultcolumnwidth0" />
                        <fo:table table-layout="fixed" width="{$tablewidth0}in" 
space-before.optimum="1pt" space-after.optimum="2pt" border-collapse="separate" 
border-separation="0.04167in" color="black" display-align="center">
                            <fo:table-column column-width="{$columnwidth0_0}
in" />
                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell padding-top="0.02083in" 
padding-bottom="0.02083in" padding-left="0.02083in" padding-right="0.02083in">
                                        <fo:block padding-top="1pt" padding-
bottom="1pt">
                                            <fo:inline>
                                                <xsl:text>fg</xsl:text>
                                            </fo:inline>
                                        </fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                </fo:flow>
            </fo:page-sequence>
        </fo:root>
    </xsl:template>
</xsl:stylesheet>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to