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_1.xml 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 normal line layout.
  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="simple" page-height="5in" page-width="5in">
  27. <fo:region-body/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="simple">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block background-color="orange">word1 word2 word3</fo:block>
  33. <fo:block background-color="yellow">word1
  34. word2 word3
  35. </fo:block>
  36. <fo:block background-color="orange"
  37. white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" wrap-option="no-wrap">line1
  38. line2
  39. line3</fo:block>
  40. <fo:block background-color="yellow"
  41. white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" wrap-option="no-wrap">
  42. line1
  43. line2
  44. line3
  45. </fo:block>
  46. </fo:flow>
  47. </fo:page-sequence>
  48. </fo:root>
  49. </fo>
  50. <checks>
  51. <eval expected="word1 word2 word3" xpath="//flow/block[1]/lineArea[1]"/>
  52. <eval expected="word1 word2 word3" xpath="//flow/block[2]/lineArea[1]"/>
  53. <eval expected="line1" xpath="//flow/block[3]/lineArea[1]"/>
  54. <eval expected="line2" xpath="//flow/block[3]/lineArea[2]"/>
  55. <eval expected="line3" xpath="//flow/block[3]/lineArea[3]"/>
  56. <true xpath="boolean(//flow/block[4]/lineArea[1])"/>
  57. <true xpath="not(boolean(//flow/block[4]/lineArea[1]/text))"/>
  58. <eval expected="line1" xpath="//flow/block[4]/lineArea[2]"/>
  59. <eval expected="line2" xpath="//flow/block[4]/lineArea[3]"/>
  60. <true xpath="boolean(//flow/block[4]/lineArea[4])"/>
  61. <true xpath="not(boolean(//flow/block[4]/lineArea[4]/text))"/>
  62. <eval expected="line3" xpath="//flow/block[4]/lineArea[5]"/>
  63. </checks>
  64. </testcase>