Bläddra i källkod

Setting svn:eol-style and svn:keywords where necessary. Need to lookup why these are missing only on some.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@227338 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_90-alpha1
Jeremias Maerki 19 år sedan
förälder
incheckning
d13f4df2f2

+ 53
- 53
test/layoutengine/testcases/external-graphic3.xml Visa fil

@@ -1,53 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks borders and the like on external-graphics.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="orange">
<fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" border="solid 5pt" padding="5pt" background-color="white"/>
</fo:block>
<fo:block>EOF</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/>
<eval expected="color=#ffffff,repeat=0,horiz=0,vertical=0" xpath="//flow/block[1]/lineArea/viewport/@background"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks borders and the like on external-graphics.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="orange">
<fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" border="solid 5pt" padding="5pt" background-color="white"/>
</fo:block>
<fo:block>EOF</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/>
<eval expected="color=#ffffff,repeat=0,horiz=0,vertical=0" xpath="//flow/block[1]/lineArea/viewport/@background"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/>
</checks>
</testcase>

+ 101
- 101
test/layoutengine/testcases/id1.xml Visa fil

@@ -1,101 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks IDs on block-level FOs.
</p>
<p>
TODO:
Test table-and-caption and table-caption once implemented.
</p>
<p>
Notes:
The following FOs cannot be tested this way:
table-body, table-header, table-footer, table-row,
multi-switch, multi-case, multi-toggle, multi-properties, multi-property-set,
page-sequence.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block id="block1">block1</fo:block>
<fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item id="item1">
<fo:list-item-label id="item1-label" end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body id="item1-body" start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
<fo:table id="table1" table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="100%"/>
<fo:table-header id="table-header1">
<fo:table-row>
<fo:table-cell>
<fo:block>header</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer id="table-footer1">
<fo:table-row>
<fo:table-cell>
<fo:block>footer</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body id="table-body1">
<fo:table-row id="table-row1">
<fo:table-cell id="table-cell1">
<fo:block>body-content</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block-container id="block-container1">
<fo:block>block-container-content</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="block1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@prod-id"/>
<eval expected="list1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@prod-id"/>
<eval expected="item1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@prod-id"/>
<eval expected="item1-label" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[1]/@prod-id"/>
<eval expected="item1-body" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[2]/@prod-id"/>
<eval expected="table1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/@prod-id"/>
<!-- table-header1, table-body1, table-footer1, table-row1 don't exist in the area tree and cannot be tested. -->
<eval expected="table-cell1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/block[2]/@prod-id"/>
<eval expected="block-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/@prod-id"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks IDs on block-level FOs.
</p>
<p>
TODO:
Test table-and-caption and table-caption once implemented.
</p>
<p>
Notes:
The following FOs cannot be tested this way:
table-body, table-header, table-footer, table-row,
multi-switch, multi-case, multi-toggle, multi-properties, multi-property-set,
page-sequence.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block id="block1">block1</fo:block>
<fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item id="item1">
<fo:list-item-label id="item1-label" end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body id="item1-body" start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
<fo:table id="table1" table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="100%"/>
<fo:table-header id="table-header1">
<fo:table-row>
<fo:table-cell>
<fo:block>header</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer id="table-footer1">
<fo:table-row>
<fo:table-cell>
<fo:block>footer</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body id="table-body1">
<fo:table-row id="table-row1">
<fo:table-cell id="table-cell1">
<fo:block>body-content</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block-container id="block-container1">
<fo:block>block-container-content</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="block1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@prod-id"/>
<eval expected="list1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@prod-id"/>
<eval expected="item1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@prod-id"/>
<eval expected="item1-label" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[1]/@prod-id"/>
<eval expected="item1-body" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[2]/@prod-id"/>
<eval expected="table1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/@prod-id"/>
<!-- table-header1, table-body1, table-footer1, table-row1 don't exist in the area tree and cannot be tested. -->
<eval expected="table-cell1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/block[2]/@prod-id"/>
<eval expected="block-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/@prod-id"/>
</checks>
</testcase>

+ 79
- 79
test/layoutengine/testcases/id2.xml Visa fil

@@ -1,79 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks IDs on inline-level FOs.
</p>
<p>
TODO:
Test inline-container, bidi-override once implemented.
</p>
<p>
Notes:
The following FOs cannot be tested this way:
wrapper, initial-property-set.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="20in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>text<fo:inline id="inline1">inline</fo:inline>text</fo:block>
<fo:block>text<fo:wrapper id="wrapper1">wrapper</fo:wrapper>text</fo:block>
<fo:block>text<!--fo:inline-container id="inline-container1"><fo:block>inline-container</fo:block></fo:inline-container-->text</fo:block>
<fo:block>text<fo:page-number id="page-number1"/>text</fo:block>
<fo:block>text<fo:page-number-citation id="page-number-citation1" ref-id="inline1"/>text</fo:block>
<fo:block>text<fo:leader id="leader1" leader-pattern="dots" leader-length="2cm"/>text</fo:block>
<fo:block>text<fo:character id="char1" character="X"/>text</fo:block>
<fo:block>text<!--fo:bidi-override id="bidi1" direction="ltr">bidi-override</fo:bidi-override-->text</fo:block>
<fo:block>text<fo:basic-link id="link1" internal-destination="page-number1">link</fo:basic-link>text</fo:block>
<fo:block>text<fo:instream-foreign-object id="ifo1" content-height="12pt">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>text</fo:block>
<fo:block>text<fo:external-graphic id="eg1" src="../../resources/images/bgimg72dpi.jpg" content-height="12pt"/>text</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="inline1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/inlineparent/@prod-id"/>
<!-- wrapper skipped -->
<!--eval expected="inline-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea/???/@prod-id"/-->
<eval expected="page-number1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/lineArea/text[2]/@prod-id"/>
<eval expected="page-number-citation1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[5]/lineArea/text[2]/@prod-id"/>
<eval expected="leader1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[6]/lineArea/inlineparent/@prod-id"/>
<eval expected="char1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[7]/lineArea/char/@prod-id"/>
<!--eval expected="bidi1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[8]/lineArea/???/@prod-id"/-->
<eval expected="link1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[9]/lineArea/inlineparent/@prod-id"/>
<eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/@prod-id"/>
<eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/foreignObject/@prod-id"/>
<eval expected="eg1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[11]/lineArea/viewport/@prod-id"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks IDs on inline-level FOs.
</p>
<p>
TODO:
Test inline-container, bidi-override once implemented.
</p>
<p>
Notes:
The following FOs cannot be tested this way:
wrapper, initial-property-set.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="20in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>text<fo:inline id="inline1">inline</fo:inline>text</fo:block>
<fo:block>text<fo:wrapper id="wrapper1">wrapper</fo:wrapper>text</fo:block>
<fo:block>text<!--fo:inline-container id="inline-container1"><fo:block>inline-container</fo:block></fo:inline-container-->text</fo:block>
<fo:block>text<fo:page-number id="page-number1"/>text</fo:block>
<fo:block>text<fo:page-number-citation id="page-number-citation1" ref-id="inline1"/>text</fo:block>
<fo:block>text<fo:leader id="leader1" leader-pattern="dots" leader-length="2cm"/>text</fo:block>
<fo:block>text<fo:character id="char1" character="X"/>text</fo:block>
<fo:block>text<!--fo:bidi-override id="bidi1" direction="ltr">bidi-override</fo:bidi-override-->text</fo:block>
<fo:block>text<fo:basic-link id="link1" internal-destination="page-number1">link</fo:basic-link>text</fo:block>
<fo:block>text<fo:instream-foreign-object id="ifo1" content-height="12pt">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>text</fo:block>
<fo:block>text<fo:external-graphic id="eg1" src="../../resources/images/bgimg72dpi.jpg" content-height="12pt"/>text</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="inline1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/inlineparent/@prod-id"/>
<!-- wrapper skipped -->
<!--eval expected="inline-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea/???/@prod-id"/-->
<eval expected="page-number1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/lineArea/text[2]/@prod-id"/>
<eval expected="page-number-citation1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[5]/lineArea/text[2]/@prod-id"/>
<eval expected="leader1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[6]/lineArea/inlineparent/@prod-id"/>
<eval expected="char1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[7]/lineArea/char/@prod-id"/>
<!--eval expected="bidi1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[8]/lineArea/???/@prod-id"/-->
<eval expected="link1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[9]/lineArea/inlineparent/@prod-id"/>
<eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/@prod-id"/>
<eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/foreignObject/@prod-id"/>
<eval expected="eg1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[11]/lineArea/viewport/@prod-id"/>
</checks>
</testcase>

