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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6992

from-parent function returns invalid values

           Summary: from-parent function returns invalid values
           Product: Fop
           Version: 0.20.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: pdf renderer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I believe that from-parent is returning an unknown value if the property is not
directly set. The value is the unit of measure if the value is set.

Here are the two test cases. If the containing block is thus
<fo:block-container height="135mm" width="75mm"> (No top property set)
then <fo:block-container . . . top="from-parent(top)-3mm" . . . >
returns this error:

[ERROR]: Error in top property value 'from-parent(top)-3mm':
org.apache.fop.fo.expr.PropertyException: Non numeric operand in subtraction

If the containing block is thus
<fo:block-container height="135mm" width="75mm" left="4mm" top="4mm">
This error is returned
[ERROR]: unknown length unit 'mm-3mm'

Here is the complete test case supplied by Sebastien Foucault:
This test case works in FOP-0.20.2

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
        <fo:layout-master-set>
                <fo:simple-page-master master-name="simplet" page-width="240mm"
page-height="100mm" margin-top="1in" margin-right="1in" margin-left="1in"
margin-bottom="1in">
                        <fo:region-before extent="1in"/>
                        <fo:region-body margin-top="1in"/>
                </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="simplet">
                <fo:static-content flow-name="xsl-region-before">
                        <fo:block>Region before
                        </fo:block>
                </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
                <fo:block-container height="135mm" width="75mm" left="4mm" top="4mm">
                        <fo:block>Region body</fo:block>
                        <fo:block-container height="15mm" width="15mm" left="4mm-3mm"
top="from-parent(top)-3mm" position="absolute">
                                <fo:block>HELLO</fo:block>
                        </fo:block-container>
                        <fo:block>Region body</fo:block>
                </fo:block-container>
                </fo:flow>
        </fo:page-sequence>
</fo:root>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to