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_linefeed-treatment_2.xml 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 linefeed preservation between and at the start
  19. of fo:inline elements.
  20. </p>
  21. </info>
  22. <fo>
  23. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  24. <fo:layout-master-set>
  25. <fo:simple-page-master master-name="master"
  26. page-height="845pt"
  27. page-width="598pt">
  28. <fo:region-body margin-left="50pt"
  29. margin-top="50pt"
  30. margin-bottom="50pt"
  31. margin-right="50pt"/>
  32. </fo:simple-page-master>
  33. </fo:layout-master-set>
  34. <fo:page-sequence master-reference="master">
  35. <fo:flow flow-name="xsl-region-body">
  36. <fo:block background-color="silver"
  37. linefeed-treatment="preserve" text-align="center"
  38. margin-top="10pt" margin-bottom="10pt">
  39. <fo:inline font-weight="bold">Leasing a ...</fo:inline>
  40. <fo:inline>Contrat Nr.: W-113283...</fo:inline>
  41. </fo:block>
  42. <fo:block background-color="yellow"
  43. linefeed-treatment="preserve" text-align="center"
  44. margin-top="10pt" margin-bottom="10pt">
  45. <fo:inline font-weight="bold">Leasing a ...</fo:inline>
  46. <fo:inline>&#10;Contrat Nr.: W-113283...</fo:inline>
  47. </fo:block>
  48. <fo:block background-color="silver"
  49. linefeed-treatment="preserve"
  50. margin-top="10pt" margin-bottom="10pt">
  51. <fo:inline font-weight="bold">Leasing a ...</fo:inline>
  52. <fo:inline>Contrat Nr.: W-113283...</fo:inline>
  53. </fo:block>
  54. <fo:block background-color="yellow"
  55. linefeed-treatment="preserve"
  56. margin-top="10pt" margin-bottom="10pt">
  57. <fo:inline font-weight="bold">Leasing a ...</fo:inline>
  58. <fo:inline>&#10;Contrat Nr.: W-113283...</fo:inline>
  59. </fo:block>
  60. </fo:flow>
  61. </fo:page-sequence>
  62. </fo:root>
  63. </fo>
  64. <checks>
  65. <!--
  66. The result:
  67. Leasing a ...
  68. Contract Nr.: W-...
  69. Leasing a ...
  70. Contract Nr.: W-...
  71. Leasing a ...
  72. Contract Nr.: W-...
  73. Leasing a ...
  74. Contract Nr.: W-...
  75. The result for the second case is lacking the linefeed at the start of
  76. the fo:inline. The results for the first and second cases are lacking
  77. the linefeed before the first line.
  78. -->
  79. <eval expected="4" xpath="count(//flow/block[1]/lineArea)"/>
  80. <eval expected="4" xpath="count(//flow/block[2]/lineArea)"/>
  81. <eval expected="4" xpath="count(//flow/block[3]/lineArea)"/>
  82. <eval expected="4" xpath="count(//flow/block[4]/lineArea)"/>
  83. </checks>
  84. </testcase>