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.

marker_white-space-collapse.xml 3.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 markers and white-space-collapse inheritance.
  21. This is currently incorrectly handled in that the white-space-collapse property
  22. value active in the fo:marker context is applied instead of the value of the
  23. white-space-collapse property the fo:retrieve-marker-context.
  24. </p>
  25. </info>
  26. <fo>
  27. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  30. <fo:region-body margin-top="1in" margin-bottom="1in"/>
  31. <fo:region-before extent="1in"/>
  32. <fo:region-after extent="1in"/>
  33. </fo:simple-page-master>
  34. </fo:layout-master-set>
  35. <fo:page-sequence master-reference="normal">
  36. <fo:static-content flow-name="xsl-region-before">
  37. <fo:block background-color="yellow" white-space-collapse="false">
  38. 1. Marker <fo:retrieve-marker retrieve-class-name="m1" />
  39. </fo:block>
  40. <fo:block background-color="yellow">
  41. 1. Marker <fo:retrieve-marker retrieve-class-name="m1" />
  42. </fo:block>
  43. </fo:static-content>
  44. <fo:static-content flow-name="xsl-region-after">
  45. <fo:block background-color="yellow" white-space-collapse="false">
  46. 2. Marker <fo:retrieve-marker retrieve-class-name="m2" />
  47. </fo:block>
  48. <fo:block background-color="yellow">
  49. 2. Marker <fo:retrieve-marker retrieve-class-name="m2" />
  50. </fo:block>
  51. </fo:static-content>
  52. <fo:flow flow-name="xsl-region-body">
  53. <fo:block background-color="red">
  54. <fo:marker marker-class-name="m1">
  55. <fo:block>
  56. First marker with whitespace around
  57. </fo:block>
  58. </fo:marker>
  59. </fo:block>
  60. <fo:block background-color="green">
  61. <fo:marker marker-class-name="m2">
  62. <fo:block>
  63. Second marker with whitespace around
  64. </fo:block>
  65. </fo:marker>
  66. </fo:block>
  67. </fo:flow>
  68. </fo:page-sequence>
  69. </fo:root>
  70. </fo>
  71. <checks>
  72. <!-- preserve inter-word whitespace in the first block,
  73. collapse them in the second -->
  74. <eval expected="9" xpath="count(//regionBefore/block[1]/block[1]/lineArea[1]/text/space)"/>
  75. <eval expected="4" xpath="count(//regionBefore/block[2]/block[1]/lineArea[1]/text/space)"/>
  76. <eval expected="8" xpath="count(//regionAfter/block[1]/block[1]/lineArea[1]/text/space)"/>
  77. <eval expected="4" xpath="count(//regionAfter/block[2]/block[1]/lineArea[1]/text/space)"/>
  78. </checks>
  79. </testcase>