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.

simple-page-master_regions.xml 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 page-masters (all regions). The empty block-containers are used to check that all the base widths are set correctly so
  21. length evaluation using percentages is possible.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="master1" page-width="5in" page-height="5in" margin="10pt">
  28. <fo:region-body background-color="rgb(100%, 100%, 80%)" margin="30pt"/>
  29. <fo:region-before background-color="rgb(100%, 80%, 80%)" extent="20pt"/>
  30. <fo:region-after background-color="rgb(80%, 80%, 80%)" extent="20pt" precedence="true" display-align="after"/>
  31. <fo:region-start background-color="rgb(80%, 100%, 80%)" extent="20pt"/>
  32. <fo:region-end background-color="rgb(80%, 80%, 100%)" extent="20pt" reference-orientation="270"/>
  33. </fo:simple-page-master>
  34. </fo:layout-master-set>
  35. <fo:page-sequence master-reference="master1" white-space-collapse="true" orphans="0" widows="0">
  36. <fo:static-content flow-name="xsl-region-before">
  37. <fo:block-container absolute-position="absolute" width="100%" height="100%" top="0pt" left="0pt">
  38. <fo:block/>
  39. </fo:block-container>
  40. <fo:block>region-before1</fo:block>
  41. <fo:block>region-before2</fo:block>
  42. <fo:block>region-before3</fo:block>
  43. </fo:static-content>
  44. <fo:static-content flow-name="xsl-region-after">
  45. <fo:block-container absolute-position="absolute" width="100%" height="100%" top="0pt" left="0pt">
  46. <fo:block/>
  47. </fo:block-container>
  48. <fo:block font-size="50%">region-after1 with precedence and display-align="after"</fo:block>
  49. </fo:static-content>
  50. <fo:static-content flow-name="xsl-region-start">
  51. <fo:block-container absolute-position="absolute" width="100%" height="100%" top="0pt" left="0pt">
  52. <fo:block/>
  53. </fo:block-container>
  54. <fo:block>region-start1</fo:block>
  55. <fo:block>region-start2</fo:block>
  56. <fo:block>region-start3</fo:block>
  57. </fo:static-content>
  58. <fo:static-content flow-name="xsl-region-end">
  59. <fo:block-container absolute-position="absolute" width="100%" height="100%" top="0pt" left="0pt">
  60. <fo:block/>
  61. </fo:block-container>
  62. <fo:block>region-end1</fo:block>
  63. <fo:block>region-end2</fo:block>
  64. <fo:block>region-end3</fo:block>
  65. </fo:static-content>
  66. <fo:flow flow-name="xsl-region-body">
  67. <fo:block-container absolute-position="absolute" width="100%" height="100%" top="0pt" left="0pt">
  68. <fo:block/>
  69. </fo:block-container>
  70. <fo:block>testing all-regions1</fo:block>
  71. <fo:block>testing all-regions2</fo:block>
  72. <fo:block>testing all-regions3</fo:block>
  73. </fo:flow>
  74. </fo:page-sequence>
  75. </fo:root>
  76. </fo>
  77. <checks>
  78. <eval expected="0 0 360000 360000" xpath="//pageViewport/@bounds"/>
  79. <eval expected="20000" xpath="//regionBefore/@bpda"/>
  80. <eval expected="300000" xpath="//regionBefore/@ipda"/>
  81. <eval expected="20000" xpath="//regionBefore/block[@positioning='absolute']/@bpda"/>
  82. <eval expected="300000" xpath="//regionBefore/block[@positioning='absolute']/@ipda"/>
  83. <eval expected="color=#ffcccc" xpath="//regionBefore/../@background"/>
  84. <eval expected="20000" xpath="//regionAfter/@bpda"/>
  85. <eval expected="340000" xpath="//regionAfter/@ipda"/>
  86. <eval expected="20000" xpath="//regionAfter/block[@positioning='absolute']/@bpda"/>
  87. <eval expected="340000" xpath="//regionAfter/block[@positioning='absolute']/@ipda"/>
  88. <!-- 360pt due to precendence -->
  89. <eval expected="color=#cccccc" xpath="//regionAfter/../@background"/>
  90. <eval expected="320000" xpath="//regionStart/@bpda"/>
  91. <eval expected="20000" xpath="//regionStart/@ipda"/>
  92. <eval expected="320000" xpath="//regionStart/block[@positioning='absolute']/@bpda"/>
  93. <eval expected="20000" xpath="//regionStart/block[@positioning='absolute']/@ipda"/>
  94. <eval expected="color=#ccffcc" xpath="//regionStart/../@background"/>
  95. <eval expected="20000" xpath="//regionEnd/@bpda"/>
  96. <eval expected="320000" xpath="//regionEnd/@ipda"/>
  97. <eval expected="20000" xpath="//regionEnd/block[@positioning='absolute']/@bpda"/>
  98. <eval expected="320000" xpath="//regionEnd/block[@positioning='absolute']/@ipda"/>
  99. <!-- bpd and ipd flipped due to reference-orientation -->
  100. <eval expected="color=#ccccff" xpath="//regionEnd/../@background"/>
  101. <eval expected="280000" xpath="//regionBody/@bpda"/>
  102. <eval expected="280000" xpath="//regionBody/@ipda"/>
  103. <eval expected="280000" xpath="//regionBody/mainReference/span/flow/block[@positioning='absolute']/@bpda"/>
  104. <eval expected="280000" xpath="//regionBody/mainReference/span/flow/block[@positioning='absolute']/@ipda"/>
  105. <eval expected="color=#ffffcc" xpath="//regionBody/../@background"/>
  106. </checks>
  107. </testcase>