您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

page-position-last_break-before_bugzilla46489.xml 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 (reference orientation).
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="FrontPage"
  27. page-width="210mm" page-height="297mm" margin="12.7mm">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. <fo:simple-page-master master-name="Following"
  31. page-width="210mm" page-height="297mm" margin="12.7mm">
  32. <fo:region-body/>
  33. </fo:simple-page-master>
  34. <fo:page-sequence-master master-name="pages">
  35. <fo:repeatable-page-master-alternatives>
  36. <fo:conditional-page-master-reference page-position="first"
  37. master-reference="FrontPage"/>
  38. <fo:conditional-page-master-reference page-position="rest"
  39. master-reference="Following"/>
  40. <fo:conditional-page-master-reference page-position="last"
  41. master-reference="Following"/>
  42. </fo:repeatable-page-master-alternatives>
  43. </fo:page-sequence-master>
  44. </fo:layout-master-set>
  45. <fo:page-sequence master-reference="pages">
  46. <fo:flow flow-name="xsl-region-body">
  47. <fo:block>
  48. <fo:table table-layout="fixed" width="100%">
  49. <fo:table-column column-width="proportional-column-width(30)"/>
  50. <fo:table-column column-width="proportional-column-width(70)"/>
  51. <fo:table-body>
  52. <fo:table-row>
  53. <fo:table-cell padding="4pt">
  54. <fo:block color="#6D6E71">Some text</fo:block>
  55. </fo:table-cell>
  56. <fo:table-cell padding="4pt">
  57. <fo:block>More text before break. More text before break. More text before
  58. break.</fo:block>
  59. </fo:table-cell>
  60. </fo:table-row>
  61. </fo:table-body>
  62. </fo:table>
  63. <fo:table table-layout="fixed" width="100%">
  64. <fo:table-body>
  65. <fo:table-row>
  66. <fo:table-cell padding="4pt">
  67. <fo:block id="the-block" color="#6D6E71" page-break-before="always">TEXT AFTER
  68. BREAK</fo:block>
  69. </fo:table-cell>
  70. </fo:table-row>
  71. </fo:table-body>
  72. </fo:table>
  73. <fo:table table-layout="fixed" width="100%">
  74. <fo:table-body>
  75. <fo:table-row>
  76. <fo:table-cell padding="4pt">
  77. <fo:block>blah blah blah</fo:block>
  78. <fo:block>blah blah blah</fo:block>
  79. </fo:table-cell>
  80. </fo:table-row>
  81. </fo:table-body>
  82. </fo:table>
  83. </fo:block>
  84. </fo:flow>
  85. </fo:page-sequence>
  86. </fo:root>
  87. </fo>
  88. <checks>
  89. <true xpath="count(//page) = 2" />
  90. </checks>
  91. </testcase>