<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2011 rel. 2 (http://www.altova.com) by Tim Buchholz (Minnesota Judicial Branch) -->
<!--
 Copyright © 2009, 2010 by the State of Minnesota
	State Court Administrator’s Office
	All Rights Reserved
-->
<!--This service is used to submit documents to the Court Case Management system (MNCIS). 	The documents will be attached to the specified case. 
	 It is intended to by used with cases charged by citation.
Modification History 
	Date				Version	Rev			Change
	10/22/09		1							Initial Document Creation
	11/18/09		2							Changed Rejected/Reason to be of type ReasonCodeTextType. 
	02/18/10		3							Changed the name of CorrelationID to CorrelationEFileID
													DocumentBinaryObject no longer has a minoccurs of zero. There must be at least one document included. 
													messageProducedDateTime attribute is now optional
													Schema Version is now 3:1.
													Copyright statement was added. 
	02/23/10		4							Removed the “Fixed” attribute on the schema version because it interferes with requests sent through web services.
	3/12/10			5							Added BAC Report to the enumeration of document names that can be submitted.  
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.courts.state.mn.us/CourtXML/3" targetNamespace="http://www.courts.state.mn.us/CourtXML/3" elementFormDefault="qualified" attributeFormDefault="unqualified" version="5">
	<xs:include schemaLocation="CourtXML_3.xsd"/>
	<xs:attributeGroup name="AddCaseDocumentMessageAttributes">
		<xs:attribute name="schemaVersion" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Specifies the version of the schema that this message should be validated against  For messages based on this schema the value should be "3:1".</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="messageProducedDateTime" type="xs:dateTime">
			<xs:annotation>
				<xs:documentation>Date and time when this message was produced.  This value is included on all outbound messages and not required on inbound messages.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:element name="AddCaseDocument">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="EFileID" type="EFileIDType">
					<xs:annotation>
						<xs:documentation>Value which when combined with the SubmittingAgencyORI uniquely identifies a specific instance of a  submission.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="SubmittingAgencyORI" type="SubmittingAgencyORIType">
					<xs:annotation>
						<xs:documentation>Agency responsible for submitting the documents.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:choice>
					<xs:element name="CourtFileNumber" type="CourtFileNumberType">
						<xs:annotation>
							<xs:documentation>Court Case the submitted documents are to be associated with.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="CitationNumber">
						<xs:annotation>
							<xs:documentation>The citation number can be used in place of the Court File Number to identify the case the documents are to be associated with.</xs:documentation>
						</xs:annotation>
						<xs:complexType>
							<xs:sequence>
								<xs:element name="CitationID" type="CitationNumberType"/>
								<xs:element name="IssuingAgencyORI" type="IssuingAgencyORIType"/>
							</xs:sequence>
						</xs:complexType>
					</xs:element>
					<xs:element name="CorrelationEFileID" type="EFileIDType">
						<xs:annotation>
							<xs:documentation>EfileID from a Efiled Citation or Complaint that this message should be associated with.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:choice>
				<xs:element name="DocumentBinaryObject" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>The base64Binary encoded document.   Multiple can be included though a maximum of around 5 is preferable.   The number that can be submitted at one time may also be dependant on the size of the doucments.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:base64Binary">
								<xs:attribute name="binaryObjectType" use="required">
									<xs:simpleType>
										<xs:restriction base="xs:string">
											<xs:enumeration value="application/pdf"/>
											<xs:enumeration value="image/tiff"/>
										</xs:restriction>
									</xs:simpleType>
								</xs:attribute>
								<xs:attribute name="documentName" use="required">
									<xs:simpleType>
										<xs:restriction base="xs:string">
											<xs:minLength value="1"/>
											<xs:maxLength value="100"/>
										</xs:restriction>
									</xs:simpleType>
								</xs:attribute>
								<xs:attribute name="documentDescription">
									<xs:simpleType>
										<xs:restriction base="xs:string">
											<xs:minLength value="1"/>
											<xs:maxLength value="60"/>
										</xs:restriction>
									</xs:simpleType>
								</xs:attribute>
								<xs:attribute name="documentTypeCode" use="required">
									<xs:simpleType>
										<xs:restriction base="xs:string">
											<xs:minLength value="1"/>
											<xs:maxLength value="10"/>
										</xs:restriction>
									</xs:simpleType>
								</xs:attribute>
								<xs:attribute name="effectiveDate" type="xs:date">
									<xs:annotation>
										<xs:documentation>Defaults to the Current Date</xs:documentation>
									</xs:annotation>
								</xs:attribute>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="AttachToCaseEvent" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Used to attach the document(s) to either an existing case event or a new case event.   If omitted the documents will only be attached to the case.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:choice>
							<xs:annotation>
								<xs:documentation>Only one of these 3 elements should be provided.</xs:documentation>
							</xs:annotation>
							<xs:element name="FiledCaseEventIndicator" type="xs:boolean">
								<xs:annotation>
									<xs:documentation>If true causes the document(s) to be attached to the case event that is considered the "Filed" case event. </xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="ExistingCaseEvent">
								<xs:annotation>
									<xs:documentation>If included causes the document(s) to be attached to an existing case event with the provided case event type and event date and time.   </xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element name="CaseEventText" type="CaseEventTypeCodeTextType"/>
										<xs:element name="CaseEventDateTime" type="xs:dateTime" minOccurs="0">
											<xs:annotation>
												<xs:documentation>If omitted the first event of the given type will be chosen.</xs:documentation>
											</xs:annotation>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="NewCaseEvent">
								<xs:annotation>
									<xs:documentation>If included causes the document(s) to be added to a new case event with the provided case event type and date and time.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element name="CaseEventText" type="CaseEventTypeCodeTextType"/>
										<xs:element name="CaseEventDateTime" type="xs:dateTime" minOccurs="0">
											<xs:annotation>
												<xs:documentation>If omitted the current date and time will be used.</xs:documentation>
											</xs:annotation>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:choice>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attributeGroup ref="AddCaseDocumentMessageAttributes"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="AddCaseDocumentResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="EFileID" type="EFileIDType">
					<xs:annotation>
						<xs:documentation>Value which when combined with the SubmittingAgencyORI uniquely identifies a specific instance of a  submission.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="SubmittingAgencyORI" type="SubmittingAgencyORIType">
					<xs:annotation>
						<xs:documentation>Agency responsible for submitting the documents.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="AcceptedByCourt">
					<xs:complexType>
						<xs:sequence>
							<xs:choice>
								<xs:element name="CourtFileNumber" type="CourtFileNumberType">
									<xs:annotation>
										<xs:documentation>Court Case the submitted documents are to be associated with.</xs:documentation>
									</xs:annotation>
								</xs:element>
								<xs:element name="CitationNumber">
									<xs:annotation>
										<xs:documentation>The citation number can be used in place of the Court File Number to identify the case the documents are to be associated with.</xs:documentation>
									</xs:annotation>
									<xs:complexType>
										<xs:sequence>
											<xs:element name="CitationID" type="CitationNumberType"/>
											<xs:element name="IssuingAgencyORI" type="IssuingAgencyORIType"/>
										</xs:sequence>
									</xs:complexType>
								</xs:element>
								<xs:element name="CorrelationEFileID" type="EFileIDType">
									<xs:annotation>
										<xs:documentation>EfileID from a Efiled Citation that this message should be associated with. Not used with Batch Citations</xs:documentation>
									</xs:annotation>
								</xs:element>
							</xs:choice>
							<xs:element name="AcceptedDate" type="xs:date">
								<xs:annotation>
									<xs:documentation>System Date that the documents were added to MNCIS.</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attributeGroup ref="AddCaseDocumentMessageAttributes"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
