Commit 94287b39 authored by ankraft's avatar ankraft
Browse files

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