Commit 94287b39 authored by ankraft's avatar ankraft

- Changed DeviceInfo to list of DeviceInfo elements.

- Made DeviceInfo list optional.
- Added <Args> around list of <Arg> to be consistent with other lists
parent c1a9f54f
......@@ -12,7 +12,7 @@ Domain =
# </attribute>
attribute xml:base { xsd:anyURI }?,
attribute id { xsd:ID },
Doc,
DocDef,
element Imports { Domain* }?,
element Modules {
element ModuleClass { ModuleDef }*
......@@ -20,29 +20,29 @@ Domain =
element Devices {
element Device {
attribute id { xsd:Name },
Doc,
DeviceInfo,
DocDef,
DeviceInfos?,
Modules?,
element SubDevices {
element SubDevice {
attribute id { xsd:Name },
Doc,
DeviceInfo,
DocDef,
DeviceInfos?,
Modules?
}*
}?
}*
}?
}
DeviceInfo =
element DeviceInfo {
element Name { text }
& element Vendor { text }
& element FirmwareVersion { text }?
& element SerialNumber { text }?
& element VendorURL { xsd:anyURI }?
DeviceInfos =
element DeviceInfos {
element DeviceInfo {
attribute name { text },
attribute optional { xsd:boolean }?,
DocDef,
DataTypeDef
}*
}
DataTypeElement = element DataType { DataTypeDef }
DataTypeDef =
# Discuss: Doc on DataType?
attribute unitOfMeasure { text }?,
......@@ -82,7 +82,8 @@ DocText =
| element em { text }
| element b { text }
| element tt { text })*
Doc =
# <Doc> element is always optional
DocDef =
element Doc {
DocText
| (element p { DocText }
......@@ -98,7 +99,7 @@ ModuleDef =
attribute domain { xsd:IDREF },
attribute class { text }
}?,
Doc,
DocDef,
Actions?,
Data?,
Events?
......@@ -111,13 +112,17 @@ Actions =
element Action {
attribute name { text },
attribute optional { xsd:boolean }?,
Doc,
DocDef,
DataTypeDef?,
element Arg {
attribute name { text },
Doc,
DataTypeDef
}*
ArgDef?
}*
}
ArgDef =
element Args {
element Arg {
attribute name { text },
DocDef,
DataTypeDef
}*
}
Data =
......@@ -128,7 +133,7 @@ Data =
attribute writable { xsd:boolean }?,
attribute readable { xsd:boolean }?,
attribute eventable { xsd:boolean }?,
Doc,
DocDef,
DataTypeDef
}*
}
......@@ -137,7 +142,7 @@ Events =
element Event {
attribute name { text },
attribute optional { xsd:boolean }?,
Doc,
DocDef,
Data
}*
}
......@@ -28,7 +28,7 @@
<attribute name="id">
<data type="ID"/>
</attribute>
<ref name="Doc"/>
<ref name="DocDef"/>
<optional>
<element name="Imports">
<zeroOrMore>
......@@ -52,8 +52,10 @@
<attribute name="id">
<data type="Name"/>
</attribute>
<ref name="Doc"/>
<ref name="DeviceInfo"/>
<ref name="DocDef"/>
<optional>
<ref name="DeviceInfos"/>
</optional>
<optional>
<ref name="Modules"/>
</optional>
......@@ -64,8 +66,10 @@
<attribute name="id">
<data type="Name"/>
</attribute>
<ref name="Doc"/>
<ref name="DeviceInfo"/>
<ref name="DocDef"/>
<optional>
<ref name="DeviceInfos"/>
</optional>
<optional>
<ref name="Modules"/>
</optional>
......@@ -81,38 +85,22 @@
</define>
<define name="DeviceInfo">
<element name="DeviceInfo">
<interleave>
<element name="Name">
<text/>
</element>
<element name="Vendor">
<text/>
</element>
<optional>
<element name="FirmwareVersion">
<text/>
</element>
</optional>
<optional>
<element name="SerialNumber">
<define name="DeviceInfos">
<element name="DeviceInfos">
<zeroOrMore>
<element name="DeviceInfo">
<attribute name="name">
<text/>
</element>
</optional>
<optional>
<element name="VendorURL">
<data type="anyURI"/>
</element>
</optional>
</interleave>
</element>
</define>
<define name="DataTypeElement">
<element name="DataType">
<ref name="DataTypeDef" />
</attribute>
<optional>
<attribute name="optional">
<data type="boolean"/>
</attribute>
</optional>
<ref name="DocDef"/>
<ref name="DataTypeDef" />
</element>
</zeroOrMore>
</element>
</define>
......@@ -209,7 +197,8 @@
</define>
<define name="Doc">
<!-- <Doc> element is always optional -->
<define name="DocDef">
<optional>
<element name="Doc">
<choice>
......@@ -250,7 +239,7 @@
<attribute name="class"/>
</element>
</optional>
<ref name="Doc"/>
<ref name="DocDef"/>
<optional>
<ref name="Actions"/>
</optional>
......@@ -286,22 +275,29 @@
<data type="boolean"/>
</attribute>
</optional>
<ref name="Doc"/>
<ref name="DocDef"/>
<optional>
<ref name="DataTypeDef"/>
</optional>
<zeroOrMore>
<element name="Arg">
<attribute name="name"/>
<ref name="Doc"/>
<ref name="DataTypeDef"/>
</element>
</zeroOrMore>
<optional>
<ref name="ArgDef" />
</optional>
</element>
</zeroOrMore>
</element>
</define>
<define name="ArgDef">
<element name="Args">
<zeroOrMore>
<element name="Arg">
<attribute name="name"/>
<ref name="DocDef"/>
<ref name="DataTypeDef"/>
</element>
</zeroOrMore>
</element>
</define>
<define name="Data">
<element name="Data">
......@@ -330,7 +326,7 @@
<data type="boolean"/>
</attribute>
</optional>
<ref name="Doc"/>
<ref name="DocDef"/>
<ref name="DataTypeDef"/>
</element>
</zeroOrMore>
......@@ -350,7 +346,7 @@
<data type="boolean"/>
</attribute>
</optional>
<ref name="Doc"/>
<ref name="DocDef"/>
<ref name="Data" />
</element>
</zeroOrMore>
......
......@@ -8,7 +8,7 @@
<xs:element name="Domain">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:group ref="DocDef"/>
<xs:element minOccurs="0" ref="Imports"/>
<xs:element minOccurs="0" name="Modules">
<xs:complexType>
......@@ -41,8 +41,8 @@
<xs:element name="Device">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:element ref="DeviceInfo"/>
<xs:group ref="DocDef"/>
<xs:element minOccurs="0" ref="DeviceInfos"/>
<xs:element minOccurs="0" ref="Modules"/>
<xs:element minOccurs="0" ref="SubDevices"/>
</xs:sequence>
......@@ -59,34 +59,28 @@
<xs:element name="SubDevice">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:element ref="DeviceInfo"/>
<xs:group ref="DocDef"/>
<xs:element minOccurs="0" ref="DeviceInfos"/>
<xs:element minOccurs="0" ref="Modules"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/>
</xs:complexType>
</xs:element>
<xs:element name="DeviceInfo">
<xs:element name="DeviceInfos">
<xs:complexType>
<xs:all>
<xs:element ref="Name"/>
<xs:element ref="Vendor"/>
<xs:element minOccurs="0" ref="FirmwareVersion"/>
<xs:element minOccurs="0" ref="SerialNumber"/>
<xs:element minOccurs="0" ref="VendorURL"/>
</xs:all>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="DeviceInfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Vendor" type="xs:string"/>
<xs:element name="FirmwareVersion" type="xs:string"/>
<xs:element name="SerialNumber" type="xs:string"/>
<xs:element name="VendorURL" type="xs:anyURI"/>
<xs:element name="DataType">
<xs:element name="DeviceInfo">
<xs:complexType>
<xs:sequence>
<xs:group ref="DocDef"/>
<xs:element ref="DataTypeDef"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
<xs:attribute name="optional" type="xs:boolean"/>
<xs:attributeGroup ref="DataTypeDef"/>
</xs:complexType>
</xs:element>
......@@ -146,7 +140,8 @@
<xs:element name="em" type="xs:string"/>
<xs:element name="b" type="xs:string"/>
<xs:element name="tt" type="xs:string"/>
<xs:group name="Doc">
<!-- <Doc> element is always optional -->
<xs:group name="DocDef">
<xs:sequence>
<xs:element minOccurs="0" ref="Doc"/>
</xs:sequence>
......@@ -179,7 +174,7 @@
<xs:complexType name="ModuleDef">
<xs:sequence>
<xs:element minOccurs="0" ref="extends"/>
<xs:group ref="Doc"/>
<xs:group ref="DocDef"/>
<xs:element minOccurs="0" ref="Actions"/>
<xs:element minOccurs="0" ref="Data"/>
<xs:element minOccurs="0" ref="Events"/>
......@@ -211,19 +206,26 @@
<xs:element name="Action">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:group ref="DocDef"/>
<xs:element minOccurs="0" ref="DataTypeDef"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Arg"/>
<xs:element minOccurs="0" ref="Args"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
<xs:attribute name="optional" type="xs:boolean"/>
<xs:attributeGroup ref="DataTypeDef"/>
</xs:complexType>
</xs:element>
<xs:element name="Args">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Arg"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Arg">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:group ref="DocDef"/>
<xs:element ref="DataTypeDef"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
......@@ -240,7 +242,7 @@
<xs:element name="DataPoint">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:group ref="DocDef"/>
<xs:element ref="DataTypeDef"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
......@@ -261,7 +263,7 @@
<xs:element name="Event">
<xs:complexType>
<xs:sequence>
<xs:group ref="Doc"/>
<xs:group ref="DocDef"/>
<xs:element ref="Data"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment