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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 fo:inlines which generate multiple consecutive
  21. inlineblockparent areas. Each inlineblockparent area should appear in
  22. its own line area. Two cases: 1. A block containing multiple
  23. lines. 2. A block containing multiple child blocks which must be kept
  24. together (so that there are not break positions between the positions
  25. for the blocks).
  26. <p>
  27. Implicitly this test checks whether inline block content does
  28. not generate ClassCastExceptions. The exceptions would occur because
  29. an UnresolvedElement in a list of ListElements would be cast to a
  30. KnuthElement.
  31. </p>
  32. </p>
  33. </info>
  34. <fo>
  35. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  36. xmlns:svg="http://www.w3.org/2000/svg">
  37. <fo:layout-master-set>
  38. <fo:simple-page-master master-name="normal"
  39. page-width="5in" page-height="5in" margin="5pt">
  40. <fo:region-body/>
  41. </fo:simple-page-master>
  42. </fo:layout-master-set>
  43. <fo:page-sequence master-reference="normal"
  44. white-space-collapse="true" language="en">
  45. <fo:flow flow-name="xsl-region-body" font-size="10pt">
  46. <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
  47. <fo:inline>before block
  48. <fo:block background-color="yellow"
  49. border="solid 1pt red">
  50. As far as the laws of mathematics refer to reality, they are not
  51. certain, and as far as they are certain, they do not refer to reality
  52. - Albert Einstein
  53. </fo:block>
  54. after block</fo:inline>
  55. </fo:block>
  56. <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
  57. <fo:inline>before block
  58. <fo:block keep-together.within-page="always"
  59. background-color="yellow" border="solid 1pt red">
  60. <fo:block>A1=B1,</fo:block>
  61. <fo:block>A2=B2.</fo:block>
  62. </fo:block>
  63. after block</fo:inline>
  64. </fo:block>
  65. </fo:flow>
  66. </fo:page-sequence>
  67. </fo:root>
  68. </fo>
  69. <checks>
  70. <true xpath="boolean(//flow/block[1]/lineArea[1]/inlineparent[1])"/>
  71. <true xpath="boolean(//flow/block[1]/lineArea[2]/inlineblockparent[1])"/>
  72. <true xpath="boolean(//flow/block[1]/lineArea[3]/inlineblockparent[1])"/>
  73. <true xpath="boolean(//flow/block[1]/lineArea[4]/inlineparent[1])"/>
  74. <true xpath="boolean(//flow/block[2]/lineArea[1]/inlineparent[1])"/>
  75. <true xpath="boolean(//flow/block[2]/lineArea[2]/inlineblockparent[1])"/>
  76. <true xpath="boolean(//flow/block[2]/lineArea[3]/inlineblockparent[1])"/>
  77. <true xpath="boolean(//flow/block[2]/lineArea[4]/inlineparent[1])"/>
  78. </checks>
  79. </testcase>