Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SDT/schema2.0/docs/SDT Build System.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ After cloning the repository go to the directoy *SDT/schema* and run commands de
### Build the Schema
Running *ant* without any parameter builds the schema definition from the rng-definition [SDT/schema2.0/src/domain.rng](src/domain.rng) and writes it to [SDT/schema2.0/src/domain.xsd](src/domain.xsd)

$ cd SDT/schema
$ cd SDT/schema2.0
$ ant

### Validate SDT Definitions
You can use the build system to validate new SDT definitions or changes made to existing ones by running the following command:

$ cd SDT/schema
$ cd SDT/schema2.0
$ ant validate

The output after a successful validation should look like this:
Expand Down
11 changes: 9 additions & 2 deletions SDT/schema2.0/etc/domain.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ ModuleDef =
Doc,
Actions?,
Data?,
Events?
Events?,
element ModuleRef { ModuleRef }*
ModuleRef =
attribute name { text }?,
attribute domain { xsd:IDREF },
attribute class { text }
Modules =
element Modules {
element Module { ModuleDef }*
Expand All @@ -86,8 +91,10 @@ Actions =
element Actions {
element Action {
attribute name { text },
attribute type { DataType }?,
attribute type { xsd:string }?,
attribute rt { xsd:string }?,
Doc,
element ModArg { ModuleRef }*,
element Arg {
attribute name { text },
attribute type { DataType },
Expand Down
28 changes: 27 additions & 1 deletion SDT/schema2.0/src/domain.rng
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,22 @@
<optional>
<ref name="Events"/>
</optional>
<zeroOrMore>
<element name="ModuleRef">
<ref name="ModuleRef"/>
</element>
</zeroOrMore>
</define>


<define name="ModuleRef">
<optional>
<attribute name="name"/>
</optional>
<attribute name="domain">
<data type="IDREF"/>
</attribute>
<attribute name="class"/>
</define>


Expand All @@ -220,10 +236,20 @@
</attribute>
<optional>
<attribute name="type">
<ref name="DataType"/>
<data type="string"/>
</attribute>
</optional>
<optional>
<attribute name="rt">
<data type="string"/>
</attribute>
</optional>
<ref name="Doc"/>
<zeroOrMore>
<element name="ModArg">
<ref name="ModuleRef"/>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="Arg">
<attribute name="name"/>
Expand Down
20 changes: 19 additions & 1 deletion SDT/schema2.0/src/domain.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
<xs:element minOccurs="0" ref="Actions"/>
<xs:element minOccurs="0" ref="Data"/>
<xs:element minOccurs="0" ref="Events"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="ModuleRef"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
</xs:complexType>
Expand All @@ -158,6 +159,16 @@
<xs:attribute name="class" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="ModuleRef">
<xs:complexType>
<xs:attributeGroup ref="ModuleRef"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="ModuleRef">
<xs:attribute name="name"/>
<xs:attribute name="domain" use="required" type="xs:IDREF"/>
<xs:attribute name="class" use="required"/>
</xs:attributeGroup>
<xs:element name="Modules">
<xs:complexType>
<xs:sequence>
Expand All @@ -177,10 +188,17 @@
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="ModArg"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Arg"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
<xs:attribute name="type" type="DataType"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="rt" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="ModArg">
<xs:complexType>
<xs:attributeGroup ref="ModuleRef"/>
</xs:complexType>
</xs:element>
<xs:element name="Arg">
Expand Down
Loading