]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Checks for the prod-id traits in the area tree. prod-id identifies the producing...
authorJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 10:03:27 +0000 (10:03 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 10:03:27 +0000 (10:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225269 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/id1.xml [new file with mode: 0644]

diff --git a/test/layoutengine/testcases/id1.xml b/test/layoutengine/testcases/id1.xml
new file mode 100644 (file)
index 0000000..fddb2a1
--- /dev/null
@@ -0,0 +1,101 @@
+<?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 IDs on block-level FOs.\r
+    </p>\r
+    <p>\r
+      TODO:\r
+      Test table-and-caption and table-caption once implemented.\r
+    </p>\r
+    <p>\r
+      Notes:\r
+      The following FOs cannot be tested this way:\r
+      table-body, table-header, table-footer, table-row, \r
+      multi-switch, multi-case, multi-toggle, multi-properties, multi-property-set,\r
+      page-sequence.\r
+    </p>\r
+  </info>\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="5in" page-height="2in" \r
+              margin="20pt">\r
+          <fo:region-body background-color="yellow"/>\r
+        </fo:simple-page-master>\r
+      </fo:layout-master-set>\r
+      <fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">\r
+        <fo:flow flow-name="xsl-region-body">\r
+          <fo:block id="block1">block1</fo:block>\r
+          <fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt">\r
+            <fo:list-item id="item1">\r
+              <fo:list-item-label id="item1-label" end-indent="label-end()">\r
+                <fo:block>•</fo:block>\r
+              </fo:list-item-label>\r
+              <fo:list-item-body id="item1-body" start-indent="body-start()">\r
+                <fo:block>here is text in the list item body</fo:block>\r
+              </fo:list-item-body>\r
+            </fo:list-item>\r
+          </fo:list-block>\r
+          <fo:table id="table1" table-layout="fixed" border-collapse="separate">\r
+            <fo:table-column column-width="100%"/>\r
+            <fo:table-header id="table-header1">\r
+              <fo:table-row>\r
+                <fo:table-cell>\r
+                  <fo:block>header</fo:block>\r
+                </fo:table-cell>\r
+              </fo:table-row>\r
+            </fo:table-header>\r
+            <fo:table-footer id="table-footer1">\r
+              <fo:table-row>\r
+                <fo:table-cell>\r
+                  <fo:block>footer</fo:block>\r
+                </fo:table-cell>\r
+              </fo:table-row>\r
+            </fo:table-footer>\r
+            <fo:table-body id="table-body1">\r
+              <fo:table-row id="table-row1">\r
+                <fo:table-cell id="table-cell1">\r
+                  <fo:block>body-content</fo:block>\r
+                </fo:table-cell>\r
+              </fo:table-row>\r
+            </fo:table-body>\r
+          </fo:table>\r
+          <fo:block-container id="block-container1">\r
+            <fo:block>block-container-content</fo:block>\r
+          </fo:block-container>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="block1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@prod-id"/>\r
+    \r
+    <eval expected="list1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@prod-id"/>\r
+    <eval expected="item1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@prod-id"/>\r
+    <eval expected="item1-label" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[1]/@prod-id"/>\r
+    <eval expected="item1-body" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[2]/@prod-id"/>\r
+    \r
+    <eval expected="table1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/@prod-id"/>\r
+    <!-- table-header1, table-body1, table-footer1, table-row1 don't exist in the area tree and cannot be tested. -->\r
+    <eval expected="table-cell1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/block[2]/@prod-id"/>\r
+\r
+    <eval expected="block-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/@prod-id"/>\r
+  </checks>\r
+</testcase>\r