aboutsummaryrefslogtreecommitdiffstats
path: root/fop/test
diff options
context:
space:
mode:
Diffstat (limited to 'fop/test')
-rw-r--r--fop/test/layoutengine/standard-testcases/table_and_caption.xml75
-rw-r--r--fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml98
-rw-r--r--fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml98
3 files changed, 271 insertions, 0 deletions
diff --git a/fop/test/layoutengine/standard-testcases/table_and_caption.xml b/fop/test/layoutengine/standard-testcases/table_and_caption.xml
new file mode 100644
index 000000000..e5bdf1e50
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table_and_caption.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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 table with a caption
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-height="27.9cm" page-width="21.6cm">
+ <fo:region-body margin="1cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:table-and-caption border="solid 0.5mm black">
+ <fo:table-caption>
+ <fo:block text-align="center">test</fo:block>
+ </fo:table-caption>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>header1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>header2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="test" xpath="//block/block[1]//word"/>
+ <eval expected="header1" xpath="//block/block[2]/block[1]/block//word"/>
+ <eval expected="header2" xpath="//block/block[2]/block[2]/block//word"/>
+ <eval expected="cell1" xpath="//block/block[2]/block[3]/block//word"/>
+ <eval expected="cell2" xpath="//block/block[2]/block[4]/block//word"/>
+ <eval expected="(solid,#000000,1417)" xpath="//block/@border-start"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml b/fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml
new file mode 100644
index 000000000..fecebe494
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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 table with a caption
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-height="10cm" page-width="21.6cm">
+ <fo:region-body margin="1cm" column-count="2"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="40pt">test test test test test test test test test test test test </fo:block>
+ <fo:table-and-caption border="solid 0.5mm black" font-size="35pt">
+ <fo:table-caption>
+ <fo:block text-align="center">caption</fo:block>
+ </fo:table-caption>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>header1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>header2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="2" xpath="count(//pageViewport)"/>
+ <eval expected="test" xpath="//pageViewport[1]//flow[1]//word"/>
+ <eval expected="caption" xpath="//pageViewport[1]//flow[2]//word"/>
+ <eval expected="header1" xpath="//pageViewport[2]//word"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml b/fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml
new file mode 100644
index 000000000..c4552bcc6
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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 table with a caption
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-height="10cm" page-width="21.6cm">
+ <fo:region-body margin="1cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="40pt">test test test test test test test test test test test test </fo:block>
+ <fo:table-and-caption border="solid 0.5mm black" font-size="40pt">
+ <fo:table-caption>
+ <fo:block text-align="center">caption</fo:block>
+ </fo:table-caption>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>header1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>header2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <eval expected="test" xpath="//pageViewport[1]//word"/>
+ <eval expected="caption" xpath="//pageViewport[2]//word"/>
+ <eval expected="header1" xpath="//pageViewport[3]//word"/>
+ </checks>
+</testcase>