+ 56
- 56
test/layoutengine/testcases/ifo1.xml Visa fil

@@ -1,56 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks the basics for instream-foreign-object.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>start
<fo:instream-foreign-object content-width="20pt" content-height="20pt">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
end
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<true xpath="count(//flow/block[1]/lineArea/viewport) = 1" fail-msg="viewport area not found"/>
<true xpath="count(//flow/block[1]/lineArea/viewport/foreignObject) = 1" fail-msg="foreign object area not found"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpd"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpda"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipd"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipda"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks the basics for instream-foreign-object.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>start
<fo:instream-foreign-object content-width="20pt" content-height="20pt">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
end
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<true xpath="count(//flow/block[1]/lineArea/viewport) = 1" fail-msg="viewport area not found"/>
<true xpath="count(//flow/block[1]/lineArea/viewport/foreignObject) = 1" fail-msg="foreign object area not found"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpd"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpda"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipd"/>
<eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipda"/>
</checks>
</testcase>

+ 59
- 59
test/layoutengine/testcases/ifo3.xml Visa fil

@@ -1,59 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks the borders and the like for instream-foreign-object.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="orange">
<fo:instream-foreign-object content-width="20pt" content-height="20pt" border="solid 5pt" padding="5pt" background-color="white">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/>
<eval expected="color=#ffffff,repeat=0,horiz=0,vertical=0" xpath="//flow/block[1]/lineArea/viewport/@background"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks the borders and the like for instream-foreign-object.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="orange">
<fo:instream-foreign-object content-width="20pt" content-height="20pt" border="solid 5pt" padding="5pt" background-color="white">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/>
<eval expected="color=#ffffff,repeat=0,horiz=0,vertical=0" xpath="//flow/block[1]/lineArea/viewport/@background"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/>
<eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/>
<eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/>
</checks>
</testcase>

+ 1
- 1
test/layoutengine/testcases/letter-spacing1.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: letter-spacing1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 1
- 1
test/layoutengine/testcases/letter-spacing2.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 1
- 1
test/layoutengine/testcases/letter-spacing3.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 73
- 73
test/layoutengine/testcases/line-layout2.xml Visa fil

@@ -1,73 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks normal line layout. We test the reported heights of various text elements.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple" page-height="5in" page-width="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block id="first">normal text</fo:block>
<fo:block><fo:page-number/></fo:block>
<fo:block><fo:page-number-citation ref-id="first"/></fo:block>
<fo:block><fo:wrapper>wrapped</fo:wrapper></fo:block>
<fo:block><fo:inline>inlined</fo:inline></fo:block>
<fo:block><fo:character character="x"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
<eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/>
<eval expected="10266" xpath="//flow/block[1]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[2]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[3]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[4]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[5]/lineArea/inlineparent/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[6]/lineArea/char/@vpos"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks normal line layout. We test the reported heights of various text elements.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple" page-height="5in" page-width="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block id="first">normal text</fo:block>
<fo:block><fo:page-number/></fo:block>
<fo:block><fo:page-number-citation ref-id="first"/></fo:block>
<fo:block><fo:wrapper>wrapped</fo:wrapper></fo:block>
<fo:block><fo:inline>inlined</fo:inline></fo:block>
<fo:block><fo:character character="x"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
<eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/>
<eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/>
<eval expected="10266" xpath="//flow/block[1]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[2]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[3]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[4]/lineArea/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[5]/lineArea/inlineparent/text/@vpos"/>
<eval expected="10266" xpath="//flow/block[6]/lineArea/char/@vpos"/>
</checks>
</testcase>

+ 101
- 101
test/layoutengine/testcases/list4.xml Visa fil

@@ -1,101 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks lists. Checks for the presence of space-before and space-after on list-items.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>test</fo:block>
<fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item space-before="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before="1em" space-after="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-after="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks lists. Checks for the presence of space-before and space-after on list-items.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>test</fo:block>
<fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item space-before="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before="1em" space-after="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-after="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>

+ 110
- 110
test/layoutengine/testcases/list4a.xml Visa fil

