1default namespace = "http://www.w3.org/2000/svg"
2namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
3
4
5##
6##     SVG 1.1 Basic Filter Module
7##     file: svg-basic-filter.rng
8##
9##     This is SVG, a language for describing two-dimensional graphics in XML.
10##     Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved.
11##
12##     $Id: svg-basic-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $
13##
14
15##
16##     Basic Filter
17##
18##         filter, feBlend, feColorMatrix, feComponentTransfer, feComposite,
19##         feFlood, feGaussianBlur, feImage, feMerge, feMergeNode, feOffset,
20##         feTile, feFuncR, feFuncG, feFuncB, feFuncA
21##
22##     This module declares markup to provide support for filter effect.
23##
24
25##
26##     Datatypes
27##
28[ xml:lang = "en" ]
29grammar {
30  FilterValue.datatype = xsd:string
31  NumberOptionalNumber.datatype = xsd:string
32  a:documentation [ "\x{a}" ~ "    SVG.Filter.attrib\x{a}" ~ "  " ]
33  SVG.Filter.extra.attrib = empty
34  SVG.Filter.attrib &=
35    attribute filter { FilterValue.datatype }?,
36    SVG.Filter.extra.attrib
37  a:documentation [ "\x{a}" ~ "    SVG.FilterColor.attrib\x{a}" ~ "  " ]
38  SVG.FilterColor.extra.attrib = empty
39  SVG.FilterColor.attrib &=
40    attribute color-interpolation-filters {
41      "auto" | "sRGB" | "linearRGB" | "inherit"
42    }?,
43    SVG.FilterColor.extra.attrib
44  a:documentation [ "\x{a}" ~ "    SVG.Filter.class\x{a}" ~ "  " ]
45  SVG.Filter.extra.class = notAllowed
46  SVG.Filter.class |= filter | SVG.Filter.extra.class
47  a:documentation [
48    "\x{a}" ~
49    "    SVG.FilterPrimitive.class\x{a}" ~
50    "  "
51  ]
52  SVG.FilterPrimitive.extra.class = notAllowed
53  SVG.FilterPrimitive.class =
54    feBlend
55    | feColorMatrix
56    | feComponentTransfer
57    | feComposite
58    | feFlood
59    | feGaussianBlur
60    | feImage
61    | feMerge
62    | feOffset
63    | feTile
64    | SVG.FilterPrimitive.extra.class
65  a:documentation [
66    "\x{a}" ~
67    "    SVG.FilterPrimitive.attrib\x{a}" ~
68    "  "
69  ]
70  SVG.FilterPrimitive.extra.attrib = empty
71  SVG.FilterPrimitive.attrib =
72    attribute x { Coordinate.datatype }?,
73    attribute y { Coordinate.datatype }?,
74    attribute width { Length.datatype }?,
75    attribute height { Length.datatype }?,
76    attribute result { text }?,
77    SVG.FilterPrimitive.extra.attrib
78  a:documentation [
79    "\x{a}" ~
80    "    SVG.FilterPrimitiveWithIn.attrib\x{a}" ~
81    "  "
82  ]
83  SVG.FilterPrimitiveWithIn.extra.attrib = empty
84  SVG.FilterPrimitiveWithIn.attrib =
85    SVG.FilterPrimitive.attrib,
86    attribute in { text }?,
87    SVG.FilterPrimitiveWithIn.extra.attrib
88  a:documentation [ "\x{a}" ~ "    filter: Filter Element\x{a}" ~ "  " ]
89  SVG.filter.content =
90    SVG.Description.class*, (animate | set | SVG.FilterPrimitive.class)*
91  filter = element filter { attlist.filter, SVG.filter.content }
92  attlist.filter &=
93    SVG.Core.attrib,
94    SVG.Style.attrib,
95    SVG.Presentation.attrib,
96    SVG.XLink.attrib,
97    SVG.External.attrib,
98    attribute x { Coordinate.datatype }?,
99    attribute y { Coordinate.datatype }?,
100    attribute width { Length.datatype }?,
101    attribute height { Length.datatype }?,
102    attribute filterRes { NumberOptionalNumber.datatype }?,
103    attribute filterUnits { "userSpaceOnUse" | "objectBoundingBox" }?,
104    attribute primitiveUnits { "userSpaceOnUse" | "objectBoundingBox" }?
105  a:documentation [
106    "\x{a}" ~
107    "    feBlend: Filter Effect Blend Element\x{a}" ~
108    "  "
109  ]
110  SVG.feBlend.content = (animate | set)*
111  feBlend = element feBlend { attlist.feBlend, SVG.feBlend.content }
112  attlist.feBlend &=
113    SVG.Core.attrib,
114    SVG.FilterColor.attrib,
115    SVG.FilterPrimitiveWithIn.attrib,
116    attribute in2 { text },
117    [ a:defaultValue = "normal" ]
118    attribute mode {
119      "normal" | "multiply" | "screen" | "darken" | "lighten"
120    }?
121  a:documentation [
122    "\x{a}" ~
123    "    feColorMatrix: Filter Effect Color Matrix Element\x{a}" ~
124    "  "
125  ]
126  SVG.feColorMatrix.content = (animate | set)*
127  feColorMatrix =
128    element feColorMatrix {
129      attlist.feColorMatrix, SVG.feColorMatrix.content
130    }
131  attlist.feColorMatrix &=
132    SVG.Core.attrib,
133    SVG.FilterColor.attrib,
134    SVG.FilterPrimitiveWithIn.attrib,
135    [ a:defaultValue = "matrix" ]
136    attribute type {
137      "matrix" | "saturate" | "hueRotate" | "luminanceToAlpha"
138    }?,
139    attribute values { text }?
140  a:documentation [
141    "\x{a}" ~
142    "    feComponentTransfer: Filter Effect Component Transfer Element\x{a}" ~
143    "  "
144  ]
145  SVG.feComponentTransfer.content =
146    feFuncR?, feFuncG?, feFuncB?, feFuncA?
147  feComponentTransfer =
148    element feComponentTransfer {
149      attlist.feComponentTransfer, SVG.feComponentTransfer.content
150    }
151  attlist.feComponentTransfer &=
152    SVG.Core.attrib,
153    SVG.FilterColor.attrib,
154    SVG.FilterPrimitiveWithIn.attrib
155  a:documentation [
156    "\x{a}" ~
157    "    feComposite: Filter Effect Composite Element\x{a}" ~
158    "  "
159  ]
160  SVG.feComposite.content = (animate | set)*
161  feComposite =
162    element feComposite { attlist.feComposite, SVG.feComposite.content }
163  attlist.feComposite &=
164    SVG.Core.attrib,
165    SVG.FilterColor.attrib,
166    SVG.FilterPrimitiveWithIn.attrib,
167    attribute in2 { text },
168    [ a:defaultValue = "over" ]
169    attribute operator {
170      "over" | "in" | "out" | "atop" | "xor" | "arithmetic"
171    }?,
172    attribute k1 { Number.datatype }?,
173    attribute k2 { Number.datatype }?,
174    attribute k3 { Number.datatype }?,
175    attribute k4 { Number.datatype }?
176  a:documentation [
177    "\x{a}" ~
178    "    feFlood: Filter Effect Flood Element\x{a}" ~
179    "  "
180  ]
181  SVG.feFlood.content = (animate | set | animateColor)*
182  feFlood = element feFlood { attlist.feFlood, SVG.feFlood.content }
183  attlist.feFlood &=
184    SVG.Core.attrib,
185    SVG.Style.attrib,
186    SVG.Color.attrib,
187    SVG.FilterColor.attrib,
188    SVG.FilterPrimitiveWithIn.attrib,
189    attribute flood-color { SVGColor.datatype }?,
190    attribute flood-opacity { OpacityValue.datatype }?
191  a:documentation [
192    "\x{a}" ~
193    "    feGaussianBlur: Filter Effect Gaussian Blur Element\x{a}" ~
194    "  "
195  ]
196  SVG.feGaussianBlur.content = (animate | set)*
197  feGaussianBlur =
198    element feGaussianBlur {
199      attlist.feGaussianBlur, SVG.feGaussianBlur.content
200    }
201  attlist.feGaussianBlur &=
202    SVG.Core.attrib,
203    SVG.FilterColor.attrib,
204    SVG.FilterPrimitiveWithIn.attrib,
205    attribute stdDeviation { NumberOptionalNumber.datatype }?
206  a:documentation [
207    "\x{a}" ~
208    "    feImage: Filter Effect Image Element\x{a}" ~
209    "  "
210  ]
211  SVG.feImage.content = (animate | set | animateTransform)*
212  feImage = element feImage { attlist.feImage, SVG.feImage.content }
213  attlist.feImage &=
214    SVG.Core.attrib,
215    SVG.Style.attrib,
216    SVG.Presentation.attrib,
217    SVG.FilterPrimitive.attrib,
218    SVG.XLinkEmbed.attrib,
219    SVG.External.attrib,
220    [ a:defaultValue = "xMidYMid meet" ]
221    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?
222  a:documentation [
223    "\x{a}" ~
224    "    feMerge: Filter Effect Merge Element\x{a}" ~
225    "  "
226  ]
227  SVG.feMerge.content = feMergeNode*
228  feMerge = element feMerge { attlist.feMerge, SVG.feMerge.content }
229  attlist.feMerge &=
230    SVG.Core.attrib, SVG.FilterColor.attrib, SVG.FilterPrimitive.attrib
231  a:documentation [
232    "\x{a}" ~
233    "    feMergeNode: Filter Effect Merge Node Element\x{a}" ~
234    "  "
235  ]
236  SVG.feMergeNode.content = (animate | set)*
237  feMergeNode =
238    element feMergeNode { attlist.feMergeNode, SVG.feMergeNode.content }
239  attlist.feMergeNode &=
240    SVG.Core.attrib,
241    attribute in { text }?
242  a:documentation [
243    "\x{a}" ~
244    "    feOffset: Filter Effect Offset Element\x{a}" ~
245    "  "
246  ]
247  SVG.feOffset.content = (animate | set)*
248  feOffset = element feOffset { attlist.feOffset, SVG.feOffset.content }
249  attlist.feOffset &=
250    SVG.Core.attrib,
251    SVG.FilterColor.attrib,
252    SVG.FilterPrimitiveWithIn.attrib,
253    attribute dx { Number.datatype }?,
254    attribute dy { Number.datatype }?
255  a:documentation [
256    "\x{a}" ~
257    "    feTile: Filter Effect Tile Element\x{a}" ~
258    "  "
259  ]
260  SVG.feTile.content = (animate | set)*
261  feTile = element feTile { attlist.feTile, SVG.feTile.content }
262  attlist.feTile &=
263    SVG.Core.attrib,
264    SVG.FilterColor.attrib,
265    SVG.FilterPrimitiveWithIn.attrib
266  a:documentation [
267    "\x{a}" ~
268    "    feFuncR: Filter Effect Function Red Element\x{a}" ~
269    "  "
270  ]
271  SVG.feFuncR.content = (animate | set)*
272  feFuncR = element feFuncR { attlist.feFuncR, SVG.feFuncR.content }
273  attlist.feFuncR &=
274    SVG.Core.attrib,
275    attribute type {
276      "identity" | "table" | "discrete" | "linear" | "gamma"
277    },
278    attribute tableValues { text }?,
279    attribute slope { Number.datatype }?,
280    attribute intercept { Number.datatype }?,
281    attribute amplitude { Number.datatype }?,
282    attribute exponent { Number.datatype }?,
283    attribute offset { Number.datatype }?
284  a:documentation [
285    "\x{a}" ~
286    "    feFuncG: Filter Effect Function Green Element\x{a}" ~
287    "  "
288  ]
289  SVG.feFuncG.content = (animate | set)*
290  feFuncG = element feFuncG { attlist.feFuncG, SVG.feFuncG.content }
291  attlist.feFuncG &=
292    SVG.Core.attrib,
293    attribute type {
294      "identity" | "table" | "discrete" | "linear" | "gamma"
295    },
296    attribute tableValues { text }?,
297    attribute slope { Number.datatype }?,
298    attribute intercept { Number.datatype }?,
299    attribute amplitude { Number.datatype }?,
300    attribute exponent { Number.datatype }?,
301    attribute offset { Number.datatype }?
302  a:documentation [
303    "\x{a}" ~
304    "    feFuncB: Filter Effect Function Blue Element\x{a}" ~
305    "  "
306  ]
307  SVG.feFuncB.content = (animate | set)*
308  feFuncB = element feFuncB { attlist.feFuncB, SVG.feFuncB.content }
309  attlist.feFuncB &=
310    SVG.Core.attrib,
311    attribute type {
312      "identity" | "table" | "discrete" | "linear" | "gamma"
313    },
314    attribute tableValues { text }?,
315    attribute slope { Number.datatype }?,
316    attribute intercept { Number.datatype }?,
317    attribute amplitude { Number.datatype }?,
318    attribute exponent { Number.datatype }?,
319    attribute offset { Number.datatype }?
320  a:documentation [
321    "\x{a}" ~
322    "    feFuncA: Filter Effect Function Alpha Element\x{a}" ~
323    "  "
324  ]
325  SVG.feFuncA.content = (animate | set)*
326  feFuncA = element feFuncA { attlist.feFuncA, SVG.feFuncA.content }
327  attlist.feFuncA &=
328    SVG.Core.attrib,
329    attribute type {
330      "identity" | "table" | "discrete" | "linear" | "gamma"
331    },
332    attribute tableValues { text }?,
333    attribute slope { Number.datatype }?,
334    attribute intercept { Number.datatype }?,
335    attribute amplitude { Number.datatype }?,
336    attribute exponent { Number.datatype }?,
337    attribute offset { Number.datatype }?
338}
339