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.

inline_block_nested_6.xml 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 the value of the penalties between
  21. KnuthBlockBoxes in inline context, with and without keep conditions.
  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="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><fo:inline>Before
  34. <fo:block id="b1" background-color="silver"><fo:inline>Before1
  35. <fo:block id="b11" background-color="grey">A1=B1,</fo:block>
  36. <fo:block id="b12">C1=D1.</fo:block>after1</fo:inline></fo:block>
  37. <fo:block id="b2" background-color="lightgrey" keep-together.within-page="always"><fo:inline>Before2
  38. <fo:block id="b21" background-color="grey">A2=B2,</fo:block>
  39. <fo:block id="b22">C2=D2.</fo:block>after2</fo:inline></fo:block>
  40. <fo:block id="b3" background-color="silver"><fo:inline>Before3
  41. <fo:block id="b31" keep-with-next.within-page="always" background-color="grey">A3=B3,</fo:block>
  42. <fo:block id="b32">C3=D3.</fo:block>after3</fo:inline></fo:block>after</fo:inline></fo:block>
  43. </fo:flow>
  44. </fo:page-sequence>
  45. </fo:root>
  46. </fo>
  47. <checks>
  48. <element-list category="breaker">
  49. <skip>5</skip>
  50. <!-- penalty between blocks b11 and b12, set by InlineLM in b1 -->
  51. <penalty w="0" p="0"/>
  52. <skip>5</skip>
  53. <!-- penalty between blocks b21 and b22, set by InlineLM in b2 -->
  54. <!-- keep-together.within-page="always" -->
  55. <penalty w="0" p="1000"/>
  56. <skip>3</skip>
  57. <!-- penalty between blocks b31 and b32, set by InlineLM in b3 -->
  58. <!-- keep-with-next.within-page="always" -->
  59. <penalty w="0" p="1000"/>
  60. <skip>14</skip>
  61. </element-list>
  62. </checks>
  63. </testcase>