@@ -1,110 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks lists. Checks for the presence of space-before and space-after
on list-items. In this case, min/opt/max don't have the same value.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>test</fo:block>
<fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item space-before.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before.optimum="1em" space-after.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-after.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<!-- The following check makes sure that the content doesn't overlap the available region -->
<true xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/@bpda &lt;= //pageViewport[@nr=1]/page/regionViewport/regionBody/@bpda"
fail-msg="The span content must not exceed the available space given by the region-body!"/>
<!-- This check currently breaks because the breaker uses the minimum values (0pt)
instead of optimum and the addAreas stage doesn't create smaller space-before/after
spacers. -->
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/> <!-- TODO Check shrink/stretch -->
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks lists. Checks for the presence of space-before and space-after
on list-items. In this case, min/opt/max don't have the same value.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>test</fo:block>
<fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item space-before.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-before.optimum="1em" space-after.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item space-after.optimum="1em">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<!-- The following check makes sure that the content doesn't overlap the available region -->
<true xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/@bpda &lt;= //pageViewport[@nr=1]/page/regionViewport/regionBody/@bpda"
fail-msg="The span content must not exceed the available space given by the region-body!"/>
<!-- This check currently breaks because the breaker uses the minimum values (0pt)
instead of optimum and the addAreas stage doesn't create smaller space-before/after
spacers. -->
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/> <!-- TODO Check shrink/stretch -->
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<glue w="12000"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>

+ 98
- 98
test/layoutengine/testcases/multi-column1a.xml Visa fil

@@ -1,98 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks multi-column documents. Normal multi-column document breaking over more than one page.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="360pt" page-height="2in">
<fo:region-body column-count="2" column-gap="20pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block background-color="orange">line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5</fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11</fo:block>
<fo:block>line12</fo:block>
<fo:block>line13</fo:block>
<fo:block>line14</fo:block>
<fo:block>line15</fo:block>
<fo:block>line16</fo:block>
<fo:block>line17</fo:block>
<fo:block>line18</fo:block>
<fo:block>line19</fo:block>
<fo:block>line20</fo:block>
<fo:block>line21</fo:block>
<fo:block>line22</fo:block>
<fo:block>line23</fo:block>
<fo:block>line24</fo:block>
<fo:block>line25</fo:block>
<fo:block>line26</fo:block>
<fo:block>line27</fo:block>
<fo:block>line28</fo:block>
<fo:block>line29</fo:block>
<fo:block>line30</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<!-- *** page 1 *** -->
<eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span)"/>
<!-- room for 10 lines -->
<eval expected="10" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/@bpd div 14400"/>
<!-- 2 columns -->
<eval expected="2" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow)"/>
<!-- 10 lines in first column -->
<eval expected="10" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[1]/block)"/>
<eval expected="10" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[1]/@bpd div 14400"/>
<!-- 10 lines in second column -->
<eval expected="10" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[2]/block)"/>
<eval expected="10" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[2]/@bpd div 14400"/>
<!-- *** page 2 *** -->
<eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span)"/>
<!-- room for 10 lines -->
<eval expected="10" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/@bpd div 14400"/>
<!-- 2 columns -->
<eval expected="2" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow)"/>
<!-- 10 lines in first column -->
<eval expected="10" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[1]/block)"/>
<eval expected="10" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[1]/@bpd div 14400"/>
<!-- 0 lines in second column -->
<eval expected="0" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[2]/block)"/>
<eval expected="0" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[2]/@bpd div 14400"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks multi-column documents. Normal multi-column document breaking over more than one page.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="360pt" page-height="2in">
<fo:region-body column-count="2" column-gap="20pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block background-color="orange">line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5</fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11</fo:block>
<fo:block>line12</fo:block>
<fo:block>line13</fo:block>
<fo:block>line14</fo:block>
<fo:block>line15</fo:block>
<fo:block>line16</fo:block>
<fo:block>line17</fo:block>
<fo:block>line18</fo:block>
<fo:block>line19</fo:block>
<fo:block>line20</fo:block>
<fo:block>line21</fo:block>
<fo:block>line22</fo:block>
<fo:block>line23</fo:block>
<fo:block>line24</fo:block>
<fo:block>line25</fo:block>
<fo:block>line26</fo:block>
<fo:block>line27</fo:block>
<fo:block>line28</fo:block>
<fo:block>line29</fo:block>
<fo:block>line30</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<!-- *** page 1 *** -->
<eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span)"/>
<!-- room for 10 lines -->
<eval expected="10" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/@bpd div 14400"/>
<!-- 2 columns -->
<eval expected="2" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow)"/>
<!-- 10 lines in first column -->
<eval expected="10" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[1]/block)"/>
<eval expected="10" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[1]/@bpd div 14400"/>
<!-- 10 lines in second column -->
<eval expected="10" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[2]/block)"/>
<eval expected="10" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow[2]/@bpd div 14400"/>
<!-- *** page 2 *** -->
<eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span)"/>
<!-- room for 10 lines -->
<eval expected="10" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/@bpd div 14400"/>
<!-- 2 columns -->
<eval expected="2" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow)"/>
<!-- 10 lines in first column -->
<eval expected="10" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[1]/block)"/>
<eval expected="10" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[1]/@bpd div 14400"/>
<!-- 0 lines in second column -->
<eval expected="0" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[2]/block)"/>
<eval expected="0" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow[2]/@bpd div 14400"/>
</checks>
</testcase>

+ 103
- 103
test/layoutengine/testcases/multi-column2a.xml Visa fil

