123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <?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 painting of borders and border-style.
- </p>
- </info>
- <fo>
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <fo:layout-master-set>
- <fo:simple-page-master master-name="a4" page-width="210mm" page-height="297mm">
- <fo:region-body margin-top="100mm" margin-bottom="100mm"/>
- </fo:simple-page-master>
- </fo:layout-master-set>
- <fo:page-sequence master-reference="a4">
- <fo:flow flow-name="xsl-region-body">
- <fo:block>
- <fo:block>Following Table has border-width.conditionality="discard"</fo:block>
- <fo:table border-style="solid" border-width="1pt" border-color="black" border-collapse="separate" border-before-width.conditionality="discard" border-after-width.conditionality="discard">
- <fo:table-column column-width="50%"/>
- <fo:table-column column-width="50%"/>
- <fo:table-body>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>1-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>1-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>2-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>2-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>3-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>3-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>4-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>4-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>5-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>5-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>6-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>6-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>7-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>7-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>8-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>8-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- <fo:block>Next Table has border.conditionality="retain"</fo:block>
- <fo:table border-style="solid" border-width="1pt" border-color="black" border-collapse="separate" border-before-width.conditionality="retain" border-after-width.conditionality="retain">
- <fo:table-column column-width="50%"/>
- <fo:table-column column-width="50%"/>
- <fo:table-body>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>1-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>1-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>2-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>2-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>3-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>3-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>4-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>4-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>5-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>5-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>6-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>6-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>7-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>7-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="20mm">
- <fo:table-cell>
- <fo:block>8-1</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>8-2</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </fo:block>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <!-- page1 test: table should have before border but not after border-->
- <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@border-before"/>
- <eval expected="(none,#000000,0)" xpath="//pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@border-after"/>
- <!-- page2 test: table should have after but not before -->
- <eval expected="(none,#000000,0)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
- <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
- <!-- page3 test: table should have both before and after border -->
- <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
- <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
- <!-- page4 test: table should have both before and after border -->
- <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
- <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
- </checks>
- </testcase>
|