aboutsummaryrefslogtreecommitdiffstats
path: root/fop/src/foschema/fop-configuration.xsd
blob: bd1c20d08484f8bbe1d027e75dec5b17f04d08ee (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<?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$ -->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified">

  <xsd:annotation>
    <xsd:documentation>This W3C schema document documents and validates the expected
      structure of a configuration file for FOP.</xsd:documentation>
  </xsd:annotation>

  <xsd:element name="fop">
    <xsd:complexType>
      <xsd:all>
        <xsd:element name="base" type="xsd:anyURI" minOccurs="0"/>
        <xsd:element name="font-base" type="xsd:anyURI" minOccurs="0"/>
        <xsd:element name="fonts" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="substitutions" maxOccurs="1" minOccurs="0"/>
              <xsd:element name="font" type="fontType" maxOccurs="unbounded" minOccurs="0"/>
              <xsd:element name="referenced-fonts" type="referenceFontType" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="hyphenation-base" type="xsd:anyURI" minOccurs="0"/>
        <xsd:element name="source-resolution" type="xsd:positiveInteger" minOccurs="0"/>
        <xsd:element name="target-resolution" type="xsd:positiveInteger" minOccurs="0"/>
        <xsd:element name="strict-validation" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="image-loading" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="penalty">
                <xsd:complexType>
                  <xsd:attribute name="value" type="xsd:positiveInteger" use="required"/>
                  <xsd:attribute name="class" type="xsd:string" use="required"/>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="strict-configuration" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="break-indent-inheritance" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="accessibility" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="use-cache" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="default-page-settings" minOccurs="0">
          <xsd:complexType>
            <xsd:attribute name="width" type="xsd:string" use="optional"/>
            <xsd:attribute name="height" type="xsd:string" use="optional"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="complex-scripts" minOccurs="0">
          <xsd:complexType>
            <xsd:attribute name="disabled" type="xsd:boolean"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="renderers" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="renderer" maxOccurs="unbounded" type="rendererType"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:all>
      <xsd:attribute name="version" use="optional">
        <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:enumeration value="1.0"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:attribute>
    </xsd:complexType>
  </xsd:element>
  <xsd:complexType name="rendererType">
    <xsd:annotation>
      <xsd:documentation>This type is stricter than required by FOP, in that it imposes an
      order of the elements, which is not required by FOP.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
      <xsd:choice>
        <xsd:element name="pdf-a-mode" type="xsd:string" minOccurs="0"/>
        <xsd:element name="pdf-x-mode" type="xsd:string" minOccurs="0"/>
        <xsd:element name="pdf-vt-mode" type="xsd:string" minOccurs="0"/>
        <xsd:element name="version" type="xsd:float" minOccurs="0"/>
        <xsd:element name="endianness" type="xsd:string" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>endianness is used by the TIFF renderer, MIME type image/tiff.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="color-mode" type="xsd:string" minOccurs="0"/>
        <xsd:element name="single-strip" type="xsd:boolean" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>single-strip is used by the TIFF renderer, MIME type image/tiff.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="line-width-correction" type="xsd:float" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>line-width-correction is used by the AFP renderer, MIME type application/x-afp.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="border-rendering-mode" type="xsd:string" minOccurs="0"/>
        <xsd:element name="filterList" minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>filterLists are used by the PDF renderer, MIME type
            application/pdf.</xsd:documentation>
          </xsd:annotation>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="value" type="xsd:string" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="type" use="optional">
              <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="default"/>
                  <xsd:enumeration value="content"/>
                  <xsd:enumeration value="image"/>
                  <xsd:enumeration value="jpeg"/>
                  <xsd:enumeration value="tiff"/>
                  <xsd:enumeration value="font"/>
                  <xsd:enumeration value="metadata"/>
                  <!-- Available values: see PDFFilterList.java -->
                </xsd:restriction>
              </xsd:simpleType>
            </xsd:attribute>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="encryption-params" minOccurs="0" maxOccurs="1">
          <xsd:annotation>
            <xsd:documentation>Optional parameters used by the PDF renderer.</xsd:documentation>
          </xsd:annotation>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="user-password" type="xsd:string" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="owner-password" type="xsd:string" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="noprint" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="nocopy" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="noedit" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="noannotations" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="encryption-length" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1"></xsd:element>
              <xsd:element name="encrypt-metadata" type="xsd:boolean" minOccurs="0" maxOccurs="1"></xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="output-profile" type="xsd:string" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>Output color profile used by the PDF renderer. Specifies a 
            filename to an ICC file.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="auto-rotate-landscape" type="xsd:boolean" default="false" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>When set to "true" a landscape page is automatically
              rotated and specified as a landscape page in PostScript.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="language-level" default="3" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>Specifies the PostScript language level to use when
              generating PostScript code.
              language-level is used by the PostScript renderer,
              MIME type application/postscript.</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:restriction base="xsd:positiveInteger">
              <xsd:enumeration value="2"/>
              <xsd:enumeration value="3"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="optimize-resources" type="xsd:boolean" default="false" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>When set to "true" PostScript resources are optimized by making a
              second pass over the PostScript file (rewriting it). Optimized means that no duplicate
              images are written to the stream and only used fonts are added to the PostScript file.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="rendering" minOccurs="0">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="speed"/>
              <xsd:enumeration value="quality"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="text-rendering" minOccurs="0">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="auto"/>
              <xsd:enumeration value="bitmap"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="transparent-page-background" type="xsd:boolean" default="false" minOccurs="0"/>
        <xsd:element name="encoding" type="xsd:string" default="UTF-8" minOccurs="0"/>
        <xsd:element name="compression" type="xsd:string" minOccurs="0"/>
        <xsd:element name="images" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="jpeg" minOccurs="0"/>
            </xsd:sequence>
            <xsd:attribute name="mode" type="xsd:string" use="optional"/>
            <xsd:attribute name="bits-per-pixel" type="xsd:positiveInteger" use="optional"/>
            <xsd:attribute name="fs45" type="xsd:boolean" use="optional"/>
            <xsd:attribute name="cmyk" type="xsd:boolean" use="optional"/>
            <xsd:attribute name="pseg" type="xsd:boolean" use="optional"/>
            <xsd:attribute name="f11x-pseg" type="xsd:boolean" use="optional"/>
          </xsd:complexType>
        </xsd:element>   
        <xsd:element name="shading" minOccurs="0" type="xsd:string"/>
        <xsd:element name="renderer-resolution" type="xsd:positiveInteger" minOccurs="0"/>
        <xsd:element name="fonts" minOccurs="1">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="font" type="fontType" maxOccurs="unbounded" minOccurs="0"/>
              <xsd:element name="referenced-fonts" type="referenceFontType" maxOccurs="unbounded" minOccurs="0"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="xmlHandler" minOccurs="1" maxOccurs="1">
          <xsd:complexType>
            <xsd:attribute name="mime" use="required">
              <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="text/svg+xml"/>
                  <xsd:enumeration value="image/svg+xml"/>
                </xsd:restriction>
              </xsd:simpleType>
              </xsd:attribute>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="xml-handler" minOccurs="0" maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:complexContent>
              <xsd:extension base="xsd:anyType"/>
            </xsd:complexContent>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="dsc-compliant" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="format" minOccurs="0">
          <xsd:complexType>
            <xsd:attribute name="type" type="xsd:string" use="required"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="link" minOccurs="0">
          <xsd:complexType>
            <xsd:attribute name="value" type="xsd:boolean" use="required"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="strokeText" minOccurs="0">
          <xsd:complexType>
            <xsd:attribute name="value" type="xsd:boolean" use="required"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="pageSize" minOccurs="0">
          <xsd:complexType>
            <xsd:attribute name="columns" type="xsd:positiveInteger" use="required"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="resource-group-file" type="xsd:string" minOccurs="0"/>
        <xsd:element name="default-resource-levels" minOccurs="0"/>
        <xsd:element name="merge-fonts" minOccurs="0"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="mime" type="MimeConstants" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="fontType">
    <xsd:sequence>
      <xsd:element name="afp-font" type="afpFontType" minOccurs="0" maxOccurs="unbounded"/>    
      <xsd:element name="font-triplet" type="fontTripletType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="metrics-url" type="xsd:anyURI" use="optional"/>
    <xsd:attribute name="embed-url" type="xsd:anyURI" use="optional"/>
    <xsd:attribute name="embed-url-afm" type="xsd:anyURI" use="optional"/>
    <xsd:attribute name="embed-url-pfm" type="xsd:anyURI" use="optional"/>
    <xsd:attribute name="sub-font" type="xsd:string" use="optional"/>
    <xsd:attribute name="name" type="xsd:string" use="optional"/>
    <xsd:attribute name="embedding-mode" use="optional">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="full"/>
          <xsd:enumeration value="subset"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="kerning" use="optional" default="no">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="yes"/>
          <xsd:enumeration value="no"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="encoding-mode" use="optional" default="auto">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="auto"/>
          <xsd:enumeration value="single-byte"/>
          <xsd:enumeration value="cid"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>

  <xsd:complexType name="fontTripletType">
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="style" type="xsd:string" use="required"/>
    <xsd:attribute name="weight" type="xsd:string" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="referenceFontType">
    <xsd:sequence>
      <xsd:element name="match">
        <xsd:complexType>
          <xsd:attribute name="font-family" type="xsd:string" use="optional"/>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="afpFontType">
    <xsd:sequence>
      <xsd:element name="afp-raster-font" type="afpRasterFont" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="encoding" type="xsd:string" use="required"/>
    <xsd:attribute name="codepage" type="xsd:string" use="required"/>
    <xsd:attribute name="type" type="xsd:string" use="required"/>
    <xsd:attribute name="name" type="xsd:string" use="optional"/>
    <xsd:attribute name="characterset" type="xsd:string" use="optional"/>
    <xsd:attribute name="base-uri" type="xsd:anyURI" use="optional"/>
    <xsd:attribute name="embed-uri" type="xsd:anyURI" use="optional"/>
    <xsd:attribute name="base14-font" type="xsd:string" use="optional"/>
    <xsd:attribute name="ebcdic-dbcs" type="xsd:boolean" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="afpRasterFont">
    <xsd:attribute name="size" type="xsd:float" use="required"/>
    <xsd:attribute name="base14-font" type="xsd:string" use="optional"/>
    <xsd:attribute name="characterset" type="xsd:string" use="required"/>
  </xsd:complexType>

  <xsd:simpleType name="MimeConstants">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="application/pdf"/>
      <xsd:enumeration value="application/postscript"/>
      <xsd:enumeration value="application/x-pcl"/>
      <xsd:enumeration value="application/vnd.hp-PCL"/>
      <xsd:enumeration value="application/x-afp"/>
      <xsd:enumeration value="application/vnd.ibm.modcap"/>
      <xsd:enumeration value="application/awt"/>
      <xsd:enumeration value="text/plain"/>
      <xsd:enumeration value="application/rtf"/>
      <xsd:enumeration value="text/richtext"/>
      <xsd:enumeration value="text/rtf"/>
      <xsd:enumeration value="text/xml"/>
      <xsd:enumeration value="application/mif"/>
      <xsd:enumeration value="application/X-fop-awt-preview"/>
      <xsd:enumeration value="application/X-fop-print"/>
      <xsd:enumeration value="application/X-fop-areatree"/>
      <xsd:enumeration value="image/png"/>
      <xsd:enumeration value="image/tiff"/>
      <xsd:enumeration value="image/svg+xml"/>
      <xsd:enumeration value="application/X-fop-intermediate-format"/>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>