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_space-before_space-after_9.xml 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright 2005 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!-- $Id$ -->
  15. <testcase>
  16. <info>
  17. <p>
  18. This test checks if the isLast case is properly handled. In this case the part list has to be
  19. reversed to do the conditionals removal, but then has to be reversed again to its natural order
  20. so space resolution rules 2 and 3 are properly performed.
  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="1in">
  27. <fo:region-body/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block space-before="11pt" space-after="11pt">
  33. <fo:block space-before="12pt" space-after="12pt">
  34. <fo:block space-before="13pt" space-after="13pt" border="solid 1pt">
  35. Apache FOP!
  36. </fo:block>
  37. </fo:block>
  38. </fo:block>
  39. </fo:flow>
  40. </fo:page-sequence>
  41. </fo:root>
  42. </fo>
  43. <checks>
  44. <element-list category="breaker">
  45. <box w="0"/>
  46. <penalty w="0" p="INF"/>
  47. <glue w="1000"/>
  48. <box w="14400"/>
  49. <box w="0"/>
  50. <penalty w="0" p="INF"/>
  51. <glue w="1000"/>
  52. <box w="0"/>
  53. <skip>3</skip>
  54. </element-list>
  55. <true xpath="not(boolean(//flow/block[1]/@space-before))"/>
  56. <true xpath="not(boolean(//flow/block[1]/@space-after))"/>
  57. <true xpath="not(boolean(//flow/block[1]/block[1]/@space-before))"/>
  58. <true xpath="not(boolean(//flow/block[1]/block[1]/@space-after))"/>
  59. <true xpath="not(boolean(//flow/block[1]/block[1]/block[1]/@space-before))"/>
  60. <true xpath="not(boolean(//flow/block[1]/block[1]/block[1]/@space-after))"/>
  61. <eval expected="1000 1000 1000 1000" xpath="//flow/block[1]/block[1]/block[1]/@bap"/>
  62. </checks>
  63. </testcase>