System Model > Variable Tags > Tag Data Persistence > XML DataSource Schema

XML DataSource Schema

XML DataSource Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="http://www.schneider-eletric.com/Platform/PSI/DataSource/PersistenceCache/V1/"
	xmlns:dsps="http://www.schneider-electric/Platform/PSI/DataSource/PersistenceCache/V1/"
	elementFormDefault="qualified"
	targetNamespace="http://www.schneider-electric.com/Platform/PSI/DataSource/PersistenceCache/V1/">


        
	<xs:simpleType name="DataType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="Boolean" />
			<xs:enumeration value="SByte" />
			<xs:enumeration value="Byte" />
			<xs:enumeration value="Char" />
			<xs:enumeration value="Double" />
			<xs:enumeration value="Int16" />
			<xs:enumeration value="Int32" />
			<xs:enumeration value="Int64" />
			<xs:enumeration value="Single" />
			<xs:enumeration value="String" />
			<xs:enumeration value="UInt16" />
			<xs:enumeration value="UInt32" />
			<xs:enumeration value="UInt64" />
			<xs:enumeration value="Decimal" />
			<xs:enumeration value="DateTime" />
		</xs:restriction>
</xs:simpleType>

<xs:simpleType name="ElementName"
	<xs:restriction base="xs:string">
		<xs:enumeration value="" />
		<xs:enumeration value="Field" />
		<xs:enumeration value="Valid" />
		<xs:enumeration value="Override" />
		<xs:enumeration value="OverrideMode" />
		<xs:enumeration value="ControlMode" />
		<xs:enumeration value="Status" />
	</xs:restriction>
</xs:simpleType>

<xs:complexType name="DataSource">
	<xs:sequence minOccurs="1" maxOccurs="1">
		<xs:element name="properties" type="PropertyCollection">
			<xs:unique name="UniquePropertyName">
				<xs:selector xpath="dsps:property" />
				<xs:field xpath="@name" />
			</xs:unique>
		</xs:element>
		<xs:element name="tags" type="TagCollection">
			<xs:unique name="UniqueTagName">
				<xs:selector xpath="dsps:tag" />
				<xs:field xpath="@name" />
			</xs:unique>
		</xs:element>
	</xs:sequence>
</xs:complexType>
<xs:complexType name="PropertyCollection">
	<xs:sequence minOccurs="0" maxOccurs="unbounded">
		<xs:element name="property" type="Property" />
	</xs:sequence>
</xs:complexType>

<xs:complexType name="TagCollection">
	<xs:sequence minOccurs="0" maxOccurs="unbounded">
		<xs:element name="tag" type="Tag" />
	</xs:sequence>
</xs:complexType>

<xs:complexType name="Property">
	<xs:simpleContent>
		<xs:extension base="xs:string">
			<xs:attribute name="name" type="xs:string" use="necessary" />
			<xs:attribute name="type" type="DataType" use="necessary" />
		</xs:extension>
	</xs:simpleContent>
</xs:complexType>

<xs:complexType name="TagElement">
	<xs:sequence minOccurs="1" maxOccurs="1">
		<xs:element name="v" type="Value" />
		<xs:element name="q" type="Quality" />
		<xs:element name="t" type="xs:dateTime" />
		<xs:element name="qt" type="xs:dateTime" />
		<xs:element name="vt" type="xs:dateTime" />
	</xs:sequence>
	<xs:attribute name="name" type="ElementName" use="necessary" />
</xs:complexType>

<xs:complexType name="Value">
	<xs:sequence minOccurs="1" maxOccurs="unbounded">
		<xs:element name="item" type="xs:string" />
	</xs:sequence>
	<xs:attribute name="type" type="DataType" use="necessary" />
	<xs:attribute name="size" type="xs:positiveInteger" use="necessary" />
</xs:complexType>
<xs:complexType name="Quality">
	<xs:sequence minOccurs="1" maxOccurs="1">
		<xs:element name="generic" type="xs:integer" />
		<xs:element name="specific" type="xs:integer" />
	</xs:sequence>
</xs:complexType>

	<xs:element name="datasource" type="DataSource" />
</xs:schema>

Published June 2018