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_break-before_bug44412.xml 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 Bugzilla #44412 where a break-before on the first child of an otherwise
  21. empty block is set.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="page">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block>Before the block</fo:block>
  34. <fo:block id="b1" border="4pt solid black">
  35. <fo:block break-before="page">The break-before set on this block causes the parent
  36. block to produce an empty block area with only a border before on the
  37. first page.</fo:block>
  38. </fo:block>
  39. </fo:flow>
  40. </fo:page-sequence>
  41. </fo:root>
  42. </fo>
  43. <checks>
  44. <eval expected="1" xpath="count(//block[@prod-id = 'b1'])"/>
  45. <eval expected="4000 4000 4000 4000" xpath="(//block[@prod-id = 'b1'])[1]/@bap"/>
  46. <eval expected="43200" xpath="(//block[@prod-id = 'b1'])[1]/@bpd"/>
  47. <element-list category="breaker" index="0">
  48. <box w="14400"/>
  49. <skip>3</skip>
  50. </element-list>
  51. </checks>
  52. </testcase>