]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #36460 (first part):
authorJeremias Maerki <jeremias@apache.org>
Thu, 1 Sep 2005 12:51:47 +0000 (12:51 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 1 Sep 2005 12:51:47 +0000 (12:51 +0000)
Some minor cleanup and two bigger revamps of two cases
Submitted by: Manuel Mall <mm.at.arcus.com.au>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265711 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/background-image-list2.xml
test/layoutengine/testcases/background-image-table4.xml
test/layoutengine/testcases/background-image1.xml
test/layoutengine/testcases/background-image3.xml
test/layoutengine/testcases/list3.xml
test/layoutengine/testcases/margin-region3.xml
test/layoutengine/testcases/page-number-citation1.xml
test/layoutengine/testcases/page-number1.xml
test/layoutengine/testcases/page-number2.xml
test/layoutengine/testcases/page-number3.xml

index 9fa6ee7f3910ad6ce7055b536dced2119f2e92c0..fe0feac810fa4218fe5154485b2b8931dc22cff6 100644 (file)
@@ -1,83 +1,83 @@
-<?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
index b36bba6ce1b901d13d1fc7d70aa4a273fff2b396..9dcffe96e36bfeeae144b65e50493f8cf2201391 100644 (file)
-<?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
index 698708739cf65c23d56b065c142070576e0e485f..74b000f95faea2868924fa91163762f8e4171380 100644 (file)
 <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>
index ec99b964610eb18fa67c3af4fb0145b3e754da65..c5dbcd64a48d7a84b786f39b0a081a977358fe5b 100644 (file)
@@ -18,7 +18,7 @@
 <testcase>
   <info>
     <p>
-      This test checks background images.
+      This test checks background images on a region-body
     </p>
   </info>
   <variables>
index 4ee43d447448a3e721936d4ec978376b99f80e94..696b03e2bb49008b09580b6bb88ccd4c5fac11b2 100644 (file)
@@ -18,7 +18,7 @@
 <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>
index a4861456dde241dca9695a5abb54b3f0eb621c4c..5216ff0e2b44be71302e504a86e957b1b4aa6398 100644 (file)
-<?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
index cdee18916122c968981117c13b01a760e7101a9f..e481a86ac017f972130cf879898a792d1560f66b 100644 (file)
@@ -18,7 +18,7 @@
 <testcase>
   <info>
     <p>
-      This test checks do:page-number-citation.
+      This test checks fo:page-number-citation.
     </p>
   </info>
   <fo>
index 75fc21ca8303c26095e956b7e7cf91194cc46f41..46077fa66f4375ef538f2f91a45c6a24573902a2 100644 (file)
@@ -18,7 +18,7 @@
 <testcase>
   <info>
     <p>
-      This test checks do:page-number.
+      This test checks fo:page-number.
     </p>
   </info>
   <fo>
index de18b89389ae4df8adfd475be087aaef1f83eeed..365ee194481e4926f225ba1df46eec5cbee285f0 100644 (file)
@@ -18,7 +18,7 @@
 <testcase>
   <info>
     <p>
-      This test checks do:page-number.
+      This test checks fo:page-number.
     </p>
   </info>
   <fo>
index d9b7d946fd42f07b7533cb517ac94ffef55b5e2b..0d4a7e21fc70c784861f19542fa0ffc7014a70a8 100644 (file)
@@ -18,7 +18,7 @@
 <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