-<?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 background image on lists (list-block).
- </p>
- </info>
- <variables>
- <img>../../resources/images/bgimg300dpi.jpg</img>
- </variables>
- <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:list-block provisional-distance-between-starts="1in" provisional-label-separation="0.1in">
- <fo:list-item background-repeat="no-repeat" background-color="yellow" background-position-horizontal="center" background-position-vertical="center" background-image="##img">
- <fo:list-item-label end-indent="label-end()">
- <fo:block>label 1</fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
- body 1: We should have a background centered within this whole list item.
- We should have a background centered within this whole list item.
- We should have a background centered within this whole list item.
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block>label 2</fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
- body 2: We should have no background on this list item.
- We should have no background on this list item.
- We should have no background on this list item.
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block>label 3</fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
- body 3: We should have no background on this list item.
- We should have no background on this list item.
- We should have no background on this list item.
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </fo:list-block>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <eval expected="360000" xpath="//flow/block/block/@ipd"/>
- <eval expected="72000" xpath="//flow/block/block/@bpd"/>
- <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=156960,vertical=12960" xpath="//flow/block/block/@background"/>
- </checks>
-</testcase>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+ Copyright 2005 The Apache Software Foundation\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+ <info>\r
+ <p>\r
+ This test checks background image on lists (list-item).\r
+ </p>\r
+ </info>\r
+ <variables>\r
+ <img>../../resources/images/bgimg300dpi.jpg</img>\r
+ </variables>\r
+ <fo>\r
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">\r
+ <fo:layout-master-set>\r
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">\r
+ <fo:region-body/>\r
+ </fo:simple-page-master>\r
+ </fo:layout-master-set>\r
+ <fo:page-sequence master-reference="normal" white-space-collapse="true">\r
+ <fo:flow flow-name="xsl-region-body">\r
+ <fo:list-block provisional-distance-between-starts="1in" provisional-label-separation="0.1in">\r
+ <fo:list-item background-repeat="no-repeat" background-color="yellow" background-position-horizontal="center" background-position-vertical="center" background-image="##img">\r
+ <fo:list-item-label end-indent="label-end()">\r
+ <fo:block>label 1</fo:block>\r
+ </fo:list-item-label>\r
+ <fo:list-item-body start-indent="body-start()">\r
+ <fo:block>\r
+ body 1: We should have a background centered within this whole list item.\r
+ We should have a background centered within this whole list item.\r
+ We should have a background centered within this whole list item.\r
+ </fo:block>\r
+ </fo:list-item-body>\r
+ </fo:list-item>\r
+ <fo:list-item>\r
+ <fo:list-item-label end-indent="label-end()">\r
+ <fo:block>label 2</fo:block>\r
+ </fo:list-item-label>\r
+ <fo:list-item-body start-indent="body-start()">\r
+ <fo:block>\r
+ body 2: We should have no background on this list item.\r
+ We should have no background on this list item.\r
+ We should have no background on this list item.\r
+ </fo:block>\r
+ </fo:list-item-body>\r
+ </fo:list-item>\r
+ <fo:list-item>\r
+ <fo:list-item-label end-indent="label-end()">\r
+ <fo:block>label 3</fo:block>\r
+ </fo:list-item-label>\r
+ <fo:list-item-body start-indent="body-start()">\r
+ <fo:block>\r
+ body 3: We should have no background on this list item.\r
+ We should have no background on this list item.\r
+ We should have no background on this list item.\r
+ </fo:block>\r
+ </fo:list-item-body>\r
+ </fo:list-item>\r
+ </fo:list-block>\r
+ </fo:flow>\r
+ </fo:page-sequence>\r
+ </fo:root>\r
+ </fo>\r
+ <checks>\r
+ <eval expected="360000" xpath="//flow/block/block/@ipd"/>\r
+ <eval expected="72000" xpath="//flow/block/block/@bpd"/>\r
+ <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=156960,vertical=12960" xpath="//flow/block/block/@background"/>\r
+ </checks>\r
+</testcase>\r
-<?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 background image on a fo:table-cell.
- </p>
- </info>
- <variables>
- <img>../../resources/images/bgimg300dpi.jpg</img>
- </variables>
- <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:table>
- <fo:table-column column-number="1" />
- <fo:table-column column-number="2" />
- <fo:table-column column-number="3" />
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>Row 1 Col 1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>Row 1 Col 2</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>Row 1 Col 3</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img">
- <fo:block>Row 2 Col 1</fo:block>
- <fo:block>Row 2 Col 1</fo:block>
- <fo:block>Row 2 Col 1</fo:block>
- <fo:block>Row 2 Col 1</fo:block>
- <fo:block>Row 2 Col 1</fo:block>
- </fo:table-cell>
- <fo:table-cell padding="5pt" display-align="center" background-color="blue" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img">
- <fo:block>Row 2 Col 2</fo:block>
- </fo:table-cell>
- <fo:table-cell display-align="center" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img">
- <fo:block>Row 2 Col 3</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- <fo:block>Table with centered background images on row 2 col 1, and 3</fo:block>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <!-- first cell in row 2 -->
- <eval expected="120000" xpath="//flow/block/block[4]/@ipd"/>
- <eval expected="72000" xpath="//flow/block/block[4]/@bpd"/>
- <eval expected="72000" xpath="//flow/block/block[4]/@bpda"/>
- <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=36960,vertical=12960" xpath="//flow/block/block[4]/@background"/>
- <!-- second cell in row 2 -->
- <eval expected="110000" xpath="//flow/block/block[5]/@ipd"/>
- <eval expected="62000" xpath="//flow/block/block[5]/@bpd"/>
- <eval expected="72000" xpath="//flow/block/block[5]/@bpda"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=36960,vertical=12960" xpath="//flow/block/block[5]/@background"/>
- <!-- second cell in row 2 -->
- <eval expected="120000" xpath="//flow/block/block[6]/@ipd"/>
- <eval expected="72000" xpath="//flow/block/block[6]/@bpd"/>
- <eval expected="72000" xpath="//flow/block/block[6]/@bpda"/>
- <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=36960,vertical=12960" xpath="//flow/block/block[6]/@background"/>
- </checks>
-</testcase>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+ Copyright 2005 The Apache Software Foundation\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+ <info>\r
+ <p>\r
+ This test checks relative positioned background images on a fo:table-cell.\r
+ </p>\r
+ </info>\r
+ <variables>\r
+ <img>../../resources/images/box1.png</img>\r
+ </variables>\r
+ <fo>\r
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">\r
+ <fo:layout-master-set>\r
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="15pt">\r
+ <fo:region-body/>\r
+ </fo:simple-page-master>\r
+ </fo:layout-master-set>\r
+ <fo:page-sequence master-reference="normal" white-space-collapse="true">\r
+ <fo:flow flow-name="xsl-region-body">\r
+ <fo:table border-collapse="separate">\r
+ <fo:table-column />\r
+ <fo:table-column />\r
+ <fo:table-column />\r
+ <fo:table-body>\r
+ <fo:table-row>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="blue" \r
+ background-image="##img"\r
+ background-position-horizontal="right" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in top right corner</fo:block>\r
+ </fo:table-cell>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="green" \r
+ background-image="##img"\r
+ background-position-horizontal="right" \r
+ background-position-vertical="center" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in center right</fo:block>\r
+ </fo:table-cell>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="yellow" \r
+ background-image="##img"\r
+ background-position-horizontal="right" \r
+ background-position-vertical="bottom" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in bottom right corner</fo:block>\r
+ </fo:table-cell>\r
+ </fo:table-row>\r
+ <fo:table-row>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="yellow" \r
+ background-image="##img"\r
+ background-position-horizontal="center" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in top center</fo:block>\r
+ </fo:table-cell>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="blue" \r
+ background-image="##img"\r
+ background-position-horizontal="center" \r
+ background-position-vertical="center" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in center</fo:block>\r
+ </fo:table-cell>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="green" \r
+ background-image="##img"\r
+ background-position-horizontal="center" \r
+ background-position-vertical="bottom" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in bottom center</fo:block>\r
+ </fo:table-cell>\r
+ </fo:table-row>\r
+ <fo:table-row>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="green" \r
+ background-image="##img"\r
+ background-repeat="no-repeat">\r
+ <fo:block>image in top left</fo:block>\r
+ </fo:table-cell>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="yellow" \r
+ background-image="##img"\r
+ background-position-vertical="center" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in center left</fo:block>\r
+ </fo:table-cell>\r
+ <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="blue" \r
+ background-image="##img"\r
+ background-position-vertical="bottom" \r
+ background-repeat="no-repeat">\r
+ <fo:block>image in bottom left</fo:block>\r
+ </fo:table-cell>\r
+ </fo:table-row>\r
+ </fo:table-body>\r
+ </fo:table>\r
+ </fo:flow>\r
+ </fo:page-sequence>\r
+ </fo:root>\r
+ </fo>\r
+ <checks>\r
+ <!-- first cell in row 1 -->\r
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=0" xpath="//flow/block/block[1]/@background"/>\r
+ <!-- second cell in row 1 -->\r
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=20995" xpath="//flow/block/block[2]/@background"/>\r
+ <!-- third cell in row 1 -->\r
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=41991" xpath="//flow/block/block[3]/@background"/>\r
+ <!-- first cell in row 2 -->\r
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=0" xpath="//flow/block/block[4]/@background"/>\r
+ <!-- second cell in row 2 -->\r
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=20995" xpath="//flow/block/block[5]/@background"/>\r
+ <!-- third cell in row 2 -->\r
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=41991" xpath="//flow/block/block[6]/@background"/>\r
+ <!-- first cell in row 3 -->\r
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block/block[7]/@background"/>\r
+ <!-- second cell in row 3 -->\r
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=20995" xpath="//flow/block/block[8]/@background"/>\r
+ <!-- third cell in row 3 -->\r
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=41991" xpath="//flow/block/block[9]/@background"/>\r
+ </checks>\r
+</testcase>\r
<testcase>
<info>
<p>
- This test checks background images.
+ This test checks relative positioned background images on a fo:block-container.
</p>
</info>
<variables>
- <img>../../resources/images/bgimg300dpi.jpg</img>
+ <img>../../resources/images/box1.png</img>
</variables>
<fo>
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <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:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="15pt">
<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-container left="10pt" top="10pt" width="100pt" height="20pt" absolute-position="absolute" background-color="blue" background-image="none">
- <fo:block margin="0pt">FOP is fun!</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="0in" top="0in" width="1.5in" height="1in" absolute-position="absolute" background-color="blue"
+ background-image="##img"
+ background-position-horizontal="right"
+ background-repeat="no-repeat">
+ <fo:block>image in top right corner</fo:block>
</fo:block-container>
- <fo:block-container left="10pt" top="50pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-color="blue" background-repeat="no-repeat" background-image="##img">
- <fo:block margin="0pt">FOP is fun!</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="1.75in" top="0in" width="1.5in" height="1in" absolute-position="absolute" background-color="green"
+ background-image="##img"
+ background-position-horizontal="right"
+ background-position-vertical="center"
+ background-repeat="no-repeat">
+ <fo:block>image in center right</fo:block>
</fo:block-container>
- <fo:block-container left="150pt" top="50pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-horizontal="left" background-position-vertical="top" background-color="blue" background-repeat="no-repeat" background-image="##img">
- <fo:block margin="0pt">left/top</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="3.5in" top="0in" width="1.5in" height="1in" absolute-position="absolute" background-color="yellow"
+ background-image="##img"
+ background-position-horizontal="right"
+ background-position-vertical="bottom"
+ background-repeat="no-repeat">
+ <fo:block>image in bottom right corner</fo:block>
</fo:block-container>
- <fo:block-container left="10pt" top="150pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-horizontal="center" background-position-vertical="center" background-color="blue" background-repeat="no-repeat" background-image="##img">
- <fo:block margin="0pt">center/center</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="0in" top="1.25in" width="1.5in" height="1in" absolute-position="absolute" background-color="yellow"
+ background-image="##img"
+ background-position-horizontal="center"
+ background-repeat="no-repeat">
+ <fo:block>image in top center</fo:block>
</fo:block-container>
- <fo:block-container left="150pt" top="150pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-horizontal="right" background-position-vertical="bottom" background-color="blue" background-repeat="no-repeat" background-image="##img">
- <fo:block margin="0pt">right/bottom</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="1.75in" top="1.25in" width="1.5in" height="1in" absolute-position="absolute" background-color="blue"
+ background-image="##img"
+ background-position-horizontal="center"
+ background-position-vertical="center"
+ background-repeat="no-repeat">
+ <fo:block>image in center</fo:block>
</fo:block-container>
- <fo:block-container left="10pt" top="250pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-horizontal="5pt" background-position-vertical="5pt" background-color="blue" background-repeat="no-repeat" background-image="##img">
- <fo:block margin="0pt">5pt/5pt</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="3.5in" top="1.25in" width="1.5in" height="1in" absolute-position="absolute" background-color="green"
+ background-image="##img"
+ background-position-horizontal="center"
+ background-position-vertical="bottom"
+ background-repeat="no-repeat">
+ <fo:block>image in bottom center</fo:block>
</fo:block-container>
- <fo:block-container left="150pt" top="250pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-horizontal="20%" background-position-vertical="50%" background-color="blue" background-repeat="no-repeat" background-image="##img">
- <fo:block margin="0pt">20%/50%</fo:block>
+ <fo:block-container margin="0pt" padding="5pt" left="0in" top="2.5in" width="1.5in" height="1in" absolute-position="absolute" background-color="green"
+ background-image="##img"
+ background-repeat="no-repeat">
+ <fo:block>image in top left</fo:block>
+ </fo:block-container>
+ <fo:block-container margin="0pt" padding="5pt" left="1.75in" top="2.5in" width="1.5in" height="1in" absolute-position="absolute" background-color="yellow"
+ background-image="##img"
+ background-position-vertical="center"
+ background-repeat="no-repeat">
+ <fo:block>image in center left</fo:block>
+ </fo:block-container>
+ <fo:block-container margin="0pt" padding="5pt" left="3.5in" top="2.5in" width="1.5in" height="1in" absolute-position="absolute" background-color="blue"
+ background-image="##img"
+ background-position-vertical="bottom"
+ background-repeat="no-repeat">
+ <fo:block>image in bottom left</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
- <eval expected="color=#0000ff" xpath="//flow/block[1]/@background"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block[2]/@background"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block[3]/@background"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=31960,vertical=6960" xpath="//flow/block[4]/@background"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=63920,vertical=13920" xpath="//flow/block[5]/@background"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=5000,vertical=5000" xpath="//flow/block[6]/@background"/>
- <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=12784,vertical=6960" xpath="//flow/block[7]/@background"/>
+ <!-- first container in row 1 -->
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=77991,vertical=0" xpath="//flow/block[1]/@background"/>
+ <!-- second container in row 1 -->
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=77991,vertical=20995" xpath="//flow/block[2]/@background"/>
+ <!-- third container in row 1 -->
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=77991,vertical=41991" xpath="//flow/block[3]/@background"/>
+ <!-- first container in row 2 -->
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=38995,vertical=0" xpath="//flow/block[4]/@background"/>
+ <!-- second container in row 2 -->
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=38995,vertical=20995" xpath="//flow/block[5]/@background"/>
+ <!-- third container in row 2 -->
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=38995,vertical=41991" xpath="//flow/block[6]/@background"/>
+ <!-- first container in row 3 -->
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block[7]/@background"/>
+ <!-- second container in row 3 -->
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=20995" xpath="//flow/block[8]/@background"/>
+ <!-- third container in row 3 -->
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=41991" xpath="//flow/block[9]/@background"/>
</checks>
</testcase>
<testcase>
<info>
<p>
- This test checks background images.
+ This test checks background images on a region-body
</p>
</info>
<variables>
<testcase>
<info>
<p>
- This test checks lists. It is a regression test. list1 tested the indenting fine, but here there's
+ This test checks lists. It is a regression test. list-block tested the indenting fine, but here there's
a page margin that can result in wrong values if the reference area block ipd isn't reported correctly.
</p>
</info>
-<?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 relative margin on regions (region-body).
- </p>
- </info>
- <variables>
- <img>../../resources/images/bgimg300dpi.jpg</img>
- </variables>
- <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="3in" page-height="5in" margin="5%" writing-mode="rl">
- <fo:region-body margin-top="5%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" />
- <fo:region-before extent="5%" background-color="blue" precedence="true" />
- <fo:region-after extent="5%" background-color="green" precedence="true" />
- <fo:region-start extent="10%" background-color="red" />
- <fo:region-end extent="5%" background-color="orange" />
- </fo:simple-page-master>
- </fo:layout-master-set>
- <fo:page-sequence master-reference="normal" white-space-collapse="true">
- <fo:static-content flow-name="xsl-region-before">
- <fo:block>
- r e g i o n b e f o r e
- </fo:block>
- </fo:static-content>
- <fo:static-content flow-name="xsl-region-after">
- <fo:block>
- r e g i o n a f t e r
- </fo:block>
- </fo:static-content>
- <fo:static-content flow-name="xsl-region-start">
- <fo:block>
- r e g i o n s t a r t
- </fo:block>
- </fo:static-content>
- <fo:static-content flow-name="xsl-region-end">
- <fo:block>
- r e g i o n e n d
- </fo:block>
- </fo:static-content>
- <fo:flow flow-name="xsl-region-body">
- <fo:block>
- Demonstrates relative 5% margins on all regions and the page master.
- The page size is 5in x 3in. This gives top and bottom margins of 0.25in and
- left and right margins 0.15in.
- </fo:block>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <!-- The values in these checks are currently not correct. However, there is also a bug
- in the rl writing mode causing a swap of left and right margin. Both should be fixed at
- the same time. -->
- <!-- region before -->
- <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/>
- <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/>
- <eval expected="18000" xpath="//page/regionViewport[1]/@bpd"/>
- <eval expected="10800 18000 194400 18000" xpath="//page/regionViewport[1]/@rect"/>
- <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/>
- <eval expected="18000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/>
- <!-- region start -->
- <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/>
- <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/>
- <eval expected="288000" xpath="//page/regionViewport[2]/@bpd"/>
- <eval expected="10800 36000 10800 288000" xpath="//page/regionViewport[2]/@rect"/>
- <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/>
- <eval expected="288000" xpath="//page/regionViewport[2]/regionStart/@bpd"/>
- <!-- region end -->
- <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/>
- <eval expected="10800" xpath="//page/regionViewport[3]/@ipd"/>
- <eval expected="288000" xpath="//page/regionViewport[3]/@bpd"/>
- <eval expected="194400 36000 10800 288000" xpath="//page/regionViewport[3]/@rect"/>
- <eval expected="10800" xpath="//page/regionViewport[3]/regionEnd/@ipd"/>
- <eval expected="288000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/>
- <!-- region after -->
- <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/>
- <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/>
- <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/>
- <eval expected="10800 324000 194400 18000" xpath="//page/regionViewport[4]/@rect"/>
- <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/>
- <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/>
- <!-- region body -->
- <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/>
- <eval expected="172800" xpath="//page/regionViewport[5]/@ipd"/>
- <eval expected="288000" xpath="//page/regionViewport[5]/@bpd"/>
- <eval expected="21600 36000 172800 288000" xpath="//page/regionViewport[5]/@rect"/>
- <eval expected="172800" xpath="//page/regionViewport[5]/regionBody/@ipd"/>
- <eval expected="288000" xpath="//page/regionViewport[5]/regionBody/@bpd"/>
- </checks>
-</testcase>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+ Copyright 2005 The Apache Software Foundation\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+ <info>\r
+ <p>\r
+ This test checks relative margin on regions (region-body).\r
+ </p>\r
+ </info>\r
+ <variables>\r
+ <img>../../resources/images/bgimg300dpi.jpg</img>\r
+ </variables>\r
+ <fo>\r
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">\r
+ <fo:layout-master-set>\r
+ <fo:simple-page-master master-name="normal" page-width="3in" page-height="5in" margin="5%" writing-mode="rl">\r
+ <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" />\r
+ <fo:region-before extent="10%" background-color="blue" precedence="true" />\r
+ <fo:region-after extent="5%" background-color="green" precedence="true" />\r
+ <fo:region-start extent="10%" background-color="red" />\r
+ <fo:region-end extent="5%" background-color="orange" />\r
+ </fo:simple-page-master>\r
+ </fo:layout-master-set>\r
+ <fo:page-sequence master-reference="normal" white-space-collapse="true">\r
+ <fo:static-content flow-name="xsl-region-before">\r
+ <fo:block>\r
+ r e g i o n b e f o r e\r
+ </fo:block>\r
+ </fo:static-content>\r
+ <fo:static-content flow-name="xsl-region-after">\r
+ <fo:block>\r
+ r e g i o n a f t e r\r
+ </fo:block>\r
+ </fo:static-content>\r
+ <fo:static-content flow-name="xsl-region-start">\r
+ <fo:block>\r
+ r e g i o n s t a r t\r
+ </fo:block>\r
+ </fo:static-content>\r
+ <fo:static-content flow-name="xsl-region-end">\r
+ <fo:block>\r
+ r e g i o n e n d\r
+ </fo:block>\r
+ </fo:static-content>\r
+ <fo:flow flow-name="xsl-region-body">\r
+ <fo:block>\r
+ Demonstrates relative 5% margin on the page master, 10% margin on regions before\r
+ and start and 5% margin on regions after and end. Corresponding margins are set\r
+ on the region body. The page size is 5in x 3in. This gives top and right margins\r
+ of 0.25in and left and bottom margins of 0.15in.\r
+ </fo:block>\r
+ </fo:flow>\r
+ </fo:page-sequence>\r
+ </fo:root>\r
+ </fo>\r
+ <checks>\r
+ <!-- region before -->\r
+ <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/>\r
+ <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/>\r
+ <eval expected="36000" xpath="//page/regionViewport[1]/@bpd"/>\r
+ <eval expected="10800 18000 194400 36000" xpath="//page/regionViewport[1]/@rect"/>\r
+ <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/>\r
+ <eval expected="36000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/>\r
+ <!-- region start -->\r
+ <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/>\r
+ <eval expected="21600" xpath="//page/regionViewport[2]/@ipd"/>\r
+ <eval expected="270000" xpath="//page/regionViewport[2]/@bpd"/>\r
+ <eval expected="183600 54000 21600 270000" xpath="//page/regionViewport[2]/@rect"/>\r
+ <eval expected="21600" xpath="//page/regionViewport[2]/regionStart/@ipd"/>\r
+ <eval expected="270000" xpath="//page/regionViewport[2]/regionStart/@bpd"/>\r
+ <!-- region end -->\r
+ <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/>\r
+ <eval expected="10800" xpath="//page/regionViewport[3]/@ipd"/>\r
+ <eval expected="270000" xpath="//page/regionViewport[3]/@bpd"/>\r
+ <eval expected="10800 54000 10800 270000" xpath="//page/regionViewport[3]/@rect"/>\r
+ <eval expected="10800" xpath="//page/regionViewport[3]/regionEnd/@ipd"/>\r
+ <eval expected="270000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/>\r
+ <!-- region after -->\r
+ <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/>\r
+ <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/>\r
+ <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/>\r
+ <eval expected="10800 324000 194400 18000" xpath="//page/regionViewport[4]/@rect"/>\r
+ <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/>\r
+ <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/>\r
+ <!-- region body -->\r
+ <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/>\r
+ <eval expected="162000" xpath="//page/regionViewport[5]/@ipd"/>\r
+ <eval expected="270000" xpath="//page/regionViewport[5]/@bpd"/>\r
+ <eval expected="21600 54000 162000 270000" xpath="//page/regionViewport[5]/@rect"/>\r
+ <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@ipd"/>\r
+ <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@bpd"/>\r
+ </checks>\r
+</testcase>\r
<testcase>
<info>
<p>
- This test checks do:page-number-citation.
+ This test checks fo:page-number-citation.
</p>
</info>
<fo>
<testcase>
<info>
<p>
- This test checks do:page-number.
+ This test checks fo:page-number.
</p>
</info>
<fo>
<testcase>
<info>
<p>
- This test checks do:page-number.
+ This test checks fo:page-number.
</p>
</info>
<fo>
<testcase>\r
<info>\r
<p>\r
- This test checks do:page-number.\r
+ This test checks fo:page-number.\r
</p>\r
</info>\r
<fo>\r