You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

block_white-space_5.xml 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 white space handling between block-level elements nested in blocks.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  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>
  33. <fo:block border="0.2pt solid red">block1</fo:block>
  34. <fo:block border="0.2pt solid red">block2</fo:block>
  35. </fo:block>
  36. <fo:block space-before="1em">
  37. <fo:block-container border="0.2pt solid blue">
  38. <fo:block>block1</fo:block>
  39. </fo:block-container>
  40. <fo:block-container border="0.2pt solid blue">
  41. <fo:block>block2</fo:block>
  42. </fo:block-container>
  43. </fo:block>
  44. <fo:block space-before="1em">
  45. <fo:table table-layout="fixed" width="100%" border="0.2pt solid green" border-collapse="separate">
  46. <fo:table-column column-width="proportional-column-width(1)"/>
  47. <fo:table-body>
  48. <fo:table-row>
  49. <fo:table-cell>
  50. <fo:block>Table 1 Cell</fo:block>
  51. </fo:table-cell>
  52. </fo:table-row>
  53. </fo:table-body>
  54. </fo:table>
  55. <fo:table table-layout="fixed" width="100%" border="0.2pt solid green" border-collapse="separate">
  56. <fo:table-column column-width="proportional-column-width(1)"/>
  57. <fo:table-body>
  58. <fo:table-row>
  59. <fo:table-cell>
  60. <fo:block>Table 2 Cell</fo:block>
  61. </fo:table-cell>
  62. </fo:table-row>
  63. </fo:table-body>
  64. </fo:table>
  65. </fo:block>
  66. <fo:block space-before="1em">
  67. <fo:list-block border="0.2pt solid orange">
  68. <fo:list-item>
  69. <fo:list-item-label>
  70. <fo:block>x</fo:block>
  71. </fo:list-item-label>
  72. <fo:list-item-body>
  73. <fo:block>block1</fo:block>
  74. </fo:list-item-body>
  75. </fo:list-item>
  76. </fo:list-block>
  77. <fo:list-block border="0.2pt solid orange">
  78. <fo:list-item>
  79. <fo:list-item-label>
  80. <fo:block>x</fo:block>
  81. </fo:list-item-label>
  82. <fo:list-item-body>
  83. <fo:block>block2</fo:block>
  84. </fo:list-item-body>
  85. </fo:list-item>
  86. </fo:list-block>
  87. </fo:block>
  88. </fo:flow>
  89. </fo:page-sequence>
  90. </fo:root>
  91. </fo>
  92. <checks>
  93. <!-- No line areas must be generated between the nested elements -->
  94. <eval expected="0" xpath="count(//flow/block[1]/lineArea)"/>
  95. <eval expected="0" xpath="count(//flow/block[2]/lineArea)"/>
  96. <eval expected="0" xpath="count(//flow/block[3]/lineArea)"/>
  97. <eval expected="0" xpath="count(//flow/block[4]/lineArea)"/>
  98. </checks>
  99. </testcase>