Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

table_break-before_break-after.xml 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks breaks on fo:table.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt">
  27. <fo:region-body/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block>before the table</fo:block>
  33. <fo:table table-layout="fixed" width="100%" border-collapse="separate" border="4pt solid black"
  34. break-before="odd-page" break-after="odd-page">
  35. <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
  36. <fo:table-body>
  37. <fo:table-row>
  38. <fo:table-cell border="2pt solid blue" background-color="orange">
  39. <fo:block>cell1</fo:block>
  40. </fo:table-cell>
  41. <fo:table-cell border="2pt solid red">
  42. <fo:block>cell2</fo:block>
  43. </fo:table-cell>
  44. </fo:table-row>
  45. </fo:table-body>
  46. </fo:table>
  47. <fo:block>after the table</fo:block>
  48. </fo:flow>
  49. </fo:page-sequence>
  50. </fo:root>
  51. </fo>
  52. <checks>
  53. <eval expected="5" xpath="count(//pageViewport)"/>
  54. <!-- table -->
  55. <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/@bpd"/>
  56. <!--eval expected="26400" xpath="//pageViewport[@nr=3]//flow/block[1]/@bpda"/-->
  57. <!--eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[1]/@border-before"/-->
  58. <!--eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[1]/@border-after"/-->
  59. <!-- cell 1 -->
  60. <eval expected="14400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@bpd"/>
  61. <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@bpda"/>
  62. <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@border-before"/>
  63. <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@border-after"/>
  64. <!-- cell 2 -->
  65. <eval expected="14400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@bpd"/>
  66. <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@bpda"/>
  67. <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@border-before"/>
  68. <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@border-after"/>
  69. </checks>
  70. </testcase>