@@ -1,103 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks multi-column documents. This test is a special regression test
(a section that is not the first span group, is not spanned, is forced to be
balanced and breaks over a page).
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="320pt" page-height="4in" margin="20pt">
<fo:region-body column-count="3" column-gap="10pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block>line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5</fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11</fo:block>
<fo:block>line12</fo:block>
<fo:block>line13</fo:block>
</fo:block>
<fo:block span="all">
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
</fo:block>
<fo:block> <!-- this is the interesting block for this test -->
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block>line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5</fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11</fo:block>
<fo:block>line12</fo:block>
<fo:block>line13</fo:block>
<fo:block>line14</fo:block>
<fo:block>line15</fo:block>
<fo:block>line16</fo:block>
<fo:block>line17</fo:block>
<fo:block>line18</fo:block>
<fo:block>line19</fo:block>
<fo:block>line20</fo:block>
<fo:block>line21</fo:block>
<fo:block>line22</fo:block>
<fo:block>line23</fo:block>
<fo:block>line24</fo:block>
<fo:block>line25</fo:block>
</fo:block>
<fo:block span="all"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<eval expected="2" xpath="count(//pageViewport[@nr=1]//lineArea[.='line6'])"/>
<!-- the bug cause the second "line7" block to be painted on page 1 instead of 2 -->
<eval expected="1" xpath="count(//pageViewport[@nr=1]//lineArea[.='line7'])"/>
<eval expected="1" xpath="count(//pageViewport[@nr=2]//lineArea[.='line7'])"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks multi-column documents. This test is a special regression test
(a section that is not the first span group, is not spanned, is forced to be
balanced and breaks over a page).
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="320pt" page-height="4in" margin="20pt">
<fo:region-body column-count="3" column-gap="10pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block>line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5</fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11</fo:block>
<fo:block>line12</fo:block>
<fo:block>line13</fo:block>
</fo:block>
<fo:block span="all">
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
<fo:block>This line is spanned over all columns.</fo:block>
</fo:block>
<fo:block> <!-- this is the interesting block for this test -->
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block>line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5</fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11</fo:block>
<fo:block>line12</fo:block>
<fo:block>line13</fo:block>
<fo:block>line14</fo:block>
<fo:block>line15</fo:block>
<fo:block>line16</fo:block>
<fo:block>line17</fo:block>
<fo:block>line18</fo:block>
<fo:block>line19</fo:block>
<fo:block>line20</fo:block>
<fo:block>line21</fo:block>
<fo:block>line22</fo:block>
<fo:block>line23</fo:block>
<fo:block>line24</fo:block>
<fo:block>line25</fo:block>
</fo:block>
<fo:block span="all"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageViewport)"/>
<eval expected="2" xpath="count(//pageViewport[@nr=1]//lineArea[.='line6'])"/>
<!-- the bug cause the second "line7" block to be painted on page 1 instead of 2 -->
<eval expected="1" xpath="count(//pageViewport[@nr=1]//lineArea[.='line7'])"/>
<eval expected="1" xpath="count(//pageViewport[@nr=2]//lineArea[.='line7'])"/>
</checks>
</testcase>

+ 67
- 67
test/layoutengine/testcases/multi-column3.xml Visa fil

@@ -1,67 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks multi-column documents. This test: footnotes in multi-column documents (no spans).
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="360pt" page-height="2in">
<fo:region-body column-count="2" column-gap="20pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:static-content flow-name="xsl-footnote-separator">
<fo:block border-top="solid 5pt red"/>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block>line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5<fo:footnote><fo:inline>x</fo:inline><fo:footnote-body><fo:block background-color="orange">A footnote</fo:block></fo:footnote-body></fo:footnote></fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11<fo:footnote><fo:inline>x</fo:inline><fo:footnote-body><fo:block background-color="orange">Another footnote on the second column</fo:block></fo:footnote-body></fo:footnote></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="1" xpath="count(//pageViewport)"/>
<eval expected="1" xpath="count(//regionBody/mainReference/span)"/>
<!-- room for 7 lines -->
<eval expected="7" xpath="//regionBody/mainReference/span/@bpd div 14400"/>
<!-- 2 columns -->
<eval expected="2" xpath="count(//regionBody/mainReference/span/flow)"/>
<!-- 7 lines in first column -->
<eval expected="7" xpath="count(//regionBody/mainReference/span/flow[1]/block)"/>
<eval expected="7" xpath="//regionBody/mainReference/span/flow[1]/@bpd div 14400"/>
<!-- 4 lines in second column -->
<eval expected="4" xpath="count(//regionBody/mainReference/span/flow[2]/block)"/>
<eval expected="4" xpath="//regionBody/mainReference/span/flow[2]/@bpd div 14400"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks multi-column documents. This test: footnotes in multi-column documents (no spans).
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="360pt" page-height="2in">
<fo:region-body column-count="2" column-gap="20pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:static-content flow-name="xsl-footnote-separator">
<fo:block border-top="solid 5pt red"/>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>line1</fo:block>
<fo:block>line2</fo:block>
<fo:block>line3</fo:block>
<fo:block>line4</fo:block>
<fo:block>line5<fo:footnote><fo:inline>x</fo:inline><fo:footnote-body><fo:block background-color="orange">A footnote</fo:block></fo:footnote-body></fo:footnote></fo:block>
<fo:block>line6</fo:block>
<fo:block>line7</fo:block>
<fo:block>line8</fo:block>
<fo:block>line9</fo:block>
<fo:block>line10</fo:block>
<fo:block>line11<fo:footnote><fo:inline>x</fo:inline><fo:footnote-body><fo:block background-color="orange">Another footnote on the second column</fo:block></fo:footnote-body></fo:footnote></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="1" xpath="count(//pageViewport)"/>
<eval expected="1" xpath="count(//regionBody/mainReference/span)"/>
<!-- room for 7 lines -->
<eval expected="7" xpath="//regionBody/mainReference/span/@bpd div 14400"/>
<!-- 2 columns -->
<eval expected="2" xpath="count(//regionBody/mainReference/span/flow)"/>
<!-- 7 lines in first column -->
<eval expected="7" xpath="count(//regionBody/mainReference/span/flow[1]/block)"/>
<eval expected="7" xpath="//regionBody/mainReference/span/flow[1]/@bpd div 14400"/>
<!-- 4 lines in second column -->
<eval expected="4" xpath="count(//regionBody/mainReference/span/flow[2]/block)"/>
<eval expected="4" xpath="//regionBody/mainReference/span/flow[2]/@bpd div 14400"/>
</checks>
</testcase>

+ 113
- 113
test/layoutengine/testcases/page-number-citation2.xml Visa fil

