<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<!-- CCAP specific types -->
	<xs:include schemaLocation="http://stepmom.wicourts.gov/xsd/ccap_common0_08.xsd"/>
	<!-- An empty episodeId is considered a NULL episodeId.  -->
	<xs:simpleType name="dcfEpisodeIdT">
		<xs:union memberTypes="xs:positiveInteger">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value=""/>
				</xs:restriction>
			</xs:simpleType>
		</xs:union>
	</xs:simpleType>
	<!-- we are restricting the date format to 'MM-DD-YYYY',
      for example '03-26-1963' is a valid date, anything else is not.
      An empty date is considered a NULL date. This similar to CCAP's
      Standard that states that any empty string is a NULL string. -->
	<xs:simpleType name="dcfDateT">
		<xs:union>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="\d{2,2}-\d{2,2}-\d{4,4}"/>
				</xs:restriction>
			</xs:simpleType>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value=""/>
				</xs:restriction>
			</xs:simpleType>
		</xs:union>
	</xs:simpleType>
	<xs:simpleType name="dcfDischargeReasonT">
		<xs:restriction base="xs:string">
			<xs:maxLength value="40"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="dcfCaseClosingSummaryT">
		<xs:restriction base="xs:string">
			<xs:maxLength value="100000"/>
		</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="dcfDistrictAttorneyIdT">
        <xs:union memberTypes="xs:positiveInteger">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value=""/>
                </xs:restriction>
            </xs:simpleType>
        </xs:union>
    </xs:simpleType>    
    
	<!-- DCF caseNo  -->
	<xs:simpleType name="dcfCaseNoT">
		<xs:restriction base="xs:string">
			<xs:pattern value="(\d{4,4}[A-Z]{2,2}\d{2,6}[A-Z]{0,2})"/>
		</xs:restriction>
	</xs:simpleType>
	
	 <xs:complexType name="dispoCodeT">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="amendDate" type="xs:string"/>
			</xs:extension>
		</xs:simpleContent>
	 </xs:complexType>	
</xs:schema>
