aboutsummaryrefslogtreecommitdiffstats
path: root/fop/test/layoutengine/standard-testcases/flow_changing-ipd_4.xml
blob: 4b0aea09394c8b88ba91da6e70ce59610363dece (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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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 that a list can be relaid out when a change in ipd happens across pages.
    </p>
  </info>
  <fo>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="narrow"
          page-height="300pt" page-width="400pt" margin="50pt">
          <fo:region-body background-color="#F0F0F0"/>
        </fo:simple-page-master>
        <fo:simple-page-master master-name="wide"
          page-height="300pt" page-width="600pt" margin="50pt">
          <fo:region-body background-color="#F0F0F0"/>
        </fo:simple-page-master>
        <fo:page-sequence-master master-name="pages">
          <fo:single-page-master-reference master-reference="narrow"/>
          <fo:repeatable-page-master-reference master-reference="wide"/>
        </fo:page-sequence-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="pages">
        <fo:flow flow-name="xsl-region-body" text-align="justify">
          <fo:block space-before="10pt" id="b1_1">In olden times when wishing still helped one, there 
            lived a king whose daughters were all beautiful, but the youngest was so beautiful that 
            the sun itself, which has seen so much, was astonished whenever it shone in her 
            face.</fo:block>
          <fo:block space-before="10pt" id="b1_2">In olden times when wishing still helped one, there 
            lived a king whose daughters were all beautiful, but the youngest was so beautiful that 
            the sun itself, which has seen so much, was astonished whenever it shone in her 
            face.</fo:block>
          <fo:table table-layout="fixed" width="100%" border="1pt solid black" space-before="10pt" 
            padding="2pt" border-collapse="separate">
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block space-before="10pt" id="b1_3">In olden times when wishing still helped 
                    one, there lived a king whose daughters were all beautiful, but the youngest was 
                    so beautiful that the sun itself, which has seen so much, was astonished 
                    whenever it shone in her face.</fo:block>
                  <fo:block space-before="10pt" id="b1_4">In olden times when wishing still helped 
                    one, there lived a king whose daughters were all beautiful, but the youngest was 
                    so beautiful that the sun itself, which has seen so much, was astonished 
                    whenever it shone in her face.</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>
          <fo:block space-before="10pt" id="b1_5" border-top="1pt solid red">In olden times when 
            wishing still helped one, there lived a king whose daughters were all beautiful, but the 
            youngest was so beautiful that the sun itself, which has seen so much, was astonished 
            whenever it shone in her face.</fo:block>
          <fo:block space-before="10pt" id="b1_6">In olden times when wishing still helped one, there 
            lived a king whose daughters were all beautiful, but the youngest was so beautiful that 
            the sun itself, which has seen so much, was astonished whenever it shone in her 
            face.</fo:block>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="pages">
        <fo:flow flow-name="xsl-region-body" text-align="justify">
          <fo:block space-before="10pt" id="b2_1">In olden times when wishing still helped one, there 
            lived a king whose daughters were all beautiful, but the youngest was so beautiful that 
            the sun itself, which has seen so much, was astonished whenever it shone in her 
            face.</fo:block>
          <fo:block space-before="10pt" id="b2_2">In olden times when wishing still helped one, there 
            lived a king whose daughters were all beautiful, but the youngest was so beautiful that 
            the sun itself, which has seen so much, was astonished whenever it shone in her 
            face.</fo:block>
          <fo:list-block space-before="10pt" provisional-distance-between-starts="0.5cm">
            <fo:list-item>
              <fo:list-item-label end-indent="label-end()">
                <fo:block start-indent="2pt"></fo:block>
              </fo:list-item-label>
              <fo:list-item-body start-indent="body-start()">
                <fo:block space-before="10pt" id="b2_3">In olden times when wishing still helped 
                  one, there lived a king whose daughters were all beautiful, but the youngest was 
                  so beautiful that the sun itself, which has seen so much, was 
                  astonished…</fo:block>
              </fo:list-item-body>
            </fo:list-item>
            <fo:list-item>
              <fo:list-item-label end-indent="label-end()">
                <fo:block start-indent="2pt"></fo:block>
              </fo:list-item-label>
              <fo:list-item-body start-indent="body-start()">
                <fo:block id="b2_4">In olden times when wishing still helped one, there lived a king 
                  whose daughters were all beautiful, but the youngest was so beautiful that the sun 
                  itself, which has seen so much, was astonished…</fo:block>
              </fo:list-item-body>
            </fo:list-item>
          </fo:list-block>
          <fo:block space-before="10pt" space-before.conditionality="retain" border-top="1pt solid 
            red" id="b2_5">In olden times when wishing still helped one, there lived a king whose 
            daughters were all beautiful, but the youngest was so beautiful that the sun itself, 
            which has seen so much, was astonished whenever it shone in her face.</fo:block>
          <fo:block space-before="10pt" id="b2_6">In olden times when wishing still helped one, there 
            lived a king whose daughters were all beautiful, but the youngest was so beautiful that 
            the sun itself, which has seen so much, was astonished whenever it shone in her 
            face.</fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <!-- First page sequence – table -->
    <eval expected="(solid,#000000,1000)"
                            xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]/@border-after"/>
    <eval expected="300000" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[1]/@ipd"/>
    <eval expected="b1_4"   xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]/block/block/@prod-id"/>
    <eval expected="In"     xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[1]/text/word[1]"/>
    <eval expected="olden"  xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[1]/text/word[2]"/>
    <eval expected="her"    xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[4]/text/word[position()=last()-1]"/>
    <eval expected="face."  xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[4]/text/word[position()=last()]"/>

    <eval expected="b1_5"   xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]/@prod-id"/>
    <eval expected="500000" xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]/@ipd"/>
    <eval expected="(solid,#ff0000,1000)"
                            xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]/@border-before"/>
    <eval expected="In"     xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[1]"/>
    <eval expected="olden"  xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[2]"/>

    <!-- Second page sequence – list -->
    <eval expected="500000" xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/@ipd"/>
    <eval expected="b2_4"   xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/@prod-id"/>
    <eval expected="In"     xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[1]/text/word[1]"/>
    <eval expected="olden"  xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[1]/text/word[2]"/>
    <eval expected="was"    xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[3]/text/word[position()=last()-1]"/>
    <eval expected="astonished…"
                            xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[3]/text/word[position()=last()]"/>

    <eval expected="b2_5"   xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@prod-id"/>
    <eval expected="500000" xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@ipd"/>
    <eval expected="10000"  xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@space-before"/>
    <eval expected="(solid,#ff0000,1000)"
                            xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@border-before"/>
    <eval expected="In"     xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[1]"/>
    <eval expected="olden"  xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[2]"/>
  </checks>
</testcase>