@@ -1,113 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks page-number-citations with all combinations of
definition-level and block-level IDs.
</p>
<p>
TODO:
Test table-and-caption and table-caption once implemented.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block id="block1">block1</fo:block>
<fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item id="item1">
<fo:list-item-label id="item1-label" end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body id="item1-body" start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
<fo:table id="table1" table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="100%"/>
<fo:table-header id="table-header1">
<fo:table-row>
<fo:table-cell>
<fo:block>header</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer id="table-footer1">
<fo:table-row>
<fo:table-cell>
<fo:block>footer</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body id="table-body1">
<fo:table-row id="table-row1">
<fo:table-cell id="table-cell1">
<fo:block>body-content</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block-container id="block-container1">
<fo:block>block-container-content</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body" font-size="8pt">
<fo:block><fo:page-number-citation ref-id="page-sequence1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="block1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="list1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="item1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="item1-label"/></fo:block>
<fo:block><fo:page-number-citation ref-id="item1-body"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-header1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-footer1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-body1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-row1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-cell1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="block-container1"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<true fail-msg="no ID for page-sequence" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/>
<true fail-msg="no ID for block" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/>
<true fail-msg="no ID for list-block" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/>
<true fail-msg="no ID for list-item" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/>
<true fail-msg="no ID for list-item-label" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/>
<true fail-msg="no ID for list-item-body" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/>
<true fail-msg="no ID for table" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[7]"/>
<true fail-msg="no ID for table-header" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[8]"/>
<true fail-msg="no ID for table-footer" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[9]"/>
<true fail-msg="no ID for table-body" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[10]"/>
<true fail-msg="no ID for table-row" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[11]"/>
<true fail-msg="no ID for table-cell" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[12]"/>
<true fail-msg="no ID for block-container" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[13]"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks page-number-citations with all combinations of
definition-level and block-level IDs.
</p>
<p>
TODO:
Test table-and-caption and table-caption once implemented.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block id="block1">block1</fo:block>
<fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
<fo:list-item id="item1">
<fo:list-item-label id="item1-label" end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body id="item1-body" start-indent="body-start()">
<fo:block>here is text in the list item body</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
<fo:table id="table1" table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="100%"/>
<fo:table-header id="table-header1">
<fo:table-row>
<fo:table-cell>
<fo:block>header</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer id="table-footer1">
<fo:table-row>
<fo:table-cell>
<fo:block>footer</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body id="table-body1">
<fo:table-row id="table-row1">
<fo:table-cell id="table-cell1">
<fo:block>body-content</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block-container id="block-container1">
<fo:block>block-container-content</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body" font-size="8pt">
<fo:block><fo:page-number-citation ref-id="page-sequence1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="block1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="list1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="item1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="item1-label"/></fo:block>
<fo:block><fo:page-number-citation ref-id="item1-body"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-header1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-footer1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-body1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-row1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="table-cell1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="block-container1"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<true fail-msg="no ID for page-sequence" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/>
<true fail-msg="no ID for block" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/>
<true fail-msg="no ID for list-block" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/>
<true fail-msg="no ID for list-item" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/>
<true fail-msg="no ID for list-item-label" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/>
<true fail-msg="no ID for list-item-body" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/>
<true fail-msg="no ID for table" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[7]"/>
<true fail-msg="no ID for table-header" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[8]"/>
<true fail-msg="no ID for table-footer" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[9]"/>
<true fail-msg="no ID for table-body" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[10]"/>
<true fail-msg="no ID for table-row" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[11]"/>
<true fail-msg="no ID for table-cell" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[12]"/>
<true fail-msg="no ID for block-container" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[13]"/>
</checks>
</testcase>

+ 89
- 89
test/layoutengine/testcases/page-number-citation3.xml Visa fil

@@ -1,89 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks page-number-citations with all combinations of
inline-level IDs.
</p>
<p>
TODO:
Test inline-container, bidi-override once implemented.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="20in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>text<fo:inline id="inline1">inline</fo:inline>text</fo:block>
<fo:block>text<fo:wrapper id="wrapper1">wrapper</fo:wrapper>text</fo:block>
<fo:block>text<!--fo:inline-container id="inline-container1"><fo:block>inline-container</fo:block></fo:inline-container-->text</fo:block>
<fo:block>text<fo:page-number id="page-number1"/>text</fo:block>
<fo:block>text<fo:page-number-citation id="page-number-citation1" ref-id="inline1"/>text</fo:block>
<fo:block>text<fo:leader id="leader1" leader-pattern="dots" leader-length="2cm"/>text</fo:block>
<fo:block>text<fo:character id="char1" character="X"/>text</fo:block>
<fo:block>text<!--fo:bidi-override id="bidi1" direction="ltr">bidi-override</fo:bidi-override-->text</fo:block>
<fo:block>text<fo:basic-link id="link1" internal-destination="page-number1">link</fo:basic-link>text</fo:block>
<fo:block>text<fo:instream-foreign-object id="ifo1" content-height="12pt">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>text</fo:block>
<fo:block>text<fo:external-graphic id="eg1" src="../../resources/images/bgimg72dpi.jpg" content-height="12pt"/>text</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body" font-size="8pt">
<fo:block><fo:page-number-citation ref-id="inline1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="wrapper1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="inline-container1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="page-number1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="page-number-citation1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="leader1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="char1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="bidi1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="link1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="ifo1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="eg1"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<true fail-msg="no ID for inline" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/>
<true fail-msg="no ID for wrapper" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/>
<true fail-msg="no ID for inline-container" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/>
<true fail-msg="no ID for page-number" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/>
<true fail-msg="no ID for page-number-citation" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/>
<true fail-msg="no ID for leader" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/>
<true fail-msg="no ID for character" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[7]"/>
<true fail-msg="no ID for bidi-override" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[8]"/>
<true fail-msg="no ID for basik-link" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[9]"/>
<true fail-msg="no ID for instream-foreign-object" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[10]"/>
<true fail-msg="no ID for external-graphic" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[11]"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks page-number-citations with all combinations of
inline-level IDs.
</p>
<p>
TODO:
Test inline-container, bidi-override once implemented.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="20in"
margin="20pt">
<fo:region-body background-color="yellow"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>text<fo:inline id="inline1">inline</fo:inline>text</fo:block>
<fo:block>text<fo:wrapper id="wrapper1">wrapper</fo:wrapper>text</fo:block>
<fo:block>text<!--fo:inline-container id="inline-container1"><fo:block>inline-container</fo:block></fo:inline-container-->text</fo:block>
<fo:block>text<fo:page-number id="page-number1"/>text</fo:block>
<fo:block>text<fo:page-number-citation id="page-number-citation1" ref-id="inline1"/>text</fo:block>
<fo:block>text<fo:leader id="leader1" leader-pattern="dots" leader-length="2cm"/>text</fo:block>
<fo:block>text<fo:character id="char1" character="X"/>text</fo:block>
<fo:block>text<!--fo:bidi-override id="bidi1" direction="ltr">bidi-override</fo:bidi-override-->text</fo:block>
<fo:block>text<fo:basic-link id="link1" internal-destination="page-number1">link</fo:basic-link>text</fo:block>
<fo:block>text<fo:instream-foreign-object id="ifo1" content-height="12pt">
<svg:svg viewBox="0 0 20 20">
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
<svg:rect x="5" y="5" width="15" height="15"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>text</fo:block>
<fo:block>text<fo:external-graphic id="eg1" src="../../resources/images/bgimg72dpi.jpg" content-height="12pt"/>text</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body" font-size="8pt">
<fo:block><fo:page-number-citation ref-id="inline1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="wrapper1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="inline-container1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="page-number1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="page-number-citation1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="leader1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="char1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="bidi1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="link1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="ifo1"/></fo:block>
<fo:block><fo:page-number-citation ref-id="eg1"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<true fail-msg="no ID for inline" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/>
<true fail-msg="no ID for wrapper" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/>
<true fail-msg="no ID for inline-container" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/>
<true fail-msg="no ID for page-number" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/>
<true fail-msg="no ID for page-number-citation" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/>
<true fail-msg="no ID for leader" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/>
<true fail-msg="no ID for character" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[7]"/>
<true fail-msg="no ID for bidi-override" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[8]"/>
<true fail-msg="no ID for basik-link" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[9]"/>
<true fail-msg="no ID for instream-foreign-object" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[10]"/>
<true fail-msg="no ID for external-graphic" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[11]"/>
</checks>
</testcase>

