Commit 242cac83a1fe05009364350c44b107c648648356

Authored by ankraft
1 parent bb46481f

Add extend to data type. Updated test case.

... ... @@ -6,7 +6,7 @@
6 6 <id>UMLNote</id>
7 7 <coordinates>
8 8 <x>1390</x>
9   - <y>690</y>
  9 + <y>650</y>
10 10 <w>310</w>
11 11 <h>260</h>
12 12 </coordinates>
... ... @@ -37,7 +37,7 @@ group=1&lt;/panel_attributes&gt;
37 37 <id>Relation</id>
38 38 <coordinates>
39 39 <x>1520</x>
40   - <y>790</y>
  40 + <y>750</y>
41 41 <w>110</w>
42 42 <h>40</h>
43 43 </coordinates>
... ... @@ -52,7 +52,7 @@ group=1&lt;/panel_attributes&gt;
52 52 <id>Relation</id>
53 53 <coordinates>
54 54 <x>1520</x>
55   - <y>830</y>
  55 + <y>790</y>
56 56 <w>110</w>
57 57 <h>30</h>
58 58 </coordinates>
... ... @@ -65,7 +65,7 @@ group=1&lt;/panel_attributes&gt;
65 65 <id>UMLClass</id>
66 66 <coordinates>
67 67 <x>1580</x>
68   - <y>1130</y>
  68 + <y>1090</y>
69 69 <w>150</w>
70 70 <h>220</h>
71 71 </coordinates>
... ... @@ -89,7 +89,7 @@ void&lt;/panel_attributes&gt;
89 89 <id>Relation</id>
90 90 <coordinates>
91 91 <x>960</x>
92   - <y>1210</y>
  92 + <y>1170</y>
93 93 <w>140</w>
94 94 <h>80</h>
95 95 </coordinates>
... ... @@ -102,7 +102,7 @@ m1= 0..1
102 102 <id>Relation</id>
103 103 <coordinates>
104 104 <x>960</x>
105   - <y>1130</y>
  105 + <y>1090</y>
106 106 <w>140</w>
107 107 <h>80</h>
108 108 </coordinates>
... ... @@ -115,7 +115,7 @@ m1=0..1
115 115 <id>UMLClass</id>
116 116 <coordinates>
117 117 <x>480</x>
118   - <y>1130</y>
  118 + <y>1090</y>
119 119 <w>190</w>
120 120 <h>150</h>
121 121 </coordinates>
... ... @@ -125,8 +125,8 @@ m1=0..1
125 125 /@ unitOfMeasure : text/
126 126 /- Doc : Doc/
127 127 /- semanticURI : uri/
128   -- TypeChoice
129 128 /- extends : Extends/
  129 +/- TypeChoice/
