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_4.xml 3.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 block content in fo:inline. It tests the
  21. case when an fo:inline starts a block after some
  22. text in the parent fo.
  23. </p>
  24. </info>
  25. <fo>
  26. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  27. <fo:layout-master-set>
  28. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt">
  29. <fo:region-body/>
  30. </fo:simple-page-master>
  31. </fo:layout-master-set>
  32. <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en">
  33. <fo:flow flow-name="xsl-region-body" font-size="10pt">
  34. <fo:block>
  35. Before inline
  36. <fo:inline background-color="red"><fo:block background-color="yellow">starting with a block</fo:block>
  37. after block</fo:inline>
  38. After inline
  39. </fo:block>
  40. <fo:block>
  41. <fo:inline background-color="blue">Before inline
  42. <fo:inline background-color="red"><fo:block background-color="yellow">starting with a block</fo:block>
  43. after block</fo:inline>
  44. After inline</fo:inline>
  45. </fo:block>
  46. </fo:flow>
  47. </fo:page-sequence>
  48. </fo:root>
  49. </fo>
  50. <checks>
  51. <element-list category="breaker">
  52. <box w="12000"/>
  53. <penalty w="0" p="0"/>
  54. <box w="12000"/>
  55. <penalty w="0" p="0"/>
  56. <box w="12000"/>
  57. <penalty w="0" p="0"/>
  58. <box w="12000"/>
  59. <penalty w="0" p="0"/>
  60. <box w="12000"/>
  61. <penalty w="0" p="0"/>
  62. <box w="12000"/>
  63. <penalty w="0" p="1000"/>
  64. <glue w="0"/>
  65. <penalty w="0" p="-1000"/>
  66. </element-list>
  67. <!-- first block -->
  68. <eval expected="Before inline"
  69. xpath="//flow/block[1]/lineArea[1]/text[1]"/>
  70. <true xpath="boolean(//flow/block[1]/lineArea[2]/inlineblockparent[1])"/>
  71. <eval expected="starting with a block"
  72. xpath="//flow/block[1]/lineArea[2]/inlineblockparent[1]/block[1]/lineArea[1]/text[1]"/>
  73. <true xpath="boolean(//flow/block[1]/lineArea[3]/inlineparent[1])"/>
  74. <eval expected=" After inline"
  75. xpath="//flow/block[1]/lineArea[3]/text[1]"/>
  76. <eval expected="after block"
  77. xpath="//flow/block[1]/lineArea[3]/inlineparent[1]/text[1]"/>
  78. <!-- second block -->
  79. <eval expected="Before inline"
  80. xpath="//flow/block[2]/lineArea[1]/inlineparent[1]/text[1]"/>
  81. <true xpath="boolean(//flow/block[2]/lineArea[2]/inlineparent[1]/inlineblockparent[1])"/>
  82. <eval expected="starting with a block"
  83. xpath="//flow/block[2]/lineArea[2]/inlineparent[1]/inlineblockparent[1]/block[1]/lineArea[1]/text[1]"/>
  84. <true xpath="boolean(//flow/block[2]/lineArea[3]/inlineparent[1]/inlineparent[1])"/>
  85. <eval expected=" After inline"
  86. xpath="//flow/block[2]/lineArea[3]/inlineparent[1]/text[1]"/>
  87. <eval expected="after block"
  88. xpath="//flow/block[2]/lineArea[3]/inlineparent[1]/inlineparent[1]/text[1]"/>
  89. </checks>
  90. </testcase>