blob: 51fc27f5709c1a6628c2afe35ac8954de515df43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2006 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<testcase>
<info>
<p>
This test checks fo:page-number-citation-last associated to a page-sequence id.
</p>
</info>
<fo>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
<fo:region-body margin-bottom="1in" column-count="2" column-gap="10pt" background-color="lightgray"/>
<fo:region-after extent="1in" display-align="after"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="last" page-width="5in" page-height="5in">
<fo:region-body margin-bottom="3in" column-count="2" column-gap="10pt" background-color="rgb(250,250,240)"/>
<fo:region-after extent="1in" display-align="after"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="master">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="last" page-position="last"/>
<fo:conditional-page-master-reference master-reference="normal" page-position="any"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="master" id="replace-last">
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="end">page <fo:page-number/> of <fo:page-number-citation-last ref-id="replace-last"/></fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block-container id="boxA0" height="1.5in" background-color="yellow" text-align="center" display-align="center" break-after="page">
<fo:block>box0</fo:block>
</fo:block-container>
<fo:block-container id="boxA1" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box1</fo:block>
</fo:block-container>
<fo:block-container id="boxA2" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box2</fo:block>
</fo:block-container>
<fo:block-container id="boxA3" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box3</fo:block>
</fo:block-container>
<fo:block-container id="boxA4" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box4</fo:block>
</fo:block-container>
<fo:block-container id="boxA5" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box5</fo:block>
</fo:block-container>
<fo:block-container id="boxA6" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box6</fo:block>
</fo:block-container>
<fo:block-container id="boxA7" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box7</fo:block>
</fo:block-container>
<fo:block-container id="boxA8" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box8</fo:block>
</fo:block-container>
<fo:block-container id="boxA9" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box9</fo:block>
</fo:block-container>
<fo:block-container id="boxA10" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box10</fo:block>
</fo:block-container>
<fo:block id="eof"/>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="master" id="blank-last">
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="end">page <fo:page-number/> of <fo:page-number-citation-last ref-id="blank-last"/></fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block-container id="boxB1" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box1</fo:block>
</fo:block-container>
<fo:block-container id="boxB2" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box2</fo:block>
</fo:block-container>
<fo:block-container id="boxB3" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box3</fo:block>
</fo:block-container>
<fo:block-container id="boxB4" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box4</fo:block>
</fo:block-container>
<fo:block-container id="boxB5" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box5</fo:block>
</fo:block-container>
<fo:block-container id="boxB6" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box6</fo:block>
</fo:block-container>
<fo:block-container id="boxB7" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box7</fo:block>
</fo:block-container>
<fo:block-container id="boxB8" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box8</fo:block>
</fo:block-container>
<fo:block-container id="boxB9" height="1.5in" background-color="yellow" text-align="center" display-align="center">
<fo:block>box9</fo:block>
</fo:block-container>
<fo:block-container id="boxB10" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box10</fo:block>
</fo:block-container>
<fo:block-container id="boxB11" height="1.5in" background-color="orange" text-align="center" display-align="center">
<fo:block>box11</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="2" xpath="count(//pageSequence)"/>
<eval expected="4" xpath="count(//pageSequence[1]/pageViewport)"/>
<eval expected="4" xpath="count(//pageSequence[2]/pageViewport)"/>
<eval expected="page 1 of 4" xpath="//pageSequence[1]/pageViewport[@nr=1]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 2 of 4" xpath="//pageSequence[1]/pageViewport[@nr=2]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 3 of 4" xpath="//pageSequence[1]/pageViewport[@nr=3]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 4 of 4" xpath="//pageSequence[1]/pageViewport[@nr=4]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 5 of 8" xpath="//pageSequence[2]/pageViewport[@nr=5]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 6 of 8" xpath="//pageSequence[2]/pageViewport[@nr=6]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 7 of 8" xpath="//pageSequence[2]/pageViewport[@nr=7]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
<eval expected="page 8 of 8" xpath="//pageSequence[2]/pageViewport[@nr=8]/page/regionViewport[1]/regionAfter/block[2]/lineArea"/>
</checks>
</testcase>
|