130 130 /* Constraints : Constraint/
131 131 fg=blue</panel_attributes>
132 132 <additional_attributes/>
... ... @@ -135,7 +135,7 @@ fg=blue&lt;/panel_attributes&gt;
135 135 <id>Relation</id>
136 136 <coordinates>
137 137 <x>630</x>
138   - <y>1070</y>
  138 + <y>1030</y>
139 139 <w>710</w>
140 140 <h>130</h>
141 141 </coordinates>
... ... @@ -148,7 +148,7 @@ m2=1..n
148 148 <id>Relation</id>
149 149 <coordinates>
150 150 <x>630</x>
151   - <y>1070</y>
  151 + <y>1030</y>
152 152 <w>710</w>
153 153 <h>190</h>
154 154 </coordinates>
... ... @@ -161,7 +161,7 @@ m2=1
161 161 <id>UMLClass</id>
162 162 <coordinates>
163 163 <x>1080</x>
164   - <y>1250</y>
  164 + <y>1210</y>
165 165 <w>190</w>
166 166 <h>50</h>
167 167 </coordinates>
... ... @@ -175,7 +175,7 @@ fg=blue&lt;/panel_attributes&gt;
175 175 <id>Relation</id>
176 176 <coordinates>
177 177 <x>1260</x>
178   - <y>1270</y>
  178 + <y>1230</y>
179 179 <w>340</w>
180 180 <h>50</h>
181 181 </coordinates>
... ... @@ -188,7 +188,7 @@ m1= 1
188 188 <id>UMLClass</id>
189 189 <coordinates>
190 190 <x>1080</x>
191   - <y>1370</y>
  191 + <y>1330</y>
192 192 <w>190</w>
193 193 <h>110</h>
194 194 </coordinates>
... ... @@ -206,7 +206,7 @@ fg=blue&lt;/panel_attributes&gt;
206 206 <id>Relation</id>
207 207 <coordinates>
208 208 <x>660</x>
209   - <y>1230</y>
  209 + <y>1190</y>
210 210 <w>440</w>
211 211 <h>180</h>
212 212 </coordinates>
... ... @@ -219,7 +219,7 @@ m1=0..n
219 219 <id>Relation</id>
220 220 <coordinates>
221 221 <x>1260</x>
222   - <y>1340</y>
  222 + <y>1300</y>
223 223 <w>420</w>
224 224 <h>140</h>
225 225 </coordinates>
... ... @@ -232,7 +232,7 @@ m1=1
232 232 <id>UMLClass</id>
233 233 <coordinates>
234 234 <x>1080</x>
235   - <y>1130</y>
  235 + <y>1090</y>
236 236 <w>190</w>
237 237 <h>50</h>
238 238 </coordinates>
... ... @@ -246,7 +246,7 @@ fg=blue&lt;/panel_attributes&gt;
246 246 <id>UMLClass</id>
247 247 <coordinates>
248 248 <x>1080</x>
249   - <y>1190</y>
  249 + <y>1150</y>
250 250 <w>190</w>
251 251 <h>50</h>
252 252 </coordinates>
... ... @@ -260,7 +260,7 @@ fg=blue&lt;/panel_attributes&gt;
260 260 <id>Relation</id>
261 261 <coordinates>
262 262 <x>960</x>
263   - <y>1180</y>
  263 + <y>1140</y>
264 264 <w>140</w>
265 265 <h>50</h>
266 266 </coordinates>
... ... @@ -274,7 +274,7 @@ m1= 0..1
274 274 <id>UMLClass</id>
275 275 <coordinates>
276 276 <x>480</x>
277   - <y>990</y>
  277 + <y>950</y>
278 278 <w>1250</w>
279 279 <h>40</h>
280 280 </coordinates>
... ... @@ -289,7 +289,7 @@ lw=0.1&lt;/panel_attributes&gt;
289 289 <id>UMLClass</id>
290 290 <coordinates>
291 291 <x>100</x>
292   - <y>40</y>
  292 + <y>0</y>
293 293 <w>1590</w>
294 294 <h>40</h>
295 295 </coordinates>
... ... @@ -304,7 +304,7 @@ lw=0.1&lt;/panel_attributes&gt;
304 304 <id>UMLClass</id>
305 305 <coordinates>
306 306 <x>830</x>
307   - <y>170</y>
  307 + <y>130</y>
308 308 <w>220</w>
309 309 <h>180</h>
310 310 </coordinates>
... ... @@ -327,7 +327,7 @@ fg=blue
327 327 <id>UMLClass</id>
328 328 <coordinates>
329 329 <x>1170</x>
330   - <y>170</y>
  330 + <y>130</y>
331 331 <w>220</w>
332 332 <h>130</h>
333 333 </coordinates>
... ... @@ -346,7 +346,7 @@ fg=blue&lt;/panel_attributes&gt;
346 346 <id>UMLClass</id>
347 347 <coordinates>
348 348 <x>1520</x>
349   - <y>260</y>
  349 + <y>220</y>
350 350 <w>170</w>
351 351 <h>100</h>
352 352 </coordinates>
... ... @@ -363,7 +363,7 @@ fg=blue&lt;/panel_attributes&gt;
363 363 <id>Relation</id>
364 364 <coordinates>
365 365 <x>1380</x>
366   - <y>260</y>
  366 + <y>220</y>
367 367 <w>160</w>
368 368 <h>40</h>
369 369 </coordinates>
... ... @@ -375,7 +375,7 @@ m1= 0..n&lt;/panel_attributes&gt;
375 375 <id>UMLClass</id>
376 376 <coordinates>
377 377 <x>490</x>
378   - <y>170</y>
  378 + <y>130</y>
379 379 <w>220</w>
380 380 <h>150</h>
381 381 </coordinates>
... ... @@ -395,7 +395,7 @@ fg=blue&lt;/panel_attributes&gt;
395 395 <id>Relation</id>
396 396 <coordinates>
397 397 <x>700</x>
398   - <y>170</y>
  398 + <y>130</y>
399 399 <w>150</w>
400 400 <h>100</h>
401 401 </coordinates>
... ... @@ -407,7 +407,7 @@ m1= 0..n&lt;/panel_attributes&gt;
407 407 <id>UMLClass</id>
408 408 <coordinates>
409 409 <x>490</x>
410   - <y>480</y>
  410 + <y>440</y>
411 411 <w>220</w>
412 412 <h>110</h>
413 413 </coordinates>
... ... @@ -425,7 +425,7 @@ fg=blue&lt;/panel_attributes&gt;
425 425 <id>Relation</id>
426 426 <coordinates>
427 427 <x>700</x>
428   - <y>260</y>
  428 + <y>220</y>
429 429 <w>70</w>
430 430 <h>120</h>
431 431 </coordinates>
... ... @@ -438,7 +438,7 @@ m1=0..n
438 438 <id>Relation</id>
439 439 <coordinates>
440 440 <x>700</x>
441   - <y>480</y>
  441 + <y>440</y>
442 442 <w>150</w>
443 443 <h>70</h>
444 444 </coordinates>
... ... @@ -450,7 +450,7 @@ m1= 0..n&lt;/panel_attributes&gt;
450 450 <id>UMLClass</id>
451 451 <coordinates>
452 452 <x>1520</x>
453   - <y>540</y>
  453 + <y>500</y>
454 454 <w>170</w>
455 455 <h>50</h>
456 456 </coordinates>
... ... @@ -463,7 +463,7 @@ fg=blue&lt;/panel_attributes&gt;
463 463 <id>Relation</id>
464 464 <coordinates>
465 465 <x>1040</x>
466   - <y>170</y>
  466 + <y>130</y>
467 467 <w>150</w>
468 468 <h>70</h>
469 469 </coordinates>
... ... @@ -476,7 +476,7 @@ m1= 0..n
476 476 <id>Relation</id>
477 477 <coordinates>
478 478 <x>1440</x>
479   - <y>540</y>
  479 + <y>500</y>
480 480 <w>100</w>
481 481 <h>40</h>
482 482 </coordinates>
... ... @@ -488,7 +488,7 @@ m1=0..1&lt;/panel_attributes&gt;
488 488 <id>Relation</id>
489 489 <coordinates>
490 490 <x>1040</x>
491   - <y>230</y>
  491 + <y>190</y>
492 492 <w>150</w>
493 493 <h>120</h>
494 494 </coordinates>
... ... @@ -501,7 +501,7 @@ m1= 0..n
501 501 <id>UMLClass</id>
502 502 <coordinates>
503 503 <x>1170</x>
504   - <y>310</y>
  504 + <y>270</y>
505 505 <w>220</w>
506 506 <h>160</h>
507 507 </coordinates>
... ... @@ -524,7 +524,7 @@ fg=blue
524 524 <id>UMLClass</id>
525 525 <coordinates>
526 526 <x>1170</x>
527   - <y>480</y>
  527 + <y>440</y>
528 528 <w>220</w>
529 529 <h>110</h>
530 530 </coordinates>
... ... @@ -543,7 +543,7 @@ fg=blue&lt;/panel_attributes&gt;
543 543 <id>Relation</id>
544 544 <coordinates>
545 545 <x>1040</x>
546   - <y>330</y>
  546 + <y>290</y>
547 547 <w>150</w>
548 548 <h>190</h>
549 549 </coordinates>
... ... @@ -556,7 +556,7 @@ m1= 0..n
556 556 <id>Relation</id>
557 557 <coordinates>
558 558 <x>700</x>
559   - <y>330</y>
  559 + <y>290</y>
560 560 <w>150</w>
561 561 <h>240</h>
562 562 </coordinates>
... ... @@ -569,7 +569,7 @@ m1= 0..n
569 569 <id>UMLClass</id>
570 570 <coordinates>
571 571 <x>490</x>
572   - <y>340</y>
  572 + <y>300</y>
573 573 <w>220</w>
574 574 <h>130</h>
575 575 </coordinates>
... ... @@ -588,7 +588,7 @@ fg=blue&lt;/panel_attributes&gt;
588 588 <id>Relation</id>
589 589 <coordinates>
590 590 <x>700</x>
591   - <y>430</y>
  591 + <y>390</y>
592 592 <w>70</w>
593 593 <h>100</h>
594 594 </coordinates>
... ... @@ -600,7 +600,7 @@ m1=0..n&lt;/panel_attributes&gt;
600 600 <id>Relation</id>
601 601 <coordinates>
602 602 <x>700</x>
603   - <y>330</y>
  603 + <y>290</y>
604 604 <w>150</w>
605 605 <h>90</h>
606 606 </coordinates>
... ... @@ -612,7 +612,7 @@ m1= 0..n&lt;/panel_attributes&gt;
612 612 <id>Relation</id>
613 613 <coordinates>
614 614 <x>700</x>
615   - <y>410</y>
  615 + <y>370</y>
616 616 <w>150</w>
617 617 <h>100</h>
618 618 </coordinates>
... ... @@ -623,7 +623,7 @@ m1= 0..n&lt;/panel_attributes&gt;
623 623 <id>UMLClass</id>
624 624 <coordinates>
625 625 <x>830</x>
626   - <y>460</y>
  626 + <y>420</y>
627 627 <w>220</w>
628 628 <h>130</h>
629 629 </coordinates>
... ... @@ -643,7 +643,7 @@ transparency=80&lt;/panel_attributes&gt;
643 643 <id>Relation</id>
644 644 <coordinates>
645 645 <x>1380</x>
646   - <y>290</y>
  646 + <y>250</y>
647 647 <w>80</w>
648 648 <h>260</h>
649 649 </coordinates>
... ... @@ -656,7 +656,7 @@ m1=0..n
656 656 <id>Relation</id>
657 657 <coordinates>
658 658 <x>1040</x>
659   - <y>330</y>
  659 + <y>290</y>
660 660 <w>70</w>
661 661 <h>190</h>
662 662 </coordinates>
... ... @@ -668,7 +668,7 @@ m1=0..n&lt;/panel_attributes&gt;
668 668 <id>UMLClass</id>
669 669 <coordinates>
670 670 <x>780</x>
671   - <y>1140</y>
  671 + <y>1100</y>
672 672 <w>190</w>
673 673 <h>110</h>
674 674 </coordinates>
... ... @@ -687,7 +687,7 @@ Enum : EnumType
687 687 <id>Relation</id>
688 688 <coordinates>
689 689 <x>660</x>
690   - <y>1150</y>
  690 + <y>1110</y>
691 691 <w>140</w>
692 692 <h>80</h>
693 693 </coordinates>
... ... @@ -700,7 +700,7 @@ m1= 1
700 700 <id>UMLClass</id>
701 701 <coordinates>
702 702 <x>100</x>
703   - <y>360</y>
  703 + <y>320</y>
704 704 <w>330</w>
705 705 <h>230</h>
706 706 </coordinates>
... ... @@ -725,7 +725,7 @@ fg=blue&lt;/panel_attributes&gt;
725 725 <id>Relation</id>
726 726 <coordinates>
727 727 <x>420</x>
728   - <y>350</y>
  728 + <y>310</y>
729 729 <w>90</w>
730 730 <h>50</h>
731 731 </coordinates>
... ... @@ -738,7 +738,7 @@ m1=0..1
738 738 <id>Relation</id>
739 739 <coordinates>
740 740 <x>280</x>
741   - <y>140</y>
  741 + <y>100</y>
742 742 <w>570</w>
743 743 <h>240</h>
744 744 </coordinates>
... ... @@ -750,7 +750,7 @@ m1=0..1
750 750 <id>Relation</id>
751 751 <coordinates>
752 752 <x>280</x>
753   - <y>560</y>
  753 + <y>520</y>
754 754 <w>570</w>
755 755 <h>90</h>
756 756 </coordinates>
... ... @@ -762,7 +762,7 @@ m1= 0..n&lt;/panel_attributes&gt;
762 762 <id>Relation</id>
763 763 <coordinates>
764 764 <x>420</x>
765   - <y>480</y>
  765 + <y>440</y>
766 766 <w>90</w>
767 767 <h>40</h>
768 768 </coordinates>
... ... @@ -774,7 +774,7 @@ m1=0..n&lt;/panel_attributes&gt;
774 774 <id>UMLClass</id>
775 775 <coordinates>
776 776 <x>1080</x>
777   - <y>1310</y>
  777 + <y>1270</y>
778 778 <w>190</w>
779 779 <h>50</h>
780 780 </coordinates>
... ... @@ -788,7 +788,7 @@ fg=blue&lt;/panel_attributes&gt;
788 788 <id>Relation</id>
789 789 <coordinates>
790 790 <x>960</x>
791   - <y>1220</y>
  791 + <y>1180</y>
792 792 <w>140</w>
793 793 <h>130</h>
794 794 </coordinates>
... ... @@ -801,7 +801,7 @@ m1=0..1
801 801 <id>UMLClass</id>
802 802 <coordinates>
803 803 <x>1330</x>
804   - <y>1330</y>
  804 + <y>1290</y>
805 805 <w>210</w>
806 806 <h>110</h>
807 807 </coordinates>
... ... @@ -819,7 +819,7 @@ fg=blue&lt;/panel_attributes&gt;
819 819 <id>Relation</id>
820 820 <coordinates>
821 821 <x>1260</x>
822   - <y>1320</y>
  822 + <y>1280</y>
823 823 <w>90</w>
824 824 <h>50</h>
825 825 </coordinates>
... ... @@ -832,7 +832,7 @@ m1=1..n
832 832 <id>Relation</id>
833 833 <coordinates>
834 834 <x>1530</x>
835   - <y>1340</y>
  835 + <y>1300</y>
836 836 <w>120</w>
837 837 <h>80</h>
838 838 </coordinates>
... ... @@ -844,7 +844,7 @@ m1=0..1&lt;/panel_attributes&gt;
844 844 <id>UMLClass</id>
845 845 <coordinates>
846 846 <x>490</x>
847   - <y>670</y>
  847 + <y>630</y>
848 848 <w>220</w>
849 849 <h>80</h>
850 850 </coordinates>
... ... @@ -861,7 +861,7 @@ fg=blue&lt;/panel_attributes&gt;
861 861 <id>UMLClass</id>
862 862 <coordinates>
863 863 <x>830</x>
864   - <y>670</y>
  864 + <y>630</y>
865 865 <w>220</w>
866 866 <h>70</h>
867 867 </coordinates>
... ... @@ -876,7 +876,7 @@ fg=blue&lt;/panel_attributes&gt;
876 876 <id>Relation</id>
877 877 <coordinates>
878 878 <x>700</x>
879   - <y>670</y>
  879 + <y>630</y>
880 880 <w>150</w>
881 881 <h>80</h>
882 882 </coordinates>
... ... @@ -888,7 +888,7 @@ m1= 0..n&lt;/panel_attributes&gt;
888 888 <id>Relation</id>
889 889 <coordinates>
890 890 <x>410</x>
891   - <y>660</y>
  891 + <y>620</y>
892 892 <w>100</w>
893 893 <h>50</h>
894 894 </coordinates>
... ...
... ... @@ -18,7 +18,7 @@ Domain =
18 18 ModuleClasses?,
19 19 element DeviceClasses {
20 20 element DeviceClass {
21   - attribute id { xsd:NCName },
  21 + attribute id { xsd:Name },
22 22 DocDef,
23 23 PropertiesDef?,
24 24 ModuleClasses?,
... ... @@ -48,7 +48,7 @@ DataTypeDef =
48 48 attribute name { text }?,
49 49 attribute unitOfMeasure { text }?,
50 50 DocDef,
51   - (StructType | ArrayType | SimpleType | EnumType),
  51 + (ExtendsDef | (StructType | ArrayType | SimpleType | EnumType)),
52 52 ConstraintsDef?
53 53 }
54 54 StructType = element Struct { DataTypeDef+ }
... ... @@ -107,8 +107,9 @@ ModuleClasses =
107 107 element ModuleClass {
108 108 attribute name { text },
109 109 attribute optional { xsd:boolean }?,
110   - ExtendsDef?,
111 110 DocDef,
  111 + ExtendsDef,
  112 + # TODO: singular
112 113 PropertiesDef?,
113 114 Actions?,
114 115 Data?,
... ... @@ -155,8 +156,9 @@ Events =
155 156 }+
156 157 }
157 158 ExtendsDef =
  159 + # TODO: singular
158 160 element extends {
159   - # TODO: Uppercase
  161 + # TODO: Uppercase , singular
160 162 attribute domain { xsd:IDREF },
161 163 attribute class { text },
162 164 element excludes {
... ... @@ -170,4 +172,4 @@ ExtendsDef =
170 172 }
171 173 }+
172 174 }?
173   - }
  175 + }?
... ...
... ... @@ -125,10 +125,13 @@
125 125 </optional>
126 126 <ref name="DocDef"/>
127 127 <choice>
128   - <ref name="StructType" />
129   - <ref name="ArrayType" />
130   - <ref name="SimpleType" />
131   - <ref name="EnumType" />
  128 + <ref name="ExtendsDef" />
  129 + <choice>
  130 + <ref name="StructType" />
  131 + <ref name="ArrayType" />
  132 + <ref name="SimpleType" />
  133 + <ref name="EnumType" />
  134 + </choice>
132 135 </choice>
133 136 <optional>
134 137 <ref name="ConstraintsDef"/>
... ... @@ -285,10 +288,8 @@
285 288 <data type="boolean"/>
286 289 </attribute>
287 290 </optional>
288   - <optional>
289   - <ref name="ExtendsDef" />
290   - </optional>
291 291 <ref name="DocDef"/>
  292 + <ref name="ExtendsDef" /> <!-- TODO: singular -->
292 293 <optional>
293 294 <ref name="PropertiesDef"/>
294 295 </optional>
... ... @@ -402,27 +403,29 @@
402 403 </define>
403 404  
404 405  
405   - <define name="ExtendsDef">
406   - <element name="extends"> <!-- TODO: Uppercase -->
407   - <attribute name="domain">
408   - <data type="IDREF"/>
409   - </attribute>
410   - <attribute name="class"/>
411   - <optional>
412   - <element name="excludes"> <!-- TODO: Uppercase + "...s" -> Excludes-->
413   - <oneOrMore>
414   - <element name="exclude">
415   - <attribute name="name">
416   - <text/>
417   - </attribute>
418   - <attribute name="type">
419   - <text/> <!-- TODO: add ExcludeTypes -->
420   - </attribute>
421   - </element>
422   - </oneOrMore>
423   - </element>
424   - </optional>
425   - </element>
  406 + <define name="ExtendsDef"> <!-- TODO: singular -->
  407 + <optional>
  408 + <element name="extends"> <!-- TODO: Uppercase , singular-->
  409 + <attribute name="domain">
  410 + <data type="IDREF"/>
  411 + </attribute>
  412 + <attribute name="class"/>
  413 + <optional>
  414 + <element name="excludes"> <!-- TODO: Uppercase + "...s" -> Excludes-->
  415 + <oneOrMore>
  416 + <element name="exclude">
  417 + <attribute name="name">
  418 + <text/>
  419 + </attribute>
  420 + <attribute name="type">
  421 + <text/> <!-- TODO: add ExcludeTypes -->
  422 + </attribute>
  423 + </element>
  424 + </oneOrMore>
  425 + </element>
  426 + </optional>
  427 + </element>
  428 + </optional>
426 429 </define>
427 430  
428 431 </grammar>
... ...
... ... @@ -17,15 +17,18 @@
17 17 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
18 18 <xs:element name="Domain">
19 19 <xs:complexType>
20   - <xs:sequence>
21   - <xs:group ref="DocDef"/>
22   - <xs:element minOccurs="0" ref="Imports"/>
23   - <xs:element minOccurs="0" ref="DataTypes"/>
24   - <xs:element minOccurs="0" ref="ModuleClasses"/>
25   - <xs:element minOccurs="0" ref="DeviceClasses"/>
26   - </xs:sequence>
27   - <xs:attribute ref="xml:base"/>
28   - <xs:attribute name="id" use="required" type="xs:ID"/>
  20 + <xs:complexContent>
  21 + <xs:extension base="DocDef">
  22 + <xs:sequence>
  23 + <xs:element minOccurs="0" ref="Imports"/>
  24 + <xs:element minOccurs="0" ref="DataTypes"/>
  25 + <xs:element minOccurs="0" ref="ModuleClasses"/>
  26 + <xs:element minOccurs="0" ref="DeviceClasses"/>
  27 + </xs:sequence>
  28 + <xs:attribute ref="xml:base"/>
  29 + <xs:attribute name="id" use="required" type="xs:ID"/>
  30 + </xs:extension>
  31 + </xs:complexContent>
29 32 </xs:complexType>
30 33 </xs:element>
31 34 <xs:element name="Imports">
... ... @@ -51,13 +54,16 @@
51 54 </xs:element>
52 55 <xs:element name="DeviceClass">
53 56 <xs:complexType>
54   - <xs:sequence>
55   - <xs:group ref="DocDef"/>
56   - <xs:element minOccurs="0" ref="Properties"/>
57   - <xs:element minOccurs="0" ref="ModuleClasses"/>
58   - <xs:element minOccurs="0" ref="SubDevices"/>
59   - </xs:sequence>
60   - <xs:attribute name="id" use="required" type="xs:NCName"/>
  57 + <xs:complexContent>
  58 + <xs:extension base="DocDef">
  59 + <xs:sequence>
  60 + <xs:element minOccurs="0" ref="Properties"/>
  61 + <xs:element minOccurs="0" ref="ModuleClasses"/>
  62 + <xs:element minOccurs="0" ref="SubDevices"/>
  63 + </xs:sequence>
  64 + <xs:attribute name="id" use="required" type="xs:Name"/>
  65 + </xs:extension>
  66 + </xs:complexContent>
61 67 </xs:complexType>
62 68 </xs:element>
63 69 <xs:element name="SubDevices">
... ... @@ -69,12 +75,15 @@
69 75 </xs:element>
70 76 <xs:element name="SubDevice">
71 77 <xs:complexType>
72   - <xs:sequence>
73   - <xs:group ref="DocDef"/>
74   - <xs:element minOccurs="0" ref="Properties"/>
75   - <xs:element minOccurs="0" ref="ModuleClasses"/>
76   - </xs:sequence>
77   - <xs:attribute name="id" use="required" type="xs:Name"/>
  78 + <xs:complexContent>
  79 + <xs:extension base="DocDef">
  80 + <xs:sequence>
  81 + <xs:element minOccurs="0" ref="Properties"/>
  82 + <xs:element minOccurs="0" ref="ModuleClasses"/>
  83 + </xs:sequence>
  84 + <xs:attribute name="id" use="required" type="xs:Name"/>
  85 + </xs:extension>
  86 + </xs:complexContent>
78 87 </xs:complexType>
79 88 </xs:element>
80 89 <xs:element name="Properties">
... ... @@ -86,29 +95,38 @@
86 95 </xs:element>
87 96 <xs:element name="Property">
88 97 <xs:complexType>
89   - <xs:sequence>
90   - <xs:group ref="DocDef"/>
91   - <xs:element ref="SimpleType"/>
92   - </xs:sequence>
93   - <xs:attribute name="name" use="required"/>
94   - <xs:attribute name="optional" type="xs:boolean"/>
95   - <xs:attribute name="value"/>
  98 + <xs:complexContent>
  99 + <xs:extension base="DocDef">
  100 + <xs:sequence>
  101 + <xs:element ref="SimpleType"/>
  102 + </xs:sequence>
  103 + <xs:attribute name="name" use="required"/>
  104 + <xs:attribute name="optional" type="xs:boolean"/>
  105 + <xs:attribute name="value"/>
  106 + </xs:extension>
  107 + </xs:complexContent>
96 108 </xs:complexType>
97 109 </xs:element>
98 110 <xs:element name="DataType">
99 111 <xs:complexType>
100   - <xs:sequence>
101   - <xs:group ref="DocDef"/>
102   - <xs:choice>
103   - <xs:element ref="Struct"/>
104   - <xs:element ref="Array"/>
105   - <xs:element ref="SimpleType"/>
106   - <xs:element ref="EnumType"/>
107   - </xs:choice>
108   - <xs:element minOccurs="0" ref="Constraints"/>
109   - </xs:sequence>
110   - <xs:attribute name="name"/>
111   - <xs:attribute name="unitOfMeasure"/>
  112 + <xs:complexContent>
  113 + <xs:extension base="DocDef">
  114 + <xs:sequence>
  115 + <xs:choice>
  116 + <xs:group ref="ExtendsDef"/>
  117 + <xs:choice>
  118 + <xs:element ref="Struct"/>
  119 + <xs:element ref="Array"/>
  120 + <xs:element ref="SimpleType"/>
  121 + <xs:element ref="EnumType"/>
  122 + </xs:choice>
  123 + </xs:choice>
  124 + <xs:element minOccurs="0" ref="Constraints"/>
  125 + </xs:sequence>
  126 + <xs:attribute name="name"/>
  127 + <xs:attribute name="unitOfMeasure"/>
  128 + </xs:extension>
  129 + </xs:complexContent>
112 130 </xs:complexType>
113 131 </xs:element>
114 132 <xs:element name="Struct">
... ... @@ -155,10 +173,13 @@
155 173 </xs:simpleType>
156 174 <xs:element name="EnumValue">
157 175 <xs:complexType>
158   - <xs:group ref="DocDef"/>
159   - <xs:attribute name="name" use="required"/>
160   - <xs:attribute name="value" use="required"/>
161   - <xs:attribute name="type" type="BasicType"/>
  176 + <xs:complexContent>
  177 + <xs:extension base="DocDef">
  178 + <xs:attribute name="name" use="required"/>
  179 + <xs:attribute name="value" use="required"/>
  180 + <xs:attribute name="type" type="BasicType"/>
  181 + </xs:extension>
  182 + </xs:complexContent>
162 183 </xs:complexType>
163 184 </xs:element>
164 185 <xs:element name="Constraints">
... ... @@ -170,10 +191,13 @@
170 191 </xs:element>
171 192 <xs:element name="Constraint">
172 193 <xs:complexType>
173   - <xs:group ref="DocDef"/>
174   - <xs:attribute name="name" use="required"/>
175   - <xs:attribute name="type" type="BasicType"/>
176   - <xs:attribute name="value"/>
  194 + <xs:complexContent>
  195 + <xs:extension base="DocDef">
  196 + <xs:attribute name="name" use="required"/>
  197 + <xs:attribute name="type" type="BasicType"/>
  198 + <xs:attribute name="value"/>
  199 + </xs:extension>
  200 + </xs:complexContent>
177 201 </xs:complexType>
178 202 </xs:element>
179 203 <xs:group name="DocText">
... ... @@ -189,11 +213,11 @@
189 213 <xs:element name="b" type="xs:string"/>
190 214 <xs:element name="tt" type="xs:string"/>
191 215 <!-- <Doc> element is always optional -->
192   - <xs:group name="DocDef">
  216 + <xs:complexType name="DocDef">
193 217 <xs:sequence>
194 218 <xs:element minOccurs="0" ref="Doc"/>
195 219 </xs:sequence>
196   - </xs:group>
  220 + </xs:complexType>
197 221 <xs:element name="Doc">
198 222 <xs:complexType mixed="true">
199 223 <xs:choice>
... ... @@ -228,16 +252,19 @@
228 252 </xs:element>
229 253 <xs:element name="ModuleClass">
230 254 <xs:complexType>
231   - <xs:sequence>
232   - <xs:element minOccurs="0" ref="extends"/>
233   - <xs:group ref="DocDef"/>
234   - <xs:element minOccurs="0" ref="Properties"/>
235   - <xs:element minOccurs="0" ref="Actions"/>
236   - <xs:element minOccurs="0" ref="Data"/>
237   - <xs:element minOccurs="0" ref="Events"/>
238   - </xs:sequence>
239   - <xs:attribute name="name" use="required"/>
240   - <xs:attribute name="optional" type="xs:boolean"/>
  255 + <xs:complexContent>
  256 + <xs:extension base="DocDef">
  257 + <xs:sequence>
  258 + <xs:group ref="ExtendsDef"/>
  259 + <xs:element minOccurs="0" ref="Properties"/>
  260 + <xs:element minOccurs="0" ref="Actions"/>
  261 + <xs:element minOccurs="0" ref="Data"/>
  262 + <xs:element minOccurs="0" ref="Events"/>
  263 + </xs:sequence>
  264 + <xs:attribute name="name" use="required"/>
  265 + <xs:attribute name="optional" type="xs:boolean"/>
  266 + </xs:extension>
  267 + </xs:complexContent>
241 268 </xs:complexType>
242 269 </xs:element>
243 270 <xs:element name="Actions">
... ... @@ -249,13 +276,16 @@
249 276 </xs:element>
250 277 <xs:element name="Action">
251 278 <xs:complexType>
252   - <xs:sequence>
253   - <xs:group ref="DocDef"/>
254   - <xs:element minOccurs="0" ref="DataType"/>
255   - <xs:element minOccurs="0" ref="Args"/>
256   - </xs:sequence>
257   - <xs:attribute name="name" use="required"/>
258   - <xs:attribute name="optional" type="xs:boolean"/>
  279 + <xs:complexContent>
  280 + <xs:extension base="DocDef">
  281 + <xs:sequence>
  282 + <xs:element minOccurs="0" ref="DataType"/>
  283 + <xs:element minOccurs="0" ref="Args"/>
  284 + </xs:sequence>
  285 + <xs:attribute name="name" use="required"/>
  286 + <xs:attribute name="optional" type="xs:boolean"/>
  287 + </xs:extension>
  288 + </xs:complexContent>
259 289 </xs:complexType>
260 290 </xs:element>
261 291 <xs:element name="Args">
... ... @@ -267,11 +297,14 @@
267 297 </xs:element>
268 298 <xs:element name="Arg">
269 299 <xs:complexType>
270   - <xs:sequence>
271   - <xs:group ref="DocDef"/>
272   - <xs:element ref="DataType"/>
273   - </xs:sequence>
274   - <xs:attribute name="name" use="required"/>
  300 + <xs:complexContent>
  301 + <xs:extension base="DocDef">
  302 + <xs:sequence>
  303 + <xs:element ref="DataType"/>
  304 + </xs:sequence>
  305 + <xs:attribute name="name" use="required"/>
  306 + </xs:extension>
  307 + </xs:complexContent>
275 308 </xs:complexType>
276 309 </xs:element>
277 310 <xs:element name="Data">
... ... @@ -283,15 +316,18 @@
283 316 </xs:element>
284 317 <xs:element name="DataPoint">
285 318 <xs:complexType>
286   - <xs:sequence>
287   - <xs:group ref="DocDef"/>
288   - <xs:element ref="DataType"/>
289   - </xs:sequence>
290   - <xs:attribute name="name" use="required"/>
291   - <xs:attribute name="optional" type="xs:boolean"/>
292   - <xs:attribute name="writable" type="xs:boolean"/>
293   - <xs:attribute name="readable" type="xs:boolean"/>
294   - <xs:attribute name="eventable" type="xs:boolean"/>
  319 + <xs:complexContent>
  320 + <xs:extension base="DocDef">
  321 + <xs:sequence>
  322 + <xs:element ref="DataType"/>
  323 + </xs:sequence>
  324 + <xs:attribute name="name" use="required"/>
  325 + <xs:attribute name="optional" type="xs:boolean"/>
  326 + <xs:attribute name="writable" type="xs:boolean"/>
  327 + <xs:attribute name="readable" type="xs:boolean"/>
  328 + <xs:attribute name="eventable" type="xs:boolean"/>
  329 + </xs:extension>
  330 + </xs:complexContent>
295 331 </xs:complexType>
296 332 </xs:element>
297 333 <xs:element name="Events">
... ... @@ -303,14 +339,22 @@
303 339 </xs:element>
304 340 <xs:element name="Event">
305 341 <xs:complexType>
306   - <xs:sequence>
307   - <xs:group ref="DocDef"/>
308   - <xs:element minOccurs="0" ref="Data"/>
309   - </xs:sequence>
310   - <xs:attribute name="name" use="required"/>
311   - <xs:attribute name="optional" type="xs:boolean"/>
312   - </xs:complexType>
313   - </xs:element>
  342 + <xs:complexContent>
  343 + <xs:extension base="DocDef">
  344 + <xs:sequence>
  345 + <xs:element minOccurs="0" ref="Data"/>
  346 + </xs:sequence>
  347 + <xs:attribute name="name" use="required"/>
  348 + <xs:attribute name="optional" type="xs:boolean"/>
  349 + </xs:extension>
  350 + </xs:complexContent>
  351 + </xs:complexType>
  352 + </xs:element>
  353 + <xs:group name="ExtendsDef">
  354 + <xs:sequence>
  355 + <xs:element minOccurs="0" ref="extends"/>
  356 + </xs:sequence>
  357 + </xs:group>
314 358 <xs:element name="extends">
315 359 <xs:complexType>
316 360 <xs:sequence>
... ...
... ... @@ -14,4 +14,18 @@
14 14 </EnumType>
15 15 </DataType>
16 16 </DataTypes>
  17 +
  18 + <ModuleClasses>
  19 + <ModuleClass name="TestDataTypes">
  20 + <Data>
  21 + <DataPoint name="TestDataPoint" writable="true">
  22 + <DataType>
  23 + <extends domain="datatypes-test" class="temperatureType" />
  24 + </DataType>
  25 + </DataPoint>
  26 + </Data>
  27 + </ModuleClass>
  28 + </ModuleClasses>
  29 +
  30 +
17 31 </Domain>
18 32 \ No newline at end of file
... ...
... ... @@ -155,11 +155,11 @@
155 155  
156 156 <ModuleClasses>
157 157 <ModuleClass name="rootPowerOnOff" optional="true">
158   - <extends domain="hgi.dal.core" class="BooleanState"/>
159 158 <Doc>
160 159 The proprietry interface for turning all switches of the extension block on and off.
161 160 The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
162 161 </Doc>
  162 + <extends domain="hgi.dal.core" class="BooleanState"/>
163 163 <Properties>
164 164 <Property name="version" value="1.0.0">
165 165 <Doc>Version for this ModuleClass</Doc>
... ...