94 lines
3.8 KiB
XML
94 lines
3.8 KiB
XML
<?xml version="1.1" encoding="utf-8"?>
|
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
|
|
|
|
<!-- ############ Schema principale ############ -->
|
|
<xs:element name="ModelDesign">
|
|
<xs:complexType>
|
|
<xs:all>
|
|
<xs:element name="Machine">
|
|
<xs:complexType>
|
|
<xs:choice maxOccurs="unbounded">
|
|
<xs:element name="Variable" type="VariableType" maxOccurs="unbounded" minOccurs="0"/>
|
|
<xs:element name="Property" type="PropertyType" maxOccurs="unbounded" minOccurs="0"/>
|
|
<xs:element name="Component" type="ComponentType"/>
|
|
</xs:choice>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
</xs:all>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
|
|
|
|
<!-- ############ Componenti principali ############ -->
|
|
<xs:complexType name="ComponentType">
|
|
<xs:choice maxOccurs="unbounded">
|
|
<xs:element name="Property" type="PropertyType" maxOccurs="unbounded" minOccurs="0"/>
|
|
<xs:element name="Variable" type="VariableType" maxOccurs="unbounded" minOccurs="0"/>
|
|
<xs:element name="Condition" type="ConditionType" maxOccurs="unbounded" minOccurs="0"/>
|
|
<xs:element name="Component" type="ComponentType" maxOccurs="unbounded" minOccurs="0"/>
|
|
</xs:choice>
|
|
<xs:attribute name="Name" type="xs:string" use="required" />
|
|
</xs:complexType>
|
|
<xs:complexType name="PropertyType">
|
|
<xs:attribute name="SymbolicName" type="xs:string" />
|
|
<xs:attribute name="BrowseName" type="xs:string" />
|
|
<xs:attribute name="DataType" type="DataTypeType" />
|
|
<xs:attribute name="ValueRank" type="ValueRankType" />
|
|
<xs:attribute name="Value" type="xs:string" />
|
|
</xs:complexType>
|
|
<xs:complexType name="ConditionType">
|
|
<xs:attribute name="SymbolicName" type="xs:string" />
|
|
<xs:attribute name="BrowseName" type="xs:string" />
|
|
<xs:attribute name="DataType" type="DataTypeType" />
|
|
<xs:attribute name="ValueRank" type="ValueRankType" />
|
|
<xs:attribute name="Type" type="xs:string" />
|
|
<xs:attribute name="Units" type="xs:string" />
|
|
</xs:complexType>
|
|
<xs:complexType name="VariableType">
|
|
<xs:attribute name="SymbolicName" type="xs:string" use="required" />
|
|
<xs:attribute name="BrowseName" type="xs:string" use="required" />
|
|
<xs:attribute name="DataType" type="DataTypeType" use="required" />
|
|
<xs:attribute name="ValueRank" type="ValueRankType" use="required" />
|
|
<xs:attribute name="Units" type="xs:string" use="required" />
|
|
<xs:attribute name="CmsDataType" type="CmsDataTypeType" use="optional" />
|
|
<xs:attribute name="CmsDataIndex" type="xs:integer" use="optional" />
|
|
<xs:attribute name="CmsDataOpt" type="CmsDataOptType" use="optional" />
|
|
<xs:attribute name="SGroup" type="xs:integer" use="optional" />
|
|
<xs:attribute name="VGroup" type="xs:string" use="optional" />
|
|
<xs:attribute name="DBand" type="xs:decimal" use="optional" />
|
|
</xs:complexType>
|
|
|
|
|
|
<!-- ############ Validazione singoli attributi ############ -->
|
|
<xs:simpleType name="ValueRankType" final="restriction" >
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="Scalar" />
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
<xs:simpleType name="CmsDataTypeType" final="restriction" >
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="CounterList" />
|
|
<xs:enumeration value="StatusList" />
|
|
<xs:enumeration value="AnalogData" />
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
<xs:simpleType name="CmsDataOptType" final="restriction" >
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="HOURS" />
|
|
<xs:enumeration value="BIT" />
|
|
<xs:enumeration value="NUM" />
|
|
<xs:enumeration value="COUNT" />
|
|
<xs:enumeration value="METER" />
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
<xs:simpleType name="DataTypeType" final="restriction" >
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="ua:String" />
|
|
<xs:enumeration value="ua:Boolean" />
|
|
<xs:enumeration value="ua:Float" />
|
|
<xs:enumeration value="ua:UInt32" />
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:schema>
|