<?xml version="1.0" encoding="Windows-1250"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:typ="http://www.stormware.cz/schema/version_2/type.xsd"		
      xmlns:rdc="http://www.stormware.cz/schema/version_2/documentresponse.xsd"
      xmlns:ftr="http://www.stormware.cz/schema/version_2/filter.xsd"
			xmlns:sPep="http://www.stormware.cz/schema/version_2/sendPeppol.xsd"
			xmlns="http://www.stormware.cz/schema/version_2/sendPeppol.xsd"
			targetNamespace="http://www.stormware.cz/schema/version_2/sendPeppol.xsd"
			elementFormDefault="qualified"
>

<xsd:import namespace="http://www.stormware.cz/schema/version_2/type.xsd" 					schemaLocation="type.xsd"/>
<xsd:import namespace="http://www.stormware.cz/schema/version_2/filter.xsd" 					schemaLocation="filter.xsd"/>
<xsd:import namespace="http://www.stormware.cz/schema/version_2/documentresponse.xsd" 	schemaLocation="documentresponse.xsd"/>
                                                                                                                   
                                                                                                                   
<xsd:element name="sendPeppol" type="sPep:sendPeppolType">
  <xsd:annotation>
	 <xsd:documentation>Odeslání vybraných záznamů do sítě Peppol (pouze SK).</xsd:documentation>
	</xsd:annotation>
</xsd:element>

<!-- **************************************************************************
		Odeslání do sítě Peppol
	 ************************************************************************** -->

<xsd:complexType name="sendPeppolType">
	<xsd:sequence>
		<xsd:element name="record" type="sPep:recordSendPeppolType">
			<xsd:annotation>
				<xsd:documentation>Výběr záznamů.</xsd:documentation>
			</xsd:annotation>
		</xsd:element>
  </xsd:sequence>
	<xsd:attribute name="version" type="sPep:sendPeppolVerType" use="required"/>		
</xsd:complexType>

<xsd:simpleType name="sendPeppolVerType">
	<xsd:annotation>
		<xsd:documentation>Verze, které jsou dostupné. Podrobnosti k jednotlivým verzím najdete na www.stormware.cz/xml.</xsd:documentation>
	</xsd:annotation>
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="2.0"/>
	</xsd:restriction>
</xsd:simpleType>

  <xsd:complexType name="recordSendPeppolType">    
      <xsd:group ref="ftr:groupFilter_1"/>    
    <xsd:attribute name="agenda" type="sPep:sendPeppolAgendaType" use="required"/>
  </xsd:complexType>

  <xsd:simpleType name="sendPeppolAgendaType">
    <xsd:annotation>
      <xsd:documentation>Výběr agendy.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="internalDocuments"/>
      <xsd:enumeration value="issuedInvoice"/>      
    </xsd:restriction>
  </xsd:simpleType>

  <!-- RESPONSE -->
  <xsd:element name="sendPeppolResponse" type="sPep:sendPeppolResponseType"/>

	<xsd:complexType name="sendPeppolResponseType">
		<xsd:complexContent>
			<xsd:extension base="rdc:documentResponseType">
				<xsd:sequence>
					<xsd:element name="sendDocuments" type="sPep:sendDocumentsType" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="sendDocumentsType">
		<xsd:sequence>
			<xsd:element name="sendDocument" type="sPep:sendDocumentType" minOccurs="1" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Výsledek odeslání dokladu.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="sendDocumentType">
		<xsd:sequence>
			<xsd:element name="id" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>ID dokladu.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="number" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Číslo dokladu.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="state" type="typ:stavType">
				<xsd:annotation>
					<xsd:documentation>Stav odeslání.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="detail" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Detail.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

</xsd:schema>