aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
blob: c98bd45116aeef826c63ea39abe1bd9b3107cda4 (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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?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 leaders with leader-pattern="use-content"
    </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/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:flow flow-name="xsl-region-body">
          <fo:block>
            <fo:leader leader-length="36pt" leader-pattern="use-content">x</fo:leader>
               Content is "x"
          </fo:block>
          <fo:block>
            <fo:leader leader-length="36pt" leader-pattern="use-content"><fo:inline background-color="yellow">=></fo:inline></fo:leader>
               Content is "=>" with background
          </fo:block>
          <fo:block>
            <fo:leader leader-length="36pt" leader-pattern="use-content" leader-pattern-width="12pt"><fo:inline background-color="orange">~</fo:inline></fo:leader>
               Content is "~" with leader-pattern-width="12pt"
          </fo:block>
          <fo:block>
            <fo:leader leader-length="36pt" leader-pattern="use-content" leader-pattern-width="12pt"><fo:inline border="solid 1pt red" background-color="yellow">*</fo:inline></fo:leader>
               Content is "*" with leader-pattern-width="12pt" and border
          </fo:block>
          <fo:block>
            <fo:leader leader-length="36pt" leader-pattern="use-content" leader-pattern-width="12pt"><fo:inline border="solid 1pt red" font-size="6pt" alignment-baseline="middle" background-color="yellow">++</fo:inline></fo:leader>
               Content is "++" with l-p-w="12pt" and border small font
          </fo:block>
          <fo:block>
            <fo:leader leader-length="36pt" leader-pattern="use-content" leader-pattern-width="12pt"><fo:instream-foreign-object>
                <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10">
                <rect x="0" y="0" width="5" height="5" style="fill:red"/>
                <rect x="5" y="5" width="5" height="5" style="fill:black"/>
                </svg>
              </fo:instream-foreign-object></fo:leader>
              Content is svg 10 x 10
          </fo:block>
          <fo:block>
            <fo:leader leader-pattern="use-content"><fo:instream-foreign-object>
                <svg xmlns="http://www.w3.org/2000/svg" width="20" height="10">
                <rect x="0" y="0" width="10" height="5" style="fill:red"/>
                <rect x="10" y="5" width="10" height="5" style="fill:black"/>
                </svg>
                </fo:instream-foreign-object></fo:leader>
              Content is svg 20 x 10 which is wider than the leader-length
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/>
    <eval expected="36000" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/@offset"/>
    <eval expected="6000" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="6000" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[2]/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[2]/@offset"/>
    <eval expected="6000" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[3]/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[3]/@offset"/>
    <eval expected="6000" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[4]/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[4]/@offset"/>
    <eval expected="6000" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[5]/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[5]/@offset"/>
    <eval expected="6000" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[6]/@ipd"/>
    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/inlineparent[6]/@offset"/>
    
    <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/>
    <eval expected="36000" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[2]/lineArea/inlineparent/@offset"/>
    <eval expected="14016" xpath="//flow/block[2]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[2]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="14016" xpath="//flow/block[2]/lineArea/inlineparent/inlineparent[2]/@ipd"/>
    <eval expected="0" xpath="//flow/block[2]/lineArea/inlineparent/inlineparent[2]/@offset"/>
 
    <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/>
    <eval expected="36000" xpath="//flow/block[3]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[3]/lineArea/inlineparent/@offset"/>
    <eval expected="4992" xpath="//flow/block[3]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="7008" xpath="//flow/block[3]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[3]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="4992" xpath="//flow/block[3]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="7008" xpath="//flow/block[3]/lineArea/inlineparent/inlineparent[2]/@ipd"/>
    <eval expected="0" xpath="//flow/block[3]/lineArea/inlineparent/inlineparent[2]/@offset"/>
    <eval expected="4992" xpath="//flow/block[3]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="7008" xpath="//flow/block[3]/lineArea/inlineparent/inlineparent[3]/@ipd"/>
    <eval expected="0" xpath="//flow/block[3]/lineArea/inlineparent/inlineparent[3]/@offset"/>
 
    <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/>
    <eval expected="36000" xpath="//flow/block[4]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[4]/lineArea/inlineparent/@offset"/>
    <eval expected="5332" xpath="//flow/block[4]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="6668" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="1000 1000 1000 1000" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[1]/inlineparent/@bap"/>
    <eval expected="5332" xpath="//flow/block[4]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="6668" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[2]/@ipd"/>
    <eval expected="0" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[2]/@offset"/>
    <eval expected="1000 1000 1000 1000" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[2]/inlineparent/@bap"/>
    <eval expected="5332" xpath="//flow/block[4]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="6668" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[3]/@ipd"/>
    <eval expected="0" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[3]/@offset"/>
    <eval expected="1000 1000 1000 1000" xpath="//flow/block[4]/lineArea/inlineparent/inlineparent[3]/inlineparent/@bap"/>
 
    <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/>
    <eval expected="36000" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/@offset"/>
    <eval expected="2992" xpath="//flow/block[5]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="9008" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="2739" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[1]/inlineparent/@offset"/>
    <eval expected="1000 1000 1000 1000" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[1]/inlineparent/@bap"/>
    <eval expected="2992" xpath="//flow/block[5]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="9008" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[2]/@ipd"/>
    <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[2]/@offset"/>
    <eval expected="2739" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[2]/inlineparent/@offset"/>
    <eval expected="1000 1000 1000 1000" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[2]/inlineparent/@bap"/>
    <eval expected="2992" xpath="//flow/block[5]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="9008" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[3]/@ipd"/>
    <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[3]/@offset"/>
    <eval expected="2739" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[3]/inlineparent/@offset"/>
    <eval expected="1000 1000 1000 1000" xpath="//flow/block[5]/lineArea/inlineparent/inlineparent[3]/inlineparent/@bap"/>
 
    <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/>
    <eval expected="36000" xpath="//flow/block[6]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[6]/lineArea/inlineparent/@offset"/>
    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="10000" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="-1384" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[1]/viewport/@offset"/>
    <eval expected="0 0 0 0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[1]/viewport/@bap"/>
    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="10000" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[2]/@ipd"/>
    <eval expected="0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[2]/@offset"/>
    <eval expected="-1384" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[2]/viewport/@offset"/>
    <eval expected="0 0 0 0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[2]/viewport/@bap"/>
    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/space/@ipd"/>
    <eval expected="10000" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[3]/@ipd"/>
    <eval expected="0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[3]/@offset"/>
    <eval expected="-1384" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[3]/viewport/@offset"/>
    <eval expected="0 0 0 0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent[3]/viewport/@bap"/>
 
    <eval expected="11100" xpath="//flow/block[7]/lineArea/@bpd"/>
    <eval expected="20000" xpath="//flow/block[7]/lineArea/inlineparent/@ipd"/>
    <eval expected="0" xpath="//flow/block[7]/lineArea/inlineparent/@offset"/>
    <eval expected="20000" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/@ipd"/>
    <eval expected="0" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/@offset"/>
    <eval expected="20000" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/viewport/@ipd"/>
    <eval expected="-1384" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/viewport/@offset"/>
  </checks>
</testcase>