+ 75
- 75
test/layoutengine/testcases/table-body4.xml Visa fil

@@ -1,75 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks element-lists on tables, particularly a constellation where a single line
from one column might be printed alone while the rest of the content is broken over to
the next part.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="4in" page-height="1.4in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" widows="3" orphans="3">
<fo:flow flow-name="xsl-region-body">
<fo:block-container height="9*8400mpt">
<fo:block/>
</fo:block-container>
<fo:table font-size="8pt">
<fo:table-column column-width="10%"/>
<fo:table-column column-width="90%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>A</fo:block>
<fo:block>B</fo:block>
<!-- Note: The second "B" block is there to trigger a problem that was revealed in a earlier attempt at handling this special case. -->
</fo:table-cell>
<fo:table-cell>
<fo:block>Cras et felis faucibus justo fringilla tincidunt. Vivamus vitae wisi ut orci egestas bibendum. Nullam nunc orci, euismod non, pulvinar sit amet, aliquet a, leo. Aliquam dapibus, justo pulvinar euismod fringilla, neque ipsum pretium lorem, eget pharetra eros massa vel nulla. Ut lobortis enim id magna. Pellentesque sagittis. Etiam tristique arcu. Cras eu dolor. Praesent aliquam wisi sit amet enim. Nullam id diam.</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- Both 'A' and 'B' must be on the second page -->
<eval expected="2" xpath="//text[.='A']/ancestor::pageViewport/@nr"/>
<eval expected="2" xpath="//text[.='B']/ancestor::pageViewport/@nr"/>
<element-list category="breaker">
<box w="75600"/> <!-- block-container as spacer -->
<penalty w="0" p="0"/>
<box w="0"/>
<penalty w="9600" p="&gt;0"/>
<box w="0"/>
<penalty w="19200" p="&gt;0"/>
<box w="28800"/>
<penalty w="0" p="0"/>
<box w="28800"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks element-lists on tables, particularly a constellation where a single line
from one column might be printed alone while the rest of the content is broken over to
the next part.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="4in" page-height="1.4in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" widows="3" orphans="3">
<fo:flow flow-name="xsl-region-body">
<fo:block-container height="9*8400mpt">
<fo:block/>
</fo:block-container>
<fo:table font-size="8pt">
<fo:table-column column-width="10%"/>
<fo:table-column column-width="90%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>A</fo:block>
<fo:block>B</fo:block>
<!-- Note: The second "B" block is there to trigger a problem that was revealed in a earlier attempt at handling this special case. -->
</fo:table-cell>
<fo:table-cell>
<fo:block>Cras et felis faucibus justo fringilla tincidunt. Vivamus vitae wisi ut orci egestas bibendum. Nullam nunc orci, euismod non, pulvinar sit amet, aliquet a, leo. Aliquam dapibus, justo pulvinar euismod fringilla, neque ipsum pretium lorem, eget pharetra eros massa vel nulla. Ut lobortis enim id magna. Pellentesque sagittis. Etiam tristique arcu. Cras eu dolor. Praesent aliquam wisi sit amet enim. Nullam id diam.</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- Both 'A' and 'B' must be on the second page -->
<eval expected="2" xpath="//text[.='A']/ancestor::pageViewport/@nr"/>
<eval expected="2" xpath="//text[.='B']/ancestor::pageViewport/@nr"/>
<element-list category="breaker">
<box w="75600"/> <!-- block-container as spacer -->
<penalty w="0" p="0"/>
<box w="0"/>
<penalty w="9600" p="&gt;0"/>
<box w="0"/>
<penalty w="19200" p="&gt;0"/>
<box w="28800"/>
<penalty w="0" p="0"/>
<box w="28800"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>

+ 137
- 137
test/layoutengine/testcases/table-cell7.xml Visa fil

