blob: 2e58a7f4545721d14f18192efac7961713455d0b (
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
|
<?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$ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://xmlgraphics.apache.org/fop/intermediate"
xmlns:mf="http://xmlgraphics.apache.org/fop/intermediate">
<xs:include schemaLocation="fop-intermediate-format-ng-datatypes.xsd"/>
<xs:complexType name="contentType">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="viewport">
<xs:complexType>
<xs:complexContent>
<xs:extension base="mf:contentType">
<xs:attribute name="transform" type="xs:string"/>
<xs:attributeGroup ref="mf:sizeAtts"/>
<xs:attribute name="clip-rect" type="mf:rectangleType"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="g">
<xs:complexType>
<xs:complexContent>
<xs:extension base="mf:contentType">
<xs:attribute name="transform" type="xs:string"/>
<xs:attribute name="layer" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="id">
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="font">
<xs:complexType>
<xs:attribute name="family" type="xs:string"/>
<xs:attribute name="style" type="mf:fontStyleType"/>
<xs:attribute name="variant" type="mf:fontVariantType"/>
<xs:attribute name="weight" type="mf:fontWeightType"/>
<xs:attribute name="stretch" type="mf:fontStretchType"/>
<xs:attribute name="size" type="mf:lengthType"/>
<xs:attribute name="color" type="mf:colorType"/>
</xs:complexType>
</xs:element>
<xs:element name="text">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="x" use="required" type="mf:lengthType"/>
<xs:attribute name="y" use="required" type="mf:lengthType"/>
<xs:attribute name="letter-spacing" type="mf:lengthType"/>
<xs:attribute name="word-spacing" type="mf:lengthType"/>
<xs:attribute name="dx" type="mf:lengthListType"/>
<xs:attribute name="dp" type="mf:dpListType"/>
<xs:attribute name="hyphenated" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="clip-rect">
<xs:complexType>
<xs:attributeGroup ref="mf:rectAtts"/>
</xs:complexType>
</xs:element>
<xs:element name="rect">
<xs:complexType>
<xs:attributeGroup ref="mf:rectAtts"/>
<xs:attributeGroup ref="mf:fillAtts"/>
<xs:attributeGroup ref="mf:borderAtts"/>
</xs:complexType>
</xs:element>
<xs:element name="line">
<xs:complexType>
<xs:attribute name="x1" use="required" type="mf:lengthType"/>
<xs:attribute name="y1" use="required" type="mf:lengthType"/>
<xs:attribute name="x2" use="required" type="mf:lengthType"/>
<xs:attribute name="y2" use="required" type="mf:lengthType"/>
<xs:attribute name="color" use="required" type="mf:colorType"/>
<xs:attribute name="stroke-width" use="required" type="mf:lengthType"/>
<xs:attribute name="style" use="required" type="mf:ruleStyle"/>
</xs:complexType>
</xs:element>
<xs:element name="border-rect">
<xs:complexType>
<xs:attributeGroup ref="mf:rectAtts"/>
<xs:attribute name="inner-background-color" type="mf:colorType"/>
<xs:attributeGroup ref="mf:borderAtts"/>
</xs:complexType>
</xs:element>
<xs:element name="image">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xs:anyType">
<!-- Either use element content with any namespace or xlink:href -->
<xs:attributeGroup ref="mf:rectAtts"/>
<xs:attributeGroup ref="mf:foreignAtts"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:attributeGroup name="sizeAtts">
<xs:attribute name="width" type="mf:lengthType" use="required"/>
<xs:attribute name="height" type="mf:lengthType" use="required"/>
</xs:attributeGroup>
<xs:attributeGroup name="posAtts">
<xs:attribute name="x" type="mf:lengthType" default="0"/>
<xs:attribute name="y" type="mf:lengthType" default="0"/>
</xs:attributeGroup>
<xs:attributeGroup name="rectAtts">
<xs:attributeGroup ref="mf:posAtts"/>
<xs:attributeGroup ref="mf:sizeAtts"/>
</xs:attributeGroup>
<xs:attributeGroup name="borderAtts">
<xs:attribute name="left" type="mf:borderDef"/>
<xs:attribute name="right" type="mf:borderDef"/>
<xs:attribute name="top" type="mf:borderDef"/>
<xs:attribute name="bottom" type="mf:borderDef"/>
</xs:attributeGroup>
<xs:attributeGroup name="fillAtts">
<xs:attribute name="fill" type="xs:string" default="none"/>
</xs:attributeGroup>
<!--xs:attributeGroup name="fillStrokeAtts">
<xs:attribute name="fill" type="xs:string" default="none"/>
<xs:attribute name="stroke" type="xs:string" default="none"/>
</xs:attributeGroup-->
<xs:attributeGroup name="foreignAtts">
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:attributeGroup>
<xs:attribute name="xmlSpace">
<!--
This is a copy of the definition of the xml:space attribute, from the schema for the XML
namespace. That schema can be found at http://www.w3.org/2001/xml.xsd.
Ideally we would want to re-use that schema. However, we don’t want to refer to it using an
import statement is it causes too many connections to the W3C website. Neither can we store a
local copy and ship it with FOP as its license is the W3C Document License and so far we are not
allowed to redistribute files under such a license.
See also https://issues.apache.org/jira/browse/LEGAL-111
-->
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:schema>
|