]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Renamed page-number3 to page-number-citation1.
authorJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 13:34:17 +0000 (13:34 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 13:34:17 +0000 (13:34 +0000)
Systematic ID-testing for most FOs. (there are still a few gaps)
Checks for border/padding/background on external-graphic and instream-foreign-object.

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

test/layoutengine/disabled-testcases.txt
test/layoutengine/testcases/external-graphic3.xml [new file with mode: 0644]
test/layoutengine/testcases/id2.xml [new file with mode: 0644]
test/layoutengine/testcases/ifo1.xml [new file with mode: 0644]
test/layoutengine/testcases/ifo3.xml [new file with mode: 0644]
test/layoutengine/testcases/page-number-citation1.xml [new file with mode: 0644]
test/layoutengine/testcases/page-number-citation2.xml [new file with mode: 0644]
test/layoutengine/testcases/page-number-citation3.xml [new file with mode: 0644]
test/layoutengine/testcases/page-number3.xml [deleted file]

index 989b5dcc97a85a14eedbfc078d6ba7ac9e6dc180..73069a6d6cbd6a3a70ace19af0975f61e367c5dd 100644 (file)
@@ -8,6 +8,8 @@ keep-with-previous5.xml
 list4a.xml
 multi-column3.xml
 normal-breaking4.xml
+page-number-citation2.xml
+page-number-citation3.xml
 table-border-collapse1.xml
 table-border-collapse2.xml
 table-column4.xml
diff --git a/test/layoutengine/testcases/external-graphic3.xml b/test/layoutengine/testcases/external-graphic3.xml
new file mode 100644 (file)
index 0000000..ba7b80b
--- /dev/null
@@ -0,0 +1,53 @@
+<?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 borders and the like on external-graphics.\r
+    </p>\r
+  </info>\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:block background-color="orange">\r
+            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" border="solid 5pt" padding="5pt" background-color="white"/>\r
+          </fo:block>\r
+          <fo:block>EOF</fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/>\r
+    <eval expected="color=#ffffff,repeat=0,horiz=0,vertical=0" xpath="//flow/block[1]/lineArea/viewport/@background"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/>\r
+  </checks>\r
+</testcase>\r
diff --git a/test/layoutengine/testcases/id2.xml b/test/layoutengine/testcases/id2.xml
new file mode 100644 (file)
index 0000000..323ffc7
--- /dev/null
@@ -0,0 +1,79 @@
+<?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 inline-level FOs.\r
+    </p>\r
+    <p>\r
+      TODO:\r
+      Test inline-container, bidi-override once implemented.\r
+    </p>\r
+    <p>\r
+      Notes:\r
+      The following FOs cannot be tested this way:\r
+      wrapper, initial-property-set.\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="20in" \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>text<fo:inline id="inline1">inline</fo:inline>text</fo:block>\r
+          <fo:block>text<fo:wrapper id="wrapper1">wrapper</fo:wrapper>text</fo:block>\r
+          <fo:block>text<!--fo:inline-container id="inline-container1"><fo:block>inline-container</fo:block></fo:inline-container-->text</fo:block>\r
+          <fo:block>text<fo:page-number id="page-number1"/>text</fo:block>\r
+          <fo:block>text<fo:page-number-citation id="page-number-citation1" ref-id="inline1"/>text</fo:block>\r
+          <fo:block>text<fo:leader id="leader1" leader-pattern="dots" leader-length="2cm"/>text</fo:block>\r
+          <fo:block>text<fo:character id="char1" character="X"/>text</fo:block>\r
+          <fo:block>text<!--fo:bidi-override id="bidi1" direction="ltr">bidi-override</fo:bidi-override-->text</fo:block>\r
+          <fo:block>text<fo:basic-link id="link1" internal-destination="page-number1">link</fo:basic-link>text</fo:block>\r
+          <fo:block>text<fo:instream-foreign-object id="ifo1" content-height="12pt">\r
+            <svg:svg viewBox="0 0 20 20">\r
+              <svg:g style="fill:red; stroke:#000000">\r
+                <svg:rect x="0" y="0" width="15" height="15"/>\r
+                <svg:rect x="5" y="5" width="15" height="15"/>\r
+              </svg:g>\r
+            </svg:svg>\r
+          </fo:instream-foreign-object>text</fo:block>\r
+          <fo:block>text<fo:external-graphic id="eg1" src="../../resources/images/bgimg72dpi.jpg" content-height="12pt"/>text</fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="inline1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/inlineparent/@prod-id"/>\r
+    <!-- wrapper skipped -->\r
+    <!--eval expected="inline-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea/???/@prod-id"/-->\r
+    <eval expected="page-number1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/lineArea/text[2]/@prod-id"/>\r
+    <eval expected="page-number-citation1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[5]/lineArea/text[2]/@prod-id"/>\r
+    <eval expected="leader1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[6]/lineArea/inlineparent/@prod-id"/>\r
+    <eval expected="char1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[7]/lineArea/char/@prod-id"/>\r
+    <!--eval expected="bidi1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[8]/lineArea/???/@prod-id"/-->\r
+    <eval expected="link1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[9]/lineArea/inlineparent/@prod-id"/>\r
+    <eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/@prod-id"/>\r
+    <eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/foreignObject/@prod-id"/>\r
+    <eval expected="eg1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[11]/lineArea/viewport/@prod-id"/>\r
+  </checks>\r
+</testcase>\r
diff --git a/test/layoutengine/testcases/ifo1.xml b/test/layoutengine/testcases/ifo1.xml
new file mode 100644 (file)
index 0000000..16e5c72
--- /dev/null
@@ -0,0 +1,56 @@
+<?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 the basics for instream-foreign-object.\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="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:block>start\r
+            <fo:instream-foreign-object content-width="20pt" content-height="20pt">\r
+              <svg:svg viewBox="0 0 20 20">\r
+                <svg:g style="fill:red; stroke:#000000">\r
+                  <svg:rect x="0" y="0" width="15" height="15"/>\r
+                  <svg:rect x="5" y="5" width="15" height="15"/>\r
+                </svg:g>\r
+              </svg:svg>\r
+            </fo:instream-foreign-object>\r
+            end\r
+          </fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <true xpath="count(//flow/block[1]/lineArea/viewport) = 1" fail-msg="viewport area not found"/>\r
+    <true xpath="count(//flow/block[1]/lineArea/viewport/foreignObject) = 1" fail-msg="foreign object area not found"/>\r
+    <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpd"/>\r
+    <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpda"/>\r
+    <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipd"/>\r
+    <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipda"/>\r
+  </checks>\r
+</testcase>\r
diff --git a/test/layoutengine/testcases/ifo3.xml b/test/layoutengine/testcases/ifo3.xml
new file mode 100644 (file)
index 0000000..fd7fb25
--- /dev/null
@@ -0,0 +1,59 @@
+<?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 the borders and the like for instream-foreign-object.\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="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:block background-color="orange">\r
+            <fo:instream-foreign-object content-width="20pt" content-height="20pt" border="solid 5pt" padding="5pt" background-color="white">\r
+              <svg:svg viewBox="0 0 20 20">\r
+                <svg:g style="fill:red; stroke:#000000">\r
+                  <svg:rect x="0" y="0" width="15" height="15"/>\r
+                  <svg:rect x="5" y="5" width="15" height="15"/>\r
+                </svg:g>\r
+              </svg:svg>\r
+            </fo:instream-foreign-object>\r
+          </fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/>\r
+    <eval expected="color=#ffffff,repeat=0,horiz=0,vertical=0" xpath="//flow/block[1]/lineArea/viewport/@background"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/>\r
+    <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/>\r
+    <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/>\r
+  </checks>\r
+</testcase>\r
diff --git a/test/layoutengine/testcases/page-number-citation1.xml b/test/layoutengine/testcases/page-number-citation1.xml
new file mode 100644 (file)
index 0000000..cdee189
--- /dev/null
@@ -0,0 +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 do:page-number-citation.
+    </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="master1" page-width="5in" page-height="1in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="master1" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block id="bof1">page: <fo:page-number/> of <fo:page-number-citation ref-id="eof1"/></fo:block>
+          <fo:block>page: <fo:page-number/>, bof1 is on page <fo:page-number-citation ref-id="bof1"/></fo:block>
+          <fo:block>page: <fo:page-number/>, bof2 is on page <fo:page-number-citation ref-id="bof2"/></fo:block>
+          <fo:block>page: <fo:page-number/></fo:block>
+          <fo:block break-before="page">page: <fo:page-number/></fo:block>
+          <fo:block>page: <fo:page-number/></fo:block>
+          <fo:block>page: <fo:page-number/> of <fo:page-number-citation ref-id="eof1"/></fo:block>
+          <fo:block id="eof1"/>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="master1" white-space-collapse="true" initial-page-number="11">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block id="bof2">page: <fo:page-number/> of <fo:page-number-citation ref-id="eof2"/></fo:block>
+          <fo:block>page: <fo:page-number/></fo:block>
+          <fo:block>page: <fo:page-number/></fo:block>
+          <fo:block>page: <fo:page-number/></fo:block>
+          <fo:block break-before="page">page: <fo:page-number/>, bof1 is on page <fo:page-number-citation ref-id="bof1"/></fo:block>
+          <fo:block>page: <fo:page-number/>, bof2 is on page <fo:page-number-citation ref-id="bof2"/></fo:block>
+          <fo:block>page: <fo:page-number/> of <fo:page-number-citation ref-id="eof2"/></fo:block>
+          <fo:block id="eof2"/>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="page: 1 of 2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
+    <eval expected="page: 1, bof1 is on page 1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
+    <eval expected="page: 1, bof2 is on page 11" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea"/>
+
+    <eval expected="page: 2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
+    <eval expected="page: 2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
+    <eval expected="page: 2 of 2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea"/>
+
+    <eval expected="page: 11 of 12" xpath="//pageViewport[3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
+    <eval expected="page: 11" xpath="//pageViewport[3]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
+
+    <eval expected="page: 12, bof1 is on page 1" xpath="//pageViewport[4]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
+    <eval expected="page: 12, bof2 is on page 11" xpath="//pageViewport[4]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
+    <eval expected="page: 12 of 12" xpath="//pageViewport[4]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea"/>
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/page-number-citation2.xml b/test/layoutengine/testcases/page-number-citation2.xml
new file mode 100644 (file)
index 0000000..1c8981e
--- /dev/null
@@ -0,0 +1,113 @@
+<?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 page-number-citations with all combinations of \r
+      definition-level and block-level IDs.\r
+    </p>\r
+    <p>\r
+      TODO:\r
+      Test table-and-caption and table-caption once implemented.\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="5in" \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:page-sequence master-reference="normal">\r
+        <fo:flow flow-name="xsl-region-body" font-size="8pt">\r
+          <fo:block><fo:page-number-citation ref-id="page-sequence1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="block1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="list1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="item1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="item1-label"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="item1-body"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="table1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="table-header1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="table-footer1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="table-body1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="table-row1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="table-cell1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="block-container1"/></fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <true fail-msg="no ID for page-sequence" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/>\r
+    <true fail-msg="no ID for block" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/>\r
+    <true fail-msg="no ID for list-block" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/>\r
+    <true fail-msg="no ID for list-item" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/>\r
+    <true fail-msg="no ID for list-item-label" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/>\r
+    <true fail-msg="no ID for list-item-body" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/>\r
+    <true fail-msg="no ID for table" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[7]"/>\r
+    <true fail-msg="no ID for table-header" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[8]"/>\r
+    <true fail-msg="no ID for table-footer" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[9]"/>\r
+    <true fail-msg="no ID for table-body" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[10]"/>\r
+    <true fail-msg="no ID for table-row" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[11]"/>\r
+    <true fail-msg="no ID for table-cell" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[12]"/>\r
+    <true fail-msg="no ID for block-container" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[13]"/>\r
+  </checks>\r
+</testcase>\r
diff --git a/test/layoutengine/testcases/page-number-citation3.xml b/test/layoutengine/testcases/page-number-citation3.xml
new file mode 100644 (file)
index 0000000..09082b5
--- /dev/null
@@ -0,0 +1,89 @@
+<?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 page-number-citations with all combinations of \r
+      inline-level IDs.\r
+    </p>\r
+    <p>\r
+      TODO:\r
+      Test inline-container, bidi-override once implemented.\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="20in" \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>text<fo:inline id="inline1">inline</fo:inline>text</fo:block>\r
+          <fo:block>text<fo:wrapper id="wrapper1">wrapper</fo:wrapper>text</fo:block>\r
+          <fo:block>text<!--fo:inline-container id="inline-container1"><fo:block>inline-container</fo:block></fo:inline-container-->text</fo:block>\r
+          <fo:block>text<fo:page-number id="page-number1"/>text</fo:block>\r
+          <fo:block>text<fo:page-number-citation id="page-number-citation1" ref-id="inline1"/>text</fo:block>\r
+          <fo:block>text<fo:leader id="leader1" leader-pattern="dots" leader-length="2cm"/>text</fo:block>\r
+          <fo:block>text<fo:character id="char1" character="X"/>text</fo:block>\r
+          <fo:block>text<!--fo:bidi-override id="bidi1" direction="ltr">bidi-override</fo:bidi-override-->text</fo:block>\r
+          <fo:block>text<fo:basic-link id="link1" internal-destination="page-number1">link</fo:basic-link>text</fo:block>\r
+          <fo:block>text<fo:instream-foreign-object id="ifo1" content-height="12pt">\r
+            <svg:svg viewBox="0 0 20 20">\r
+              <svg:g style="fill:red; stroke:#000000">\r
+                <svg:rect x="0" y="0" width="15" height="15"/>\r
+                <svg:rect x="5" y="5" width="15" height="15"/>\r
+              </svg:g>\r
+            </svg:svg>\r
+          </fo:instream-foreign-object>text</fo:block>\r
+          <fo:block>text<fo:external-graphic id="eg1" src="../../resources/images/bgimg72dpi.jpg" content-height="12pt"/>text</fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+      <fo:page-sequence master-reference="normal">\r
+        <fo:flow flow-name="xsl-region-body" font-size="8pt">\r
+          <fo:block><fo:page-number-citation ref-id="inline1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="wrapper1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="inline-container1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="page-number1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="page-number-citation1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="leader1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="char1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="bidi1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="link1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="ifo1"/></fo:block>\r
+          <fo:block><fo:page-number-citation ref-id="eg1"/></fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <true fail-msg="no ID for inline" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/>\r
+    <true fail-msg="no ID for wrapper" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/>\r
+    <true fail-msg="no ID for inline-container" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/>\r
+    <true fail-msg="no ID for page-number" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/>\r
+    <true fail-msg="no ID for page-number-citation" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/>\r
+    <true fail-msg="no ID for leader" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/>\r
+    <true fail-msg="no ID for character" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[7]"/>\r
+    <true fail-msg="no ID for bidi-override" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[8]"/>\r
+    <true fail-msg="no ID for basik-link" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[9]"/>\r
+    <true fail-msg="no ID for instream-foreign-object" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[10]"/>\r
+    <true fail-msg="no ID for external-graphic" xpath="'1' = //pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[11]"/>\r
+  </checks>\r
+</testcase>\r
diff --git a/test/layoutengine/testcases/page-number3.xml b/test/layoutengine/testcases/page-number3.xml
deleted file mode 100644 (file)
index cdee189..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?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 do:page-number-citation.
-    </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="master1" page-width="5in" page-height="1in">
-          <fo:region-body/>
-        </fo:simple-page-master>
-      </fo:layout-master-set>
-      <fo:page-sequence master-reference="master1" white-space-collapse="true">
-        <fo:flow flow-name="xsl-region-body">
-          <fo:block id="bof1">page: <fo:page-number/> of <fo:page-number-citation ref-id="eof1"/></fo:block>
-          <fo:block>page: <fo:page-number/>, bof1 is on page <fo:page-number-citation ref-id="bof1"/></fo:block>
-          <fo:block>page: <fo:page-number/>, bof2 is on page <fo:page-number-citation ref-id="bof2"/></fo:block>
-          <fo:block>page: <fo:page-number/></fo:block>
-          <fo:block break-before="page">page: <fo:page-number/></fo:block>
-          <fo:block>page: <fo:page-number/></fo:block>
-          <fo:block>page: <fo:page-number/> of <fo:page-number-citation ref-id="eof1"/></fo:block>
-          <fo:block id="eof1"/>
-        </fo:flow>
-      </fo:page-sequence>
-      <fo:page-sequence master-reference="master1" white-space-collapse="true" initial-page-number="11">
-        <fo:flow flow-name="xsl-region-body">
-          <fo:block id="bof2">page: <fo:page-number/> of <fo:page-number-citation ref-id="eof2"/></fo:block>
-          <fo:block>page: <fo:page-number/></fo:block>
-          <fo:block>page: <fo:page-number/></fo:block>
-          <fo:block>page: <fo:page-number/></fo:block>
-          <fo:block break-before="page">page: <fo:page-number/>, bof1 is on page <fo:page-number-citation ref-id="bof1"/></fo:block>
-          <fo:block>page: <fo:page-number/>, bof2 is on page <fo:page-number-citation ref-id="bof2"/></fo:block>
-          <fo:block>page: <fo:page-number/> of <fo:page-number-citation ref-id="eof2"/></fo:block>
-          <fo:block id="eof2"/>
-        </fo:flow>
-      </fo:page-sequence>
-    </fo:root>
-  </fo>
-  <checks>
-    <eval expected="page: 1 of 2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
-    <eval expected="page: 1, bof1 is on page 1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
-    <eval expected="page: 1, bof2 is on page 11" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea"/>
-
-    <eval expected="page: 2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
-    <eval expected="page: 2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
-    <eval expected="page: 2 of 2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea"/>
-
-    <eval expected="page: 11 of 12" xpath="//pageViewport[3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
-    <eval expected="page: 11" xpath="//pageViewport[3]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
-
-    <eval expected="page: 12, bof1 is on page 1" xpath="//pageViewport[4]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
-    <eval expected="page: 12, bof2 is on page 11" xpath="//pageViewport[4]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea"/>
-    <eval expected="page: 12 of 12" xpath="//pageViewport[4]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/lineArea"/>
-  </checks>
-</testcase>