<?xml version="1.0" encoding="UTF-8"?>
<!-- RECS acknowledgement schema for CMO-CMO exchange v.35. 
Edited with XML Spy v4.1 U (http://www.xmlspy.com) 2002-07-24 by Matti Vasara (Fingrid  Oyj).
Namespace changes 2004-10-27 -->
<!-- the err codes sofar introduced
2	Not processed
27	Not accepted
29	Accepted without amendment="message=true"
31   Error in the testflag, not processed
32   Check digit is not correct in attribute/element
40	The application could not process the message.
41	Required data missing.
42	Error in content of a data element.
43	Unknown seller
44  	Unknown buyer
45  	Unknown schema in technology code
46 	Unknown schema in support code
50	Error in the time period
60	Capacity and support does not fit together
100 The object is approved
101	The object is not processed
999	General error 
An error description should be stated text attrubute.
-->
<xs:schema targetNamespace="http://www.fingrid.fi/attachments/schemas" xmlns:h="http://www.fingrid.fi/attachments/schemas" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:element name="env">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="h:header"/>
				<xs:element ref="h:body"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="ans">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="h:CMO"/>
				<xs:element ref="h:RMID"/>
				<xs:element ref="h:message"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="body">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="h:ans"/>
				<xs:element ref="h:err" minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="err">
		<xs:complexType>
			<xs:attribute name="code" type="xs:short" use="required"/>
			<xs:attribute name="text" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="CMO">
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:token">
					<xs:attribute name="cS" use="required"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="RMID" type="xs:token"/>
	<xs:element name="message" type="xs:boolean"/>
	<xs:element name="From">
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:token">
					<xs:attribute name="Addrtype" use="required"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="header">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="h:From"/>
				<xs:element ref="h:To"/>
			</xs:sequence>
			<xs:attribute name="mst" type="xs:dateTime" use="required"/>
			<xs:attribute name="ID" type="xs:token" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="To">
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:token">
					<xs:attribute name="Addrtype" use="required"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:attribute name="cS">
		<xs:simpleType>
			<xs:restriction base="xs:token">
				<xs:enumeration value="EAN"/>
				<xs:enumeration value="EIC"/>
				<xs:enumeration value="RECS"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
	<xs:attribute name="Addrtype" use="required">
		<xs:simpleType>
			<xs:restriction base="xs:token">
				<xs:enumeration value="EAN"/>
				<xs:enumeration value="EIC"/>
				<xs:enumeration value="RECS"/>
				<xs:enumeration value="SMTP"/>
				<xs:enumeration value="HTTP"/>
				<xs:enumeration value="HTTPS"/>
				<xs:enumeration value="FTP"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
</xs:schema>
