summaryrefslogtreecommitdiffstats
path: root/kpovmodeler/pminsertrules.dtd
blob: a3c2128cb3c53bc8033b55505ad2555c0b108e8b (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
<!-- Simple dtd for kpovmodeler insert rules
 Autor: Andreas Zehender <zehender@kde.org> -->

<!-- Validation command for xemacs:
 nsgmls -sv /usr/doc/jade-1.2.1/pubtext/xml.dcl <file> -->

<!-- The root element. -->
<!ELEMENT insertrules (definegroup*, targetclass+)>
<!ATTLIST insertrules
  format CDATA #REQUIRED
>

<!-- Groups together a list of classes. Groups can be nested. -->
<!ELEMENT definegroup ((class | group)+)>
<!ATTLIST definegroup
  name CDATA #REQUIRED
>

<!-- Reference to an object class. -->
<!ELEMENT class EMPTY>
<!ATTLIST class
  name CDATA #REQUIRED
>

<!-- Reference to a defined group. -->
<!ELEMENT group EMPTY>
<!ATTLIST group
  name CDATA #REQUIRED
>

<!-- Contains the insert rules for one class
 (the class where the new object is inserted) -->
<!ELEMENT targetclass (definegroup*, rule+)>
<!ATTLIST targetclass
  name CDATA #REQUIRED
>

<!-- One rule for the current class.
 Insert a list of groups and classes (the object classes that can be inserted)
 and one condition. If the condition is omitted,
 the classes can allways be inserted. --> 
<!ELEMENT rule ((group | class)+, (and | or | not | before | after | contains
                                   | greater | less | equal)?)>

<!-- Simple negation. Insert one condition -->
<!ELEMENT not (and | or | before | after | contains | greater | less | equal)>

<!-- Logical and. Insert any number of conditions -->
<!ELEMENT and (and | or | not | before | after | contains | greater | less | equal)+>

<!-- Logical or. Insert any number of conditions -->
<!ELEMENT or (and | or | not | before | after | contains | greater | less | equal)+>

<!-- Condition. Value is true if the object already contains
 objects of the given class or group before the insert point. -->
<!ELEMENT before (class | group)>

<!-- Condition. Value is true if the object already contains
 objects of the given class or group after the insert point. -->
<!ELEMENT after (class | group)>

<!-- Condition. Value is true if the two values (child xml tags)
 are equal. -->
<!ELEMENT equal ((property | count | const), (property | count | const))>

<!-- Condition. Value is true if the first value (child xml tag)
 is greater than the second. -->
<!ELEMENT greater ((property | count | const), (property | count | const))>

<!-- Condition. Value is true if the first value (child xml tag)
 is less than the second. -->
<!ELEMENT less ((property | count | const), (property | count | const))>

<!-- Condition. Value is true if the object contains
 objects of the given classes and groups. -->
<!ELEMENT contains (group | class)+>


<!-- Value. Value is the class property of the object, where the 
 new object should be inserted into. -->
<!ELEMENT property EMPTY>
<!ATTLIST property
  name CDATA #REQUIRED
>

<!-- Value. Defines a constant (number or string). -->
<!ELEMENT const EMPTY>
<!ATTLIST const
  value CDATA #REQUIRED
>

<!-- Value. Counts the number of already inserted instances of the given
 groups or classes. -->
<!ELEMENT count (group | class)+>