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.

basic_link_to_last_page.xml 3.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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>This test checks links to and from the last page.</p>
  20. </info>
  21. <fo>
  22. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  23. <fo:layout-master-set>
  24. <fo:simple-page-master margin="2cm" master-name="odd" page-height="297mm" page-width="210mm">
  25. <fo:region-body column-count="2" column-gap="28pt"/>
  26. </fo:simple-page-master>
  27. <fo:simple-page-master margin="2cm" master-name="even" page-height="297mm" page-width="210mm">
  28. <fo:region-body column-count="2" column-gap="28pt"/>
  29. </fo:simple-page-master>
  30. <fo:simple-page-master margin="2cm" master-name="last" page-height="297mm" page-width="210mm">
  31. <fo:region-body column-count="2" column-gap="28pt"/>
  32. </fo:simple-page-master>
  33. <fo:page-sequence-master master-name="basicPSM">
  34. <fo:repeatable-page-master-alternatives>
  35. <fo:conditional-page-master-reference master-reference="last" odd-or-even="any" page-position="last"/>
  36. <fo:conditional-page-master-reference master-reference="odd" odd-or-even="odd" page-position="any"/>
  37. <fo:conditional-page-master-reference master-reference="even" odd-or-even="even" page-position="any"/>
  38. </fo:repeatable-page-master-alternatives>
  39. </fo:page-sequence-master>
  40. </fo:layout-master-set>
  41. <fo:bookmark-tree>
  42. <fo:bookmark internal-destination="title" starting-state="show">
  43. <fo:bookmark-title>title</fo:bookmark-title>
  44. </fo:bookmark>
  45. </fo:bookmark-tree>
  46. <fo:page-sequence id="lastpagesequence" master-reference="basicPSM">
  47. <fo:flow flow-name="xsl-region-body">
  48. <fo:block id="par" break-after="page">par</fo:block>
  49. <fo:block id="par2" break-after="page">par2</fo:block>
  50. <fo:block id="par3" break-after="page">par3</fo:block>
  51. <fo:block>before-title</fo:block>
  52. <fo:block id="title" keep-with-next="always">title</fo:block>
  53. <fo:block>
  54. <fo:basic-link internal-destination="par2">
  55. siehe <fo:inline keep-together="always">
  56. Seite <fo:page-number-citation ref-id="par2"/>
  57. </fo:inline>
  58. </fo:basic-link>
  59. </fo:block>
  60. <fo:block break-before="column">title2</fo:block>
  61. <fo:block>
  62. <fo:basic-link internal-destination="par3">
  63. siehe <fo:inline keep-together="always">
  64. Seite <fo:page-number-citation ref-id="par3"/>
  65. </fo:inline>
  66. </fo:basic-link>
  67. </fo:block>
  68. </fo:flow>
  69. </fo:page-sequence>
  70. </fo:root>
  71. </fo>
  72. <checks>
  73. <eval expected="(P2,par2)" xpath="((/areaTree/pageSequence/pageViewport)[4]//inlineparent[@internal-link])[1]/@internal-link"/>
  74. <eval expected="(P3,par3)" xpath="((/areaTree/pageSequence/pageViewport)[4]//inlineparent[@internal-link])[2]/@internal-link"/>
  75. <eval expected="(P6,title)" xpath="/areaTree/bookmarkTree/bookmark/@internal-link"/>
  76. <eval expected="4" xpath="count(/areaTree/pageSequence/pageViewport)"/>
  77. </checks>
  78. </testcase>