@@ -1,137 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks certain aspects of the area tree generation for table-cells.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="100%"/>
<fo:table-body>
<fo:table-cell starts-row="true">
<fo:block>plain block</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" border="solid 5pt" background-color="yellow">
<fo:block>cell with border</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" padding="5pt">
<fo:block background-color="orange">cell with padding</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" border="solid 5pt" padding="5pt" background-color="yellow">
<fo:block background-color="orange">cell with border and padding</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" border="solid 5pt" height="30pt" display-align="center">
<fo:block>cell with border and height</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" padding="5pt" height="30pt" display-align="center" background-color="yellow">
<fo:block background-color="orange">cell with padding and height</fo:block>
</fo:table-cell>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- row 1 -->
<eval expected="360000" xpath="//flow/block[1]/block[1]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[1]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/@bpd"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/@bpda"/>
<eval expected="360000" xpath="//flow/block[1]/block[1]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@bpd"/>
<!-- row 2 -->
<eval expected="5000" xpath="//flow/block[1]/block[2]/@left-offset"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[2]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[2]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/>
<eval expected="24400" xpath="//flow/block[1]/block[2]/@bpda"/>
<eval expected="350000" xpath="//flow/block[1]/block[2]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/block[1]/@bpd"/>
<!-- row 3 -->
<eval expected="5000" xpath="//flow/block[1]/block[3]/@left-offset"/>
<eval expected="38800" xpath="//flow/block[1]/block[3]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[3]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[3]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[3]/@bpd"/>
<eval expected="24400" xpath="//flow/block[1]/block[3]/@bpda"/>
<eval expected="350000" xpath="//flow/block[1]/block[3]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[3]/block[1]/@bpd"/>
<!-- row 4 -->
<eval expected="10000" xpath="//flow/block[1]/block[4]/@left-offset"/>
<eval expected="63200" xpath="//flow/block[1]/block[4]/@top-offset"/>
<eval expected="340000" xpath="//flow/block[1]/block[4]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[4]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[4]/@bpd"/>
<eval expected="34400" xpath="//flow/block[1]/block[4]/@bpda"/>
<eval expected="340000" xpath="//flow/block[1]/block[4]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[4]/block[1]/@bpd"/>
<!-- row 5 -->
<eval expected="5000" xpath="//flow/block[1]/block[5]/@left-offset"/>
<eval expected="97600" xpath="//flow/block[1]/block[5]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[5]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[5]/@ipda"/>
<eval expected="30000" xpath="//flow/block[1]/block[5]/@bpd"/>
<eval expected="40000" xpath="//flow/block[1]/block[5]/@bpda"/>
<eval expected="7800" xpath="//flow/block[1]/block[5]/block[1]/@bpd"/> <!--spacer-->
<eval expected="350000" xpath="//flow/block[1]/block[5]/block[2]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[5]/block[2]/@bpd"/>
<!-- row 6 -->
<eval expected="5000" xpath="//flow/block[1]/block[6]/@left-offset"/>
<eval expected="137600" xpath="//flow/block[1]/block[6]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[6]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[6]/@ipda"/>
<eval expected="30000" xpath="//flow/block[1]/block[6]/@bpd"/>
<eval expected="40000" xpath="//flow/block[1]/block[6]/@bpda"/>
<eval expected="7800" xpath="//flow/block[1]/block[6]/block[1]/@bpd"/> <!--spacer-->
<eval expected="350000" xpath="//flow/block[1]/block[6]/block[2]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[6]/block[2]/@bpd"/>
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="24400"/>
<penalty w="0" p="0"/>
<box w="24400"/>
<penalty w="0" p="0"/>
<box w="34400"/>
<penalty w="0" p="0"/>
<box w="40000"/>
<penalty w="0" p="0"/>
<box w="40000"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks certain aspects of the area tree generation for table-cells.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="100%"/>
<fo:table-body>
<fo:table-cell starts-row="true">
<fo:block>plain block</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" border="solid 5pt" background-color="yellow">
<fo:block>cell with border</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" padding="5pt">
<fo:block background-color="orange">cell with padding</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" border="solid 5pt" padding="5pt" background-color="yellow">
<fo:block background-color="orange">cell with border and padding</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" border="solid 5pt" height="30pt" display-align="center">
<fo:block>cell with border and height</fo:block>
</fo:table-cell>
<fo:table-cell starts-row="true" padding="5pt" height="30pt" display-align="center" background-color="yellow">
<fo:block background-color="orange">cell with padding and height</fo:block>
</fo:table-cell>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- row 1 -->
<eval expected="360000" xpath="//flow/block[1]/block[1]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[1]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/@bpd"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/@bpda"/>
<eval expected="360000" xpath="//flow/block[1]/block[1]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@bpd"/>
<!-- row 2 -->
<eval expected="5000" xpath="//flow/block[1]/block[2]/@left-offset"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[2]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[2]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/>
<eval expected="24400" xpath="//flow/block[1]/block[2]/@bpda"/>
<eval expected="350000" xpath="//flow/block[1]/block[2]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/block[1]/@bpd"/>
<!-- row 3 -->
<eval expected="5000" xpath="//flow/block[1]/block[3]/@left-offset"/>
<eval expected="38800" xpath="//flow/block[1]/block[3]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[3]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[3]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[3]/@bpd"/>
<eval expected="24400" xpath="//flow/block[1]/block[3]/@bpda"/>
<eval expected="350000" xpath="//flow/block[1]/block[3]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[3]/block[1]/@bpd"/>
<!-- row 4 -->
<eval expected="10000" xpath="//flow/block[1]/block[4]/@left-offset"/>
<eval expected="63200" xpath="//flow/block[1]/block[4]/@top-offset"/>
<eval expected="340000" xpath="//flow/block[1]/block[4]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[4]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[4]/@bpd"/>
<eval expected="34400" xpath="//flow/block[1]/block[4]/@bpda"/>
<eval expected="340000" xpath="//flow/block[1]/block[4]/block[1]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[4]/block[1]/@bpd"/>
<!-- row 5 -->
<eval expected="5000" xpath="//flow/block[1]/block[5]/@left-offset"/>
<eval expected="97600" xpath="//flow/block[1]/block[5]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[5]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[5]/@ipda"/>
<eval expected="30000" xpath="//flow/block[1]/block[5]/@bpd"/>
<eval expected="40000" xpath="//flow/block[1]/block[5]/@bpda"/>
<eval expected="7800" xpath="//flow/block[1]/block[5]/block[1]/@bpd"/> <!--spacer-->
<eval expected="350000" xpath="//flow/block[1]/block[5]/block[2]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[5]/block[2]/@bpd"/>
<!-- row 6 -->
<eval expected="5000" xpath="//flow/block[1]/block[6]/@left-offset"/>
<eval expected="137600" xpath="//flow/block[1]/block[6]/@top-offset"/>
<eval expected="350000" xpath="//flow/block[1]/block[6]/@ipd"/>
<eval expected="360000" xpath="//flow/block[1]/block[6]/@ipda"/>
<eval expected="30000" xpath="//flow/block[1]/block[6]/@bpd"/>
<eval expected="40000" xpath="//flow/block[1]/block[6]/@bpda"/>
<eval expected="7800" xpath="//flow/block[1]/block[6]/block[1]/@bpd"/> <!--spacer-->
<eval expected="350000" xpath="//flow/block[1]/block[6]/block[2]/@ipd"/>
<eval expected="14400" xpath="//flow/block[1]/block[6]/block[2]/@bpd"/>
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="24400"/>
<penalty w="0" p="0"/>
<box w="24400"/>
<penalty w="0" p="0"/>
<box w="34400"/>
<penalty w="0" p="0"/>
<box w="40000"/>
<penalty w="0" p="0"/>
<box w="40000"/>
<skip>3</skip>
</element-list>
</checks>
</testcase>

