Skip to content

Commit 71bea07

Browse files
authored
Merge pull request #115 from rudnerbjoern/dev
make flags/attributes in lifecycle alterable
2 parents aff791e + 55f0514 commit 71bea07

File tree

3 files changed

+59
-20
lines changed

3 files changed

+59
-20
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@
4343
"xs:documentation"
4444
],
4545
"xml.format.spaceBeforeEmptyCloseTag": true,
46+
"editor.formatOnSave": true,
47+
"editor.formatOnSaveMode": "modificationsIfAvailable",
4648
}

3.2/itop_design.xsd

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -519,22 +519,32 @@
519519
<xs:complexType>
520520
<xs:all>
521521
<xs:element name="hidden" minOccurs="0">
522-
<xs:complexType />
522+
<xs:complexType>
523+
<xs:attributeGroup ref="alteredNode" />
524+
</xs:complexType>
523525
</xs:element>
524526
<xs:element name="read_only" minOccurs="0">
525-
<xs:complexType />
527+
<xs:complexType>
528+
<xs:attributeGroup ref="alteredNode" />
529+
</xs:complexType>
526530
</xs:element>
527531
<xs:element name="must_prompt" minOccurs="0">
528-
<xs:complexType />
532+
<xs:complexType>
533+
<xs:attributeGroup ref="alteredNode" />
534+
</xs:complexType>
529535
</xs:element>
530536
<xs:element name="must_change" minOccurs="0">
531-
<xs:complexType />
537+
<xs:complexType>
538+
<xs:attributeGroup ref="alteredNode" />
539+
</xs:complexType>
532540
</xs:element>
533541
<xs:element name="mandatory" minOccurs="0">
534-
<xs:complexType />
542+
<xs:complexType>
543+
<xs:attributeGroup ref="alteredNode" />
544+
</xs:complexType>
535545
</xs:element>
536546
</xs:all>
537-
<xs:attribute name="id" type="xs:string" use="required" />
547+
<xs:attributeGroup ref="alteredIdNode" />
538548
</xs:complexType>
539549
</xs:element>
540550
</xs:sequence>
@@ -554,19 +564,27 @@
554564
<xs:complexType>
555565
<xs:all>
556566
<xs:element name="mandatory" minOccurs="0">
557-
<xs:complexType />
567+
<xs:complexType>
568+
<xs:attributeGroup ref="alteredNode" />
569+
</xs:complexType>
558570
</xs:element>
559571
<xs:element name="must_change" minOccurs="0">
560-
<xs:complexType />
572+
<xs:complexType>
573+
<xs:attributeGroup ref="alteredNode" />
574+
</xs:complexType>
561575
</xs:element>
562576
<xs:element name="must_prompt" minOccurs="0">
563-
<xs:complexType />
577+
<xs:complexType>
578+
<xs:attributeGroup ref="alteredNode" />
579+
</xs:complexType>
564580
</xs:element>
565581
<xs:element name="read_only" minOccurs="0">
566-
<xs:complexType />
582+
<xs:complexType>
583+
<xs:attributeGroup ref="alteredNode" />
584+
</xs:complexType>
567585
</xs:element>
568586
</xs:all>
569-
<xs:attribute name="id" type="xs:string" use="required" />
587+
<xs:attributeGroup ref="alteredIdNode" />
570588
</xs:complexType>
571589
</xs:element>
572590
</xs:sequence>
@@ -595,16 +613,14 @@
595613
</xs:complexType>
596614
</xs:element>
597615
</xs:all>
598-
<xs:attribute name="id" type="xs:string" use="required" />
599-
<xs:attributeGroup ref="alteredNode" />
616+
<xs:attributeGroup ref="alteredIdNode" />
600617
</xs:complexType>
601618
</xs:element>
602619
</xs:sequence>
603620
</xs:complexType>
604621
</xs:element>
605622
</xs:all>
606-
<xs:attribute name="id" type="xs:string" use="required" />
607-
<xs:attributeGroup ref="alteredNode" />
623+
<xs:attributeGroup ref="alteredIdNode" />
608624
</xs:complexType>
609625
</xs:element>
610626
</xs:sequence>

test/datamodel.must-validate.xml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@
111111
<field id="enumTest" xsi:type="AttributeEnum" _delta="define">
112112
<sql>enum_test</sql>
113113
<values>
114-
<value id="enum1">
115-
<code>enum1</code>
116-
<rank>10</rank>
117-
<style>
118-
<decoration_classes>decoration</decoration_classes>
114+
<value id="enum1" _delta="define">
115+
<code _delta="define">enum1</code>
116+
<rank _delta="define">10</rank>
117+
<style _delta="define">
118+
<decoration_classes _delta="define">decoration</decoration_classes>
119119
<main_color _delta="define">$ibo-lifecycle-active-state-primary-color</main_color>
120120
<complementary_color _delta="define">$ibo-lifecycle-active-state-secondary-color</complementary_color>
121121
</style>
@@ -456,6 +456,27 @@
456456
</method>
457457
<method id="TestMethod2" _delta="delete_if_exists" />
458458
</methods>
459+
<lifecycle>
460+
<states>
461+
<state id="state1" _delta="must_exist">
462+
<flags>
463+
<attribute id="attribute1" _delta="define">
464+
<mandatory _delta="define" />
465+
</attribute>
466+
</flags>
467+
<transitions>
468+
<transition id="transition1" _delta="define">
469+
<target>state2</target>
470+
<flags>
471+
<attribute id="attribute1" _delta="define">
472+
<mandatory _delta="define" />
473+
</attribute>
474+
</flags>
475+
</transition>
476+
</transitions>
477+
</state>
478+
</states>
479+
</lifecycle>
459480
<presentation>
460481
<details>
461482
<items>

0 commit comments

Comments
 (0)