Annotation of Amaya/amaya/SVG.S, revision 1.4
1.1 vatton 1:
2: { Thot structure schema for Scalable Vector Graphics }
3:
4: STRUCTURE SVG;
5:
6: DEFPRES SVGP;
7:
8: ATTR
9:
10: { global attributes for all SVG elements }
11: id = text;
12: class = text;
13: PseudoClass = Text;
14: style_ = text;
15: xml_space = xml_space_default, xml_space_preserve;
1.3 cvs 16: { xml_base = Text; }
17:
1.1 vatton 18: { global attributes for internal processing }
1.2 cvs 19: Unknown_attribute = text;
1.1 vatton 20: Ghost_restruct = text;
21: Highlight = Yes_; { to show the SVG element corresponding to the
22: current selection in the source view }
23: Namespace = text; { for children of element foreignObject }
24: IntEmptyShape = yes_, no_;
25:
26: STRUCT
27:
28: SVG
29: (ATTR viewBox = text;
30: x = text;
31: y = text;
32: height_ = text;
33: width_ = text;
34: Charset = text)
1.2 cvs 35: = LIST OF (GraphicsElement) + (XMLcomment, XMLPI, Unknown_namespace);
1.1 vatton 36:
37: g
38: (ATTR fill = text;
39: stroke = text;
40: stroke_width = text;
41: transform = text)
42: = LIST OF (GraphicsElement);
43:
44: defs
1.3 cvs 45: (ATTR requiredFeatures = text;
46: requiredExtensions = text;
47: systemLanguage = text;
1.1 vatton 48: externalResourcesRequired = false, true;
49: fill;
50: stroke;
51: stroke_width;
52: transform;
53: { graphicsElementEvents })
54: = LIST OF (GraphicsElement);
55:
56: path
57: (ATTR externalResourcesRequired;
58: fill;
59: stroke;
60: stroke_width;
61: transform;
62: d = text;
63: pathLength = text)
64: = AGGREGATE
65: desc; title; metadata;
66: GRAPHICS;
67: END;
68:
69: rect
70: (ATTR transform;
71: x;
72: y;
73: width_;
74: height_;
75: rx = text;
76: ry = text;
77: fill;
78: stroke;
79: stroke_width)
80: = AGGREGATE
81: desc; title; metadata;
82: GRAPHICS;
83: END;
84:
85: circle
86: (ATTR transform;
87: cx = text;
88: cy = text;
89: r = text;
90: fill;
91: stroke;
92: stroke_width)
93: = AGGREGATE
94: desc; title; metadata;
95: GRAPHICS;
96: END;
97:
98: ellipse
99: (ATTR transform;
100: cx;
101: cy;
102: rx;
103: ry;
104: fill;
105: stroke;
106: stroke_width)
107: = AGGREGATE
108: desc; title; metadata;
109: GRAPHICS;
110: END;
111:
112: line_
113: (ATTR transform;
114: x1 = text;
115: y1 = text;
116: x2 = text;
117: y2 = text;
118: fill;
119: stroke;
120: stroke_width)
121: = AGGREGATE
122: desc; title; metadata;
123: GRAPHICS;
124: END;
125:
126: polyline
127: (ATTR width_;
128: height_;
129: transform;
130: points = text;
131: fill;
132: stroke;
133: stroke_width)
134: = AGGREGATE
135: desc; title; metadata;
136: GRAPHICS;
137: END;
138:
139: polygon
140: (ATTR width_;
141: height_;
142: transform;
143: points;
144: fill;
145: stroke;
146: stroke_width)
147: = AGGREGATE
148: desc; title; metadata;
149: GRAPHICS;
150: END;
151:
152: text_
153: (ATTR transform;
154: x;
155: y)
156: = LIST OF (TextComponent);
157:
158: tspan
159: (ATTR x;
160: y;
161: dx = text;
162: dy = text)
163: = LIST OF (SpanElement);
164:
165: { tref }
166: { textPath }
167: { altGlyph }
168: { altGlyphDef }
169: { glyphSub }
170: { font }
171: { glyph }
172: { missing-glyph }
173: { hkern }
174: { vkern }
175:
176: use_
177: (ATTR xlink_href = text;
1.3 cvs 178: requiredFeatures; requiredExtensions; systemLanguage;
1.1 vatton 179: externalResourcesRequired;
180: fill;
181: stroke;
182: stroke_width;
183: transform;
184: { graphicsElementEvents }
185: x;
186: y;
187: width_;
188: height_)
189: = AGGREGATE
190: desc; title; metadata;
191: END;
192:
193: image
194: (ATTR xlink_href;
195: transform;
196: x;
197: y;
198: width_;
199: height_)
200: = AGGREGATE
201: desc; ? title; ? metadata;
202: PICTURE;
203: SVG_Image;
204: END;
205:
206: symbol_
207: (ATTR externalResourcesRequired;
208: fill;
209: stroke;
210: stroke_width;
211: viewBox;
212: preserveAspectRatio = text;
213: { graphicsElementEvents })
214: = LIST OF (GraphicsElement);
215:
216: { marker }
217:
218: desc = TEXT;
219:
220: title = TEXT;
221:
222: { clipPath }
223: { mask }
224: { linearGradient }
225: { radialGradient }
226: { stop }
227: { pattern }
228:
229: a
230: (ATTR xlink_href;
1.3 cvs 231: requiredFeatures; requiredExtensions; systemLanguage;
1.1 vatton 232: externalResourcesRequired;
233: fill;
234: stroke;
235: stroke_width;
236: transform;
237: { graphicsElementEvents }
238: target_ = text)
239: = LIST OF (CASE OF
240: GraphicsElement; TextComponent;
241: END);
242:
243: { view }
244: { animate }
245: { set }
246: { animateMotion }
247: { animateColor }
248: { animateTransform }
249:
250: script
251: (ATTR externalResourcesRequired;
252: type = text)
253: = TEXT;
254:
255: style__
256: (ATTR type;
257: media = text;
258: title_ = text)
259: = TEXT;
260:
261: { color-profile }
262: { color-profile-src }
263: { font-face }
264: { font-face-src }
265: { font-face-uri }
266: { font-face-format }
267: { font-face-name }
268: { definition-src }
269: { cursor }
1.3 cvs 270:
271: switch
272: (ATTR requiredFeatures; requiredExtensions; systemLanguage;
273: externalResourcesRequired;
274: { PresentationAttributes-All }
275: transform;
276: { graphicsElementEvents })
277: = LIST OF (CASE OF
278: GraphicsElement; foreignObject;
279: END);
1.1 vatton 280:
281: foreignObject
282: (ATTR transform;
283: x;
284: y;
285: width_;
286: height_;
287: fill;
288: stroke)
289: = BEGIN CASE OF
290: HTML; MathML;
291: END;
292: END;
293:
294: metadata = TEXT;
295:
296: { filter }
297: { ... }
298:
299: GraphicsElement
300: = CASE OF
1.3 cvs 301: desc; title; metadata;
302: defs;
1.1 vatton 303: path; text_; rect; circle; ellipse; line_; polyline; polygon;
1.3 cvs 304: use_; image; SVG; g; switch; a;
1.1 vatton 305: script; style__; symbol_;
1.3 cvs 306: XLink;
1.1 vatton 307: END;
308:
309: TextComponent
310: = CASE OF
311: tspan; { must be the first option, to allow the Return key
312: to create tspan elements }
313: TEXT;
314: desc;
315: title;
316: metadata;
317: END;
318:
319: SpanElement
320: = CASE OF
321: TEXT;
322: tspan;
323: desc;
324: title;
325: metadata;
326: END;
327:
328: SVG_Image = SVG;
329:
330: XMLcomment = LIST OF (XMLcomment_line = TEXT);
331:
332: XMLPI = LIST OF (XMLPI_line = TEXT);
333:
1.2 cvs 334: Unknown_namespace = TEXT;
335:
1.1 vatton 336: EXCEPT
337:
338: SVG: IsDraw, MoveResize, NoMove;
339: g: NoMove, NoResize, HighlightChildren, NoShowBox,
340: NoCreate;
341: defs: NoMove, NoResize, NoShowBox, NoCreate;
342: rect: MoveResize, HighlightChildren, NoShowBox, NoCreate;
343: circle: MoveResize, HighlightChildren, NoShowBox, NoCreate;
344: ellipse: MoveResize, HighlightChildren, NoShowBox, NoCreate;
345: line_: MoveResize, HighlightChildren, NoShowBox, NoCreate;
346: polyline: MoveResize, HighlightChildren, NoShowBox, NoCreate;
347: polygon: MoveResize, HighlightChildren, NoShowBox, NoCreate;
348: path: MoveResize, HighlightChildren, NoShowBox, NoCreate;
349: text_: MoveResize, NoResize, NoShowBox, ReturnCreateWithin,
350: NoCreate;
351: tspan: NoShowBox;
352: use_: NoMove, NoResize, HighlightChildren, NoShowBox,
353: NoCreate;
354: image: MoveResize, HighlightChildren, NoShowBox;
355: symbol_: NoMove, NoResize, HighlightChildren,NoShowBox,
356: NoCreate;
357: a: NoMove, NoResize, HighlightChildren, NoShowBox,
358: NoCreate;
359: script: NoMove, NoResize, NoShowBox, NoCreate;
360: style__: NoMove, NoResize, NoShowBox, NoCreate;
1.4 ! cvs 361: switch: NoMove, NoResize, NoShowBox, NoCreate;
1.1 vatton 362: foreignObject: MoveResize, HighlightChildren, NoCreate;
1.4 ! cvs 363: SVG_Image: Hidden, SelectParent;
1.1 vatton 364: GRAPHICS: SelectParent;
365: PICTURE: NoMove, NoResize, SelectParent;
366: TEXT: NoMove, NoResize;
1.2 cvs 367: Unknown_namespace: NoCreate;
1.1 vatton 368:
369: id: CssId;
370: class: CssClass;
371: PseudoClass: Invisible, CssPseudoClass;
1.2 cvs 372: Unknown_attribute: Invisible;
1.1 vatton 373: Highlight: Invisible;
374: Ghost_restruct: Invisible;
375: Namespace: Invisible;
376: IntEmptyShape: Invisible;
377:
378: END
379:
380:
381:
Webmaster