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.

markers_inline-level.xml 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 that an empty fo:title does not cause a
  21. NullPointerException and does not generate any text.
  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="6in" margin-top=".5in" margin-bottom=".5in" margin-left=".9in" margin-right=".9in">
  28. <fo:region-body margin-bottom=".5in" margin-top="2.5in" />
  29. <fo:region-before region-name="header" extent="2.5in" />
  30. <fo:region-after region-name="footer" extent=".5in" />
  31. </fo:simple-page-master>
  32. </fo:layout-master-set>
  33. <fo:page-sequence master-reference="page">
  34. <fo:static-content flow-name="header">
  35. <fo:block font-size="6pt">
  36. <fo:block>
  37. H1 (boundary="document", position="first-including-carryover"): <fo:retrieve-marker retrieve-class-name="H1" retrieve-position="first-including-carryover" retrieve-boundary="document"/>
  38. </fo:block>
  39. <fo:block>
  40. H1 (boundary="document", position="first-starting-within-page"): <fo:retrieve-marker retrieve-class-name="H1" retrieve-position="first-starting-within-page" retrieve-boundary="document"/>
  41. </fo:block>
  42. <fo:block>
  43. H1 (boundary="document", position="last-ending-within-page"): <fo:retrieve-marker retrieve-class-name="H1" retrieve-position="last-ending-within-page" retrieve-boundary="document"/>
  44. </fo:block>
  45. </fo:block>
  46. </fo:static-content>
  47. <fo:flow flow-name="xsl-region-body">
  48. <fo:block>
  49. BLOCK TEXT
  50. <fo:inline font-weight="bold">
  51. <fo:marker marker-class-name="H1">H1.1</fo:marker>
  52. INLINE TEXT WITH MARKER H1.1
  53. </fo:inline>
  54. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  55. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  56. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  57. <fo:inline font-weight="bold">
  58. <fo:marker marker-class-name="H1">H1.2</fo:marker>
  59. INLINE TEXT WITH MARKER H1.2
  60. </fo:inline>
  61. TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  62. <fo:inline font-weight="bold" id="m13">
  63. <fo:marker marker-class-name="H1">H1.3</fo:marker>
  64. INLINE TEXT WITH MARKER H1.3 AND A NESTED BLOCK WITH MORE INLINES
  65. <fo:block break-after="page">
  66. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  67. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  68. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  69. </fo:block>
  70. <fo:block>
  71. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  72. <fo:inline id="m13a"><fo:marker marker-class-name="H1">H1.3a</fo:marker></fo:inline>
  73. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  74. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  75. </fo:block>
  76. </fo:inline>
  77. BLOCK TEXT BLOCK TEXT BLOCK TEXT BLOCK TEXT
  78. </fo:block>
  79. </fo:flow>
  80. </fo:page-sequence>
  81. </fo:root>
  82. </fo>
  83. <checks>
  84. <!-- first page: only "H1.1" -->
  85. <eval expected="H1.1" xpath="//pageViewport[@key='P1']//regionBefore/block[1]/block[1]/lineArea[1]/text[2]/word" />
  86. <eval expected="H1.1" xpath="//pageViewport[@key='P1']//regionBefore/block[1]/block[2]/lineArea[1]/text[2]/word" />
  87. <eval expected="H1.1" xpath="//pageViewport[@key='P1']//regionBefore/block[1]/block[3]/lineArea[1]/text[2]/word" />
  88. <!-- second page: only "H1.2" -->
  89. <eval expected="H1.2" xpath="//pageViewport[@key='P2']//regionBefore/block[1]/block[1]/lineArea[1]/text[2]/word" />
  90. <eval expected="H1.2" xpath="//pageViewport[@key='P2']//regionBefore/block[1]/block[2]/lineArea[1]/text[2]/word" />
  91. <eval expected="H1.2" xpath="//pageViewport[@key='P2']//regionBefore/block[1]/block[3]/lineArea[1]/text[2]/word" />
  92. <!-- third and fourth page: only "H1.3" -->
  93. <eval expected="H1.3" xpath="//pageViewport[@key='P3']//regionBefore/block[1]/block[1]/lineArea[1]/text[2]/word" />
  94. <eval expected="H1.3" xpath="//pageViewport[@key='P3']//regionBefore/block[1]/block[2]/lineArea[1]/text[2]/word" />
  95. <eval expected="H1.3" xpath="//pageViewport[@key='P3']//regionBefore/block[1]/block[3]/lineArea[1]/text[2]/word" />
  96. <eval expected="H1.3" xpath="//pageViewport[@key='P4']//regionBefore/block[1]/block[1]/lineArea[1]/text[2]/word" />
  97. <eval expected="H1.3" xpath="//pageViewport[@key='P4']//regionBefore/block[1]/block[2]/lineArea[1]/text[2]/word" />
  98. <eval expected="H1.3" xpath="//pageViewport[@key='P4']//regionBefore/block[1]/block[3]/lineArea[1]/text[2]/word" />
  99. <!-- fifth page: "H1.3" carries over from previous pages; "H1.3a" is starting and ending within page -->
  100. <eval expected="H1.3" xpath="//pageViewport[@key='P5']//regionBefore/block[1]/block[1]/lineArea[1]/text[2]/word" />
  101. <eval expected="H1.3a" xpath="//pageViewport[@key='P5']//regionBefore/block[1]/block[2]/lineArea[1]/text[2]/word" />
  102. <eval expected="H1.3a" xpath="//pageViewport[@key='P5']//regionBefore/block[1]/block[3]/lineArea[1]/text[2]/word" />
  103. <!-- last page: again, only "H1.3" -->
  104. <eval expected="H1.3" xpath="//pageViewport[@key='P6']//regionBefore/block[1]/block[1]/lineArea[1]/text[2]/word" />
  105. <eval expected="H1.3" xpath="//pageViewport[@key='P6']//regionBefore/block[1]/block[2]/lineArea[1]/text[2]/word" />
  106. <eval expected="H1.3" xpath="//pageViewport[@key='P6']//regionBefore/block[1]/block[3]/lineArea[1]/text[2]/word" />
  107. </checks>
  108. </testcase>