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.

marker_page-number-citation_bugzilla45295.xml 4.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 for resolution of forward references in
  21. fo:markers, as reported in Bugzilla 45295.
  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="first"
  28. margin-right="1.5cm"
  29. margin-left="1.5cm"
  30. margin-bottom="2cm"
  31. margin-top="1cm"
  32. page-width="21cm"
  33. page-height="29.7cm">
  34. <fo:region-body margin-top="1cm"/>
  35. <fo:region-before extent="1cm"/>
  36. <fo:region-after extent="1.5cm"/>
  37. </fo:simple-page-master>
  38. </fo:layout-master-set>
  39. <fo:page-sequence master-reference="first" initial-page-number="1">
  40. <fo:static-content flow-name="xsl-region-before">
  41. <fo:block-container height="1cm" width="15cm" top="0cm" left="0cm" position="absolute">
  42. <fo:block>
  43. <fo:retrieve-marker retrieve-class-name="message"
  44. retrieve-boundary="page"
  45. retrieve-position="first-starting-within-page"/>
  46. </fo:block>
  47. </fo:block-container>
  48. <fo:block-container height="1cm" width="15cm" top="0cm" left="0cm" position="absolute">
  49. <fo:block>
  50. <fo:retrieve-marker retrieve-class-name="term"
  51. retrieve-boundary="page"
  52. retrieve-position="last-ending-within-page"/>
  53. </fo:block>
  54. </fo:block-container>
  55. </fo:static-content>
  56. <fo:static-content flow-name="xsl-region-after">
  57. <fo:block text-align="start" font-size="10pt" font-family="serif" line-height="1em + 2pt">
  58. Page (<fo:page-number/> / <fo:page-number-citation ref-id="end-of-document"/>)
  59. </fo:block>
  60. </fo:static-content>
  61. <fo:flow flow-name="xsl-region-body">
  62. <fo:block>
  63. <fo:marker marker-class-name="message">
  64. <fo:block>
  65. WARNING: Page sequence contains: <fo:page-number-citation id="pnc1" ref-id="end-of-document"/> pages.
  66. </fo:block>
  67. </fo:marker>
  68. </fo:block>
  69. <fo:block text-align="start" font-size="12pt" font-family="sans-serif">
  70. This page sequence has more than one page so you will see the message only at the top of the first page.
  71. </fo:block>
  72. <fo:block break-before="page" text-align="start" font-size="12pt" font-family="sans-serif">
  73. Some text.
  74. </fo:block>
  75. <fo:block break-before="page" text-align="start" font-size="12pt" font-family="sans-serif">
  76. Some text.
  77. </fo:block>
  78. <fo:block break-before="page" text-align="start" font-size="12pt" font-family="sans-serif">
  79. Some more text on last page.
  80. </fo:block>
  81. <fo:block id="end-of-document">
  82. <fo:marker marker-class-name="term">
  83. [marker content]
  84. </fo:marker>
  85. </fo:block>
  86. </fo:flow>
  87. </fo:page-sequence>
  88. </fo:root>
  89. </fo>
  90. <checks>
  91. <true xpath="//text[@prod-id='pnc1'][1]/word = '4'" />
  92. </checks>
  93. </testcase>