<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://gfs.swissre.com/edms/search_populated" targetNamespace="http://gfs.swissre.com/edms/search_populated" elementFormDefault="qualified">	
	
	<xsd:element name="gfs_edms" type="gfsedmsDataType"/>
	
	<xsd:complexType name="gfsedmsDataType">
	    <xsd:all>
	        <xsd:element name="gfs_id" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="user_id" type="xsd:string" maxOccurs="1" minOccurs="0" />

		   <!--  common attributes  -->
	        <xsd:element name="insured_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="name_of_risk" type="xsd:string" maxOccurs="1" minOccurs="0" />

		   <!--  reinsurance attributes  -->
	        <xsd:element name="profit_center_id" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="profit_center_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="main_lob_id" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="main_lob_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="sr_branch_id" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="sr_branch_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="inception" type="dateplusemptyType" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="expiration" type="dateplusemptyType" maxOccurs="1" minOccurs="0" />

	        <xsd:element name="cedent_id" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="cedent_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="cedent_city" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="cedent_country" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        
	        <xsd:element name="broker_id" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="broker_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="broker_city" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="broker_country" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        
	        <xsd:element name="doc_name" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="doc_date" type="xsd:string" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="doc_type_id" type="integerplusemptyType" maxOccurs="1" minOccurs="0" />
	        <xsd:element name="doc_type" type="xsd:string" maxOccurs="1" minOccurs="0" />
	    </xsd:all>
	    
	    <xsd:attribute name="send_date" type="xsd:date"/>
	</xsd:complexType>

	<xsd:simpleType name="dateplusemptyType">
		<xsd:union>
			<xsd:simpleType>
				<xsd:restriction base="xsd:date"/>
			</xsd:simpleType>

			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value=""/>
				</xsd:restriction>
			</xsd:simpleType> 
		</xsd:union>
   </xsd:simpleType>
	
	<xsd:simpleType name="integerplusemptyType">
		<xsd:union>
			<xsd:simpleType>
				<xsd:restriction base="xsd:integer"/>
			</xsd:simpleType>

			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value=""/>
				</xsd:restriction>
			</xsd:simpleType> 
		</xsd:union>
   </xsd:simpleType>
	
</xsd:schema>