blob: 3db8aedb038a5b74cc881c90d6cc90a1fb9cc30b (
plain) (
blame)
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
|
-- @name XML2
-- @version 1.0
-- @domains XML technology
-- @authors Frédéric Jouault
-- @date 2007/05/28
-- @description This metamodel defines XML concepts in a way that makes TCS usable (i.e., by separating child attributes from child elements and text nodes).
package XML2 {
abstract class LocatedElement {
attribute location[0-1] : String;
attribute commentsBefore[*] ordered : String;
attribute commentsAfter[*] ordered : String;
}
abstract class Node extends LocatedElement {
reference parent[0-1] : Element oppositeOf children;
}
class Attribute extends LocatedElement {
attribute prefix[0-1] : String;
attribute name : String;
attribute value : String;
reference owner : Element oppositeOf attributes;
}
class Text extends Node {
attribute value : String;
}
class Element extends Node {
attribute prefix[0-1] : String;
attribute name : String;
reference attributes[*] ordered container : Attribute oppositeOf owner;
reference children[*] ordered container : Node oppositeOf parent;
}
class Root extends Element {}
}
package PrimitiveTypes {
datatype Boolean;
datatype Integer;
datatype String;
}
|