Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

block_break-before_bug37964.xml 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 basic breaks, particularly Bugzilla #37964 where I break-before with a
  21. "even-page" did not end up on an even page due to a bug in space-resolution.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block>line1</fo:block>
  34. <fo:block space-after="5pt">line2</fo:block>
  35. <fo:block break-before="odd-page">line3 break-before="odd-page"</fo:block>
  36. <fo:block>line4</fo:block>
  37. </fo:flow>
  38. </fo:page-sequence>
  39. </fo:root>
  40. </fo>
  41. <checks>
  42. <eval expected="1" xpath="//lineArea[starts-with(., 'line1')]/ancestor::pageViewport/@nr"/>
  43. <eval expected="1" xpath="//lineArea[starts-with(., 'line2')]/ancestor::pageViewport/@nr"/>
  44. <eval expected="3" xpath="//lineArea[starts-with(., 'line3')]/ancestor::pageViewport/@nr"/>
  45. <eval expected="3" xpath="//lineArea[starts-with(., 'line4')]/ancestor::pageViewport/@nr"/>
  46. </checks>
  47. </testcase>