<?xml version="1.0" encoding="utf-8"?>
<!--
  EML 340 Schema - Polling Information

  History: 4.0 Edited by Paul Spencer (Boynings Consulting) 2005/2006
                - major release revision

           5.0 Edited by David RR Webber (OVS) 2007-02-07
           6.0 Edited by David RR Webber 2008-11-13
  -->
<xs:schema targetNamespace="urn:oasis:names:tc:evs:schema:eml" xmlns="urn:oasis:names:tc:evs:schema:eml" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="6.0" id="eml-340">
 <xs:annotation>
    <xs:documentation> 
      Specification Name: OASIS EML TC - Election Markup Language (EML) 
      Description: This schema here is a member of a library of the XML schemas used in EML. The XML schemas define the formal structures of the election data that can be processed.
      Produced by: OASIS Election Technical Committee
      URL: http://www.oasis-open.org/committees/election
      Version: 6.0  
      Status: Committee Draft 
      Copyright: 2001-09, OASIS, http://www.oasis-open.org
      Conformance: This is a base implementation schema - actual localization schema for use may be derived from this schema - but may not contradict the structure definitions provided here.
    </xs:documentation>
  </xs:annotation>
	<xs:include schemaLocation="340-410-430-include-v6-0.xsd"/>
	<xs:element name="EML">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="EMLstructure">
					<xs:sequence>
						<xs:element ref="PollingInformation"/>
					</xs:sequence>
					<xs:attribute name="Id" fixed="340" use="required"></xs:attribute>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
		<xs:unique name="DisplayOrder">
			<xs:selector xpath=".//*"/>
			<xs:field xpath="@DisplayOrder"/>
		</xs:unique>
	</xs:element>
	<xs:element name="PollingInformation">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Polling" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Multiple sets of polling information allowed to allow transfer to a printer. There has been no attempt to avoid duplication of data - we have gone for simplicity.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element ref="EventIdentifier"/>
							<xs:element name="Description" type="MessagesStructure" minOccurs="0"/>
							<xs:element name="Voter" minOccurs="0">
								<xs:complexType>
									<xs:complexContent>
										<xs:extension base="VoterIdentificationStructure">
											<xs:sequence>
												<xs:element name="Contact" type="ContactDetailsStructure" minOccurs="0"/>
											</xs:sequence>
										</xs:extension>
									</xs:complexContent>
								</xs:complexType>
							</xs:element>
							<xs:element ref="Proxy" minOccurs="0"/>
							<xs:element name="VotingPeriod" minOccurs="0" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Start" type="xs:dateTime"/>
										<xs:element name="End" type="xs:dateTime"/>
									</xs:sequence>
									<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
								</xs:complexType>
							</xs:element>
							<xs:element name="Election" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="ElectionIdentifier"/>
										<xs:element name="Description" type="MessagesStructure" minOccurs="0"/>
										<xs:element name="Contest">
											<xs:complexType>
												<xs:sequence>
													<xs:element ref="ContestIdentifier"/>
													<xs:element ref="Area" minOccurs="0"/>
													<xs:element ref="Position" minOccurs="0"/>
													<xs:element name="Description" type="MessagesStructure" minOccurs="0"/>
													<xs:element name="VotingInformation" maxOccurs="unbounded">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="VotingPeriod" minOccurs="0" maxOccurs="unbounded">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="Start" type="xs:dateTime"/>
																			<xs:element name="End" type="xs:dateTime"/>
																		</xs:sequence>
																		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
																	</xs:complexType>
																</xs:element>
																<xs:element ref="PollingDistrict" minOccurs="0"/>
																<xs:element ref="PollingPlace"/>
																<xs:choice minOccurs="0">
																	<xs:element ref="VToken"/>
																	<xs:element ref="VTokenQualified"/>
																</xs:choice>
																<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
															</xs:sequence>
															<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
															<xs:attribute name="Channel" type="VotingChannelType" use="optional"/>
														</xs:complexType>
													</xs:element>
													<xs:element name="BallotInformation" minOccurs="0">
														<xs:complexType>
															<xs:sequence>
																<xs:element ref="BallotIdentifier" minOccurs="0"/>
																<xs:element name="HowToVote" type="MessagesStructure" minOccurs="0"/>
																<xs:element name="Rotation" type="YesNoType" minOccurs="0"/>
																<xs:element ref="VotingMethod" minOccurs="0"/>
																<xs:element ref="MaxVotes" minOccurs="0"/>
																<xs:element ref="MinVotes" minOccurs="0"/>
																<xs:element name="MaxWriteIn" type="xs:nonNegativeInteger" minOccurs="0"/>
																<xs:element ref="BallotChoices"/>
																<xs:element name="Messages" type="MessagesStructure" minOccurs="0" maxOccurs="unbounded"/>
																<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="Messages" type="MessagesStructure" minOccurs="0"/>
										<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Messages" type="MessagesStructure" minOccurs="0"/>
							<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

