CVS: jfor/samples/cocoon/tests/simple-tests indention.fo.xml,NONE,1.1

Peter Herweg <[email protected]> Sun, 12 Oct 2003 07:07:37 -0700
Newsgroups gmane.text.xml.jfor.cvs
Message-ID <[email protected]>
Update of /cvsroot/jfor/jfor/samples/cocoon/tests/simple-tests
In directory sc8-pr-cvs1:/tmp/cvs-serv17891

Added Files:
	indention.fo.xml 
Log Message:
sample for margin-left attribute added

--- NEW FILE: indention.fo.xml ---
<?xml version="1.0" encoding="iso-8859-1"?>

<!-- tell cocoon to use jfor to convert this to RTF format -->
<?cocoon-format type="xslfo/rtf"?>

<fo:root xmlns:html="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
        <fo:simple-page-master margin-right="0.5cm" margin-left="0.5cm" margin-bottom="0.3cm" margin-top="0.1cm" page-width="21cm" page-height="29.7cm" master-name="first">
            <fo:region-body margin-top="2.0cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    
    <fo:page-sequence master-reference="first">
        <fo:flow flow-name="xsl-region-body">
            <fo:block>Start of test document</fo:block>
            <fo:block font-weight="bold">This test illustrates the support of margin-left attribute for fo:block and fo:table.</fo:block>
            <fo:block space-after="10mm">Contributed by Peter Herweg.</fo:block>

            <fo:block space-after="3mm" margin-left="20mm" text-align="left" >
            This left-aligned paragraph has an indention of 20mm on the left side.
            </fo:block>
            <fo:block space-after="3mm">
            This ist a normal paragraph without explicit text-align or margin-left attributes. It contains some blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla blablabla in order to make the right indention visible.
            </fo:block>
            <fo:block space-after="3mm" margin-right="1cm" text-align="right">
            This right-aligned paragraph has an indention of 20mm on the right side.
            </fo:block>

            <fo:block space-after="3mm">
            The following table (2 rows, 2 cells) has an indention of 30mm on the left side. As you can see this does not work properly. If there is a margin-left specified for the fo:table, the parser will inherit this attribute to all containing fo:block's. You have to specify explicitly margin-left="0mm". This behaviour does not match with the XSL-FO specification which says, margin-left is not inherited. Could not find the error up to now.
            </fo:block>
            <fo:table border-style="solid" border-width="0.5pt" margin-left="30mm">
                <fo:table-column column-width="5cm" />
                <fo:table-column column-width="10cm"/>
                <fo:table-body>
                    <fo:table-row>
                        <fo:table-cell border-style="solid" border-width="0.5pt">
                            <fo:block margin-left="0mm">
                            This fo:block has explicitly margin-left="0mm" specified.
                            </fo:block>
                            <fo:block>
                            This fo:block has no margin-left specified.
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell border-style="solid" border-width="0.5pt">
                            <fo:block margin-left="20mm">
                            This fo:block has explicitly margin-left="20mm" specified.
                            </fo:block>
                            <fo:block margin-left="10mm">
                            This fo:block has explicitly margin-left="10mm" specified.
                            </fo:block>
                            <fo:block margin-right="20mm" text-align="right">
                            This fo:block has explicitly margin-right="20mm" specified.
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    
                    <fo:table-row>
                        <fo:table-cell border-style="solid" border-width="0.5pt">
                            <fo:block margin-left="0mm">
                            This fo:block has explicitly margin-left="0mm" specified.
                            </fo:block>
                            <fo:block>
                            This fo:block has no margin-left specified.
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell border-style="solid" border-width="0.5pt">
                            <fo:block margin-left="20mm">
                            This fo:block has explicitly margin-left="20mm" specified.
                            </fo:block>
                            <fo:block margin-left="10mm">
                            This fo:block has explicitly margin-left="10mm" specified.
                            </fo:block>
                            <fo:block margin-right="20mm" text-align="right">
                            This fo:block has explicitly margin-right="20mm" specified.
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php