+ 70
- 70
test/layoutengine/testcases/table-column4.xml Visa fil

@@ -1,70 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks tables, especially table-columns. The column widths are specified through
the first row as described in http://www.w3.org/TR/CSS2/tables.html#width-layout.
</p>
<bugzilla>http://issues.apache.org/bugzilla/show_bug.cgi?id=35656</bugzilla>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="4in">
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>cell1</fo:block>
</fo:table-cell>
<fo:table-cell background-color="yellow" width="2in">
<fo:block>cell2</fo:block>
</fo:table-cell>
<fo:table-cell background-color="orange">
<fo:block>cell3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- cell 1 -->
<eval expected="cell1" xpath="//flow/block[1]/block[1]/block[1]/lineArea"/>
<eval expected="72000" xpath="//flow/block[1]/block[1]/@ipd"/>
<!-- cell 2 -->
<eval expected="cell2" xpath="//flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="144000" xpath="//flow/block[1]/block[2]/@ipd"/>
<!-- cell 3 -->
<eval expected="cell3" xpath="//flow/block[1]/block[3]/block[1]/lineArea"/>
<eval expected="72000" xpath="//flow/block[1]/block[3]/@ipd"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks tables, especially table-columns. The column widths are specified through
the first row as described in http://www.w3.org/TR/CSS2/tables.html#width-layout.
</p>
<bugzilla>http://issues.apache.org/bugzilla/show_bug.cgi?id=35656</bugzilla>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="4in">
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>cell1</fo:block>
</fo:table-cell>
<fo:table-cell background-color="yellow" width="2in">
<fo:block>cell2</fo:block>
</fo:table-cell>
<fo:table-cell background-color="orange">
<fo:block>cell3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- cell 1 -->
<eval expected="cell1" xpath="//flow/block[1]/block[1]/block[1]/lineArea"/>
<eval expected="72000" xpath="//flow/block[1]/block[1]/@ipd"/>
<!-- cell 2 -->
<eval expected="cell2" xpath="//flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="144000" xpath="//flow/block[1]/block[2]/@ipd"/>
<!-- cell 3 -->
<eval expected="cell3" xpath="//flow/block[1]/block[3]/block[1]/lineArea"/>
<eval expected="72000" xpath="//flow/block[1]/block[3]/@ipd"/>
</checks>
</testcase>

+ 1
- 1
test/layoutengine/testcases/word-spacing1.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 1
- 1
test/layoutengine/testcases/word-spacing2.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 1
- 1
test/layoutengine/testcases/word-spacing3.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 1
- 1
test/layoutengine/testcases/word-spacing4.xml Visa fil

@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
<!-- $Id$ -->
<testcase>
<info>
<p>

+ 48
- 48
test/layoutengine/testcases/wrapper1.xml Visa fil

@@ -1,48 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks fo:wrapper.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body">
<fo:block>block content <fo:wrapper font-style="italic" color="red">inline-level stuff inside wrapper on page <fo:page-number/></fo:wrapper> wrapper is finished.</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//flow/block/lineArea)"/>
<eval expected="4" xpath="count(//flow/block/lineArea[1]/text)"/>
<eval expected="14400" xpath="//flow/block/lineArea[1]/@bpda"/>
<eval expected="#000000" xpath="//flow/block/lineArea[1]/text[1]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[1]/text[2]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[1]/text[3]/@color"/>
<eval expected="#000000" xpath="//flow/block/lineArea[1]/text[4]/@color"/>
<eval expected="1" xpath="//flow/block/lineArea[1]/text[3]"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks fo:wrapper.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body">
<fo:block>block content <fo:wrapper font-style="italic" color="red">inline-level stuff inside wrapper on page <fo:page-number/></fo:wrapper> wrapper is finished.</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//flow/block/lineArea)"/>
<eval expected="4" xpath="count(//flow/block/lineArea[1]/text)"/>
<eval expected="14400" xpath="//flow/block/lineArea[1]/@bpda"/>
<eval expected="#000000" xpath="//flow/block/lineArea[1]/text[1]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[1]/text[2]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[1]/text[3]/@color"/>
<eval expected="#000000" xpath="//flow/block/lineArea[1]/text[4]/@color"/>
<eval expected="1" xpath="//flow/block/lineArea[1]/text[3]"/>
</checks>
</testcase>

+ 58
- 58
test/layoutengine/testcases/wrapper2.xml Visa fil

@@ -1,58 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks fo:wrapper with block-level content.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body">
<fo:block>block content <fo:wrapper color="red">inline<fo:block>a block inside the wrapper</fo:block>inline</fo:wrapper> wrapper is finished.</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- Just check if this really results in 3 lines. -->
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
<eval expected="3" xpath="count(//lineArea)"/>
<eval expected="2" xpath="count(//flow/block/*[1]/text)"/>
<eval expected="1" xpath="count(//flow/block/*[2]/lineArea/text)"/>
<eval expected="2" xpath="count(//flow/block/*[3]/text)"/>
<eval expected="#000000" xpath="//flow/block/lineArea[1]/text[1]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[1]/text[2]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/block[1]/lineArea/text[1]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[2]/text[1]/@color"/>
<eval expected="#000000" xpath="//flow/block/lineArea[2]/text[2]/@color"/>
</checks>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks fo:wrapper with block-level content.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal">
<fo:flow flow-name="xsl-region-body">
<fo:block>block content <fo:wrapper color="red">inline<fo:block>a block inside the wrapper</fo:block>inline</fo:wrapper> wrapper is finished.</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<!-- Just check if this really results in 3 lines. -->
<element-list category="breaker">
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<penalty w="0" p="0"/>
<box w="14400"/>
<skip>3</skip>
</element-list>
<eval expected="3" xpath="count(//lineArea)"/>
<eval expected="2" xpath="count(//flow/block/*[1]/text)"/>
<eval expected="1" xpath="count(//flow/block/*[2]/lineArea/text)"/>
<eval expected="2" xpath="count(//flow/block/*[3]/text)"/>
<eval expected="#000000" xpath="//flow/block/lineArea[1]/text[1]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[1]/text[2]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/block[1]/lineArea/text[1]/@color"/>
<eval expected="#ff0000" xpath="//flow/block/lineArea[2]/text[1]/@color"/>
<eval expected="#000000" xpath="//flow/block/lineArea[2]/text[2]/@color"/>
</checks>
</testcase>

Laddar…
Avbryt
Spara