XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
key and keyref issues

I’m attempting to constrain a schema, which has a lot of xsd:ID and xsd:IDREF, so that, for example, a Person IDREF can only refer to a Person ID.

 

I wrote a key and keyref constraint thus:

 

<xsd:element name="ElectionReport" type="ElectionReport">

      <xsd:key name="personKey">

           <xsd:selector xpath="./Person"/>

           <xsd:field xpath="@ObjectId"/>

      </xsd:key>

      <xsd:keyref name="personKeyRef" refer="personKey">

           <xsd:selector xpath="./Election/Candidate"/>

           <xsd:field xpath="PersonId"/>

      </xsd:keyref>

</xsd:element>

 

However, when I try it against an example I wrote up (which should throw a validation error), it succeeds with no errors.


I’ve attached both my schema and example file. I am using XMLSpy to validate my instances.

 

Thanks,

 

John Dziurlaj

 

Elections Consultant

Hilton Roscoe LLC
Cell 330-714-8935 Work/Fax 234-706-6434

 

<?xml version="1.0" encoding="UTF-8"?>
<n1:ElectionReport xmlns:n1="NIST_V2_election_results_reporting.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="NIST_V2_election_results_reporting.xsd NIST_V2_election_results_reporting.xsd">
	<n1:Election>
		<n1:Candidate ObjectId="cand1">
			<n1:BallotName>
				<n1:Text Language="en-US">James</n1:Text>
			</n1:BallotName>
			<n1:PersonId>gp1</n1:PersonId>
		</n1:Candidate>
		<n1:ElectionScopeId>gp1</n1:ElectionScopeId>
		<n1:Name>
			<n1:Text Language="en-US">TEST OF IDC</n1:Text>
		</n1:Name>
		<n1:StartDate>2012-01-01</n1:StartDate>
		<n1:EndDate>2012-01-01</n1:EndDate>
		<n1:Type>general</n1:Type>
	</n1:Election>
	<n1:Format>summary-contest</n1:Format>
	<n1:GeneratedDate>2001-12-17T09:30:47Z</n1:GeneratedDate>
	<n1:GpUnit xmlns:n1="NIST_V2_election_results_reporting.xsd" xsi:type="n1:ReportingUnit" ObjectId="gp1">
		<n1:Type>state</n1:Type>
	</n1:GpUnit>
	<n1:Issuer>String</n1:Issuer>
	<n1:IssuerAbbreviation>String</n1:IssuerAbbreviation>
	<n1:Person ObjectId="pers1"/>
	<n1:SequenceStart>0</n1:SequenceStart>
	<n1:SequenceEnd>0</n1:SequenceEnd>
	<n1:Status>pre-election</n1:Status>
	<n1:VendorApplicationId>Vendor</n1:VendorApplicationId>
</n1:ElectionReport>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Version 2.0, NIST Election Results CDF Specification, National Institute of Standards and Technology -->
<xsd:schema xmlns="NIST_V2_election_results_reporting.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"; targetNamespace="NIST_V2_election_results_reporting.xsd" elementFormDefault="qualified" version="2.0">
	<!-- ========== Roots ========== -->
	<xsd:element name="ElectionReport" type="ElectionReport">
		<xsd:key name="personKey">
			<xsd:selector xpath="./Person"/>
			<xsd:field xpath="@ObjectId"/>
		</xsd:key>
		<xsd:keyref name="personKeyRef" refer="personKey">
			<xsd:selector xpath="./Election/Candidate"/>
			<xsd:field xpath="PersonId"/>
		</xsd:keyref>
	</xsd:element>
	<!-- ========== Primitives ========== -->
	<xsd:simpleType name="DateTimeWithZone">
		<xsd:restriction base="xsd:dateTime">
			<xsd:pattern value="[0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]|(24:00:00))(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="HtmlColorString">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[0-9a-f]{6}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ShortString">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="32"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="TimeWithZone">
		<xsd:restriction base="xsd:time">
			<xsd:pattern value="(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]|(24:00:00))(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- ========== Enumerations ========== -->
	<xsd:simpleType name="BallotMeasureType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="ballot-measure"/>
			<xsd:enumeration value="initiative"/>
			<xsd:enumeration value="recall"/>
			<xsd:enumeration value="referendum"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CandidatePostElectionStatus">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="advanced-to-runoff"/>
			<xsd:enumeration value="defeated"/>
			<xsd:enumeration value="projected-winner"/>
			<xsd:enumeration value="winner"/>
			<xsd:enumeration value="withdrawn"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CandidatePreElectionStatus">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="filed"/>
			<xsd:enumeration value="qualified"/>
			<xsd:enumeration value="withdrawn"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CountItemStatus">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="completed"/>
			<xsd:enumeration value="in-process"/>
			<xsd:enumeration value="not-processed"/>
			<xsd:enumeration value="unknown"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CountItemType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="absentee"/>
			<xsd:enumeration value="absentee-fwab"/>
			<xsd:enumeration value="absentee-in-person"/>
			<xsd:enumeration value="absentee-mail"/>
			<xsd:enumeration value="early"/>
			<xsd:enumeration value="election-day"/>
			<xsd:enumeration value="provisional"/>
			<xsd:enumeration value="seats"/>
			<xsd:enumeration value="total"/>
			<xsd:enumeration value="uocava"/>
			<xsd:enumeration value="write-in"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="DayType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="all"/>
			<xsd:enumeration value="sunday"/>
			<xsd:enumeration value="monday"/>
			<xsd:enumeration value="tuesday"/>
			<xsd:enumeration value="wednesday"/>
			<xsd:enumeration value="thursday"/>
			<xsd:enumeration value="friday"/>
			<xsd:enumeration value="saturday"/>
			<xsd:enumeration value="weekday"/>
			<xsd:enumeration value="weekend"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="DeviceType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="electronic"/>
			<xsd:enumeration value="lever"/>
			<xsd:enumeration value="manual-count"/>
			<xsd:enumeration value="mixed-systems"/>
			<xsd:enumeration value="opscan-central"/>
			<xsd:enumeration value="opscan-precinct"/>
			<xsd:enumeration value="punch-card"/>
			<xsd:enumeration value="unknown"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ElectionType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="general"/>
			<xsd:enumeration value="partisan-primary-closed"/>
			<xsd:enumeration value="partisan-primary-open"/>
			<xsd:enumeration value="primary"/>
			<xsd:enumeration value="runoff"/>
			<xsd:enumeration value="special"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="GeoSpatialFormat">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="geo-json"/>
			<xsd:enumeration value="gml"/>
			<xsd:enumeration value="kml"/>
			<xsd:enumeration value="shp"/>
			<xsd:enumeration value="wkt"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="IdentifierType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="fips"/>
			<xsd:enumeration value="local-level"/>
			<xsd:enumeration value="national-level"/>
			<xsd:enumeration value="ocd-id"/>
			<xsd:enumeration value="state-level"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="OfficeTermType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="full-term"/>
			<xsd:enumeration value="unexpired-term"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ReportDetailLevel">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="precinct-level"/>
			<xsd:enumeration value="summary-contest"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ReportingUnitType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="ballot-batch"/>
			<xsd:enumeration value="ballot-style-area"/>
			<xsd:enumeration value="borough"/>
			<xsd:enumeration value="city"/>
			<xsd:enumeration value="city-council"/>
			<xsd:enumeration value="combined-precinct"/>
			<xsd:enumeration value="congressional"/>
			<xsd:enumeration value="country"/>
			<xsd:enumeration value="county"/>
			<xsd:enumeration value="county-council"/>
			<xsd:enumeration value="drop-box"/>
			<xsd:enumeration value="judicial"/>
			<xsd:enumeration value="municipality"/>
			<xsd:enumeration value="polling-place"/>
			<xsd:enumeration value="precinct"/>
			<xsd:enumeration value="school"/>
			<xsd:enumeration value="special"/>
			<xsd:enumeration value="split-precinct"/>
			<xsd:enumeration value="state"/>
			<xsd:enumeration value="state-house"/>
			<xsd:enumeration value="state-senate"/>
			<xsd:enumeration value="town"/>
			<xsd:enumeration value="township"/>
			<xsd:enumeration value="utility"/>
			<xsd:enumeration value="village"/>
			<xsd:enumeration value="vote-center"/>
			<xsd:enumeration value="ward"/>
			<xsd:enumeration value="water"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ResultsStatus">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="certified"/>
			<xsd:enumeration value="correction"/>
			<xsd:enumeration value="pre-election"/>
			<xsd:enumeration value="recount"/>
			<xsd:enumeration value="unofficial-complete"/>
			<xsd:enumeration value="unofficial-partial"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="VoteVariation">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="1-of-m"/>
			<xsd:enumeration value="approval"/>
			<xsd:enumeration value="borda"/>
			<xsd:enumeration value="cumulative"/>
			<xsd:enumeration value="majority"/>
			<xsd:enumeration value="n-of-m"/>
			<xsd:enumeration value="plurality"/>
			<xsd:enumeration value="proportional"/>
			<xsd:enumeration value="range"/>
			<xsd:enumeration value="rcv"/>
			<xsd:enumeration value="super-majority"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- ========== Classes ========== -->
	<xsd:complexType name="AnnotatedString">
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="Annotation" type="ShortString"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:complexType name="AnnotatedUri">
		<xsd:simpleContent>
			<xsd:extension base="xsd:anyURI">
				<xsd:attribute name="Annotation" type="ShortString"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:complexType name="BallotCounts">
		<xsd:complexContent>
			<xsd:extension base="Counts">
				<xsd:sequence>
					<xsd:element name="BallotsCast" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="BallotsOutstanding" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="BallotsRejected" type="xsd:integer" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="BallotMeasureContest">
		<xsd:complexContent>
			<xsd:extension base="Contest">
				<xsd:sequence>
					<xsd:element name="ConStatement" type="InternationalizedText" minOccurs="0"/>
					<xsd:element name="EffectOfAbstain" type="InternationalizedText" minOccurs="0"/>
					<xsd:element name="FullText" type="InternationalizedText" minOccurs="0"/>
					<xsd:element name="InfoUri" type="xsd:anyURI" minOccurs="0"/>
					<xsd:element name="PassageThreshold" type="InternationalizedText" minOccurs="0"/>
					<xsd:element name="ProStatement" type="InternationalizedText" minOccurs="0"/>
					<xsd:element name="SummaryText" type="InternationalizedText" minOccurs="0"/>
					<xsd:element name="Type" type="BallotMeasureType" minOccurs="0"/>
					<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="BallotMeasureSelection">
		<xsd:complexContent>
			<xsd:extension base="BallotSelection">
				<xsd:sequence>
					<xsd:element name="Selection" type="InternationalizedText"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="BallotSelection" abstract="true">
		<xsd:sequence>
			<xsd:element name="SequenceOrder" type="xsd:integer" minOccurs="0"/>
			<xsd:element name="VoteCounts" type="VoteCounts" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="BallotStyle">
		<xsd:sequence>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="GpUnitIds" type="xsd:IDREFS"/>
			<xsd:element name="ImageUri" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="OrderedContent" type="OrderedContent" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="PartyIds" type="xsd:IDREFS" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Candidate">
		<xsd:sequence>
			<xsd:element name="BallotName" type="InternationalizedText"/>
			<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="FileDate" type="xsd:date" minOccurs="0"/>
			<xsd:element name="IsIncumbent" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="IsTopTicket" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="PartyId" type="xsd:IDREF" minOccurs="0"/>
			<xsd:element name="PersonId" type="xsd:IDREF" minOccurs="0"/>
			<xsd:element name="PostElectionStatus" type="CandidatePostElectionStatus" minOccurs="0"/>
			<xsd:element name="PreElectionStatus" type="CandidatePreElectionStatus" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="CandidateContest">
		<xsd:complexContent>
			<xsd:extension base="Contest">
				<xsd:sequence>
					<xsd:element name="NumberElected" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="NumberRunoff" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="OfficeIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="PrimaryPartyIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="VotesAllowed" type="xsd:integer"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="CandidateSelection">
		<xsd:complexContent>
			<xsd:extension base="BallotSelection">
				<xsd:sequence>
					<xsd:element name="CandidateIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="EndorsementPartyIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="IsWriteIn" type="xsd:boolean" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="Coalition">
		<xsd:complexContent>
			<xsd:extension base="Party">
				<xsd:sequence>
					<xsd:element name="ContestIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="PartyIds" type="xsd:IDREFS" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ContactInformation">
		<xsd:sequence>
			<xsd:element name="AddressLine" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Directions" type="InternationalizedText" minOccurs="0"/>
			<xsd:element name="Email" type="AnnotatedString" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Fax" type="AnnotatedString" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="LatLng" type="LatLng" minOccurs="0"/>
			<xsd:element name="Name" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Phone" type="AnnotatedString" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Schedule" type="Schedule" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Uri" type="AnnotatedUri" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="Contest" abstract="true">
		<xsd:sequence>
			<xsd:element name="Abbreviation" type="xsd:string" minOccurs="0"/>
			<xsd:element name="BallotSelection" type="BallotSelection" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="BallotSubTitle" type="InternationalizedText" minOccurs="0"/>
			<xsd:element name="BallotTitle" type="InternationalizedText" minOccurs="0"/>
			<xsd:element name="CountStatus" type="CountStatus" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="ElectoralDistrictId" type="xsd:IDREF"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="HasRotation" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="Name" type="xsd:string"/>
			<xsd:element name="OtherCounts" type="OtherCounts" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="SequenceOrder" type="xsd:integer" minOccurs="0"/>
			<xsd:element name="SubUnitsReported" type="xsd:integer" minOccurs="0"/>
			<xsd:element name="TotalSubUnits" type="xsd:integer" minOccurs="0"/>
			<xsd:element name="VoteVariation" type="VoteVariation" minOccurs="0"/>
			<xsd:element name="OtherVoteVariation" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="CountStatus">
		<xsd:sequence>
			<xsd:element name="Status" type="CountItemStatus"/>
			<xsd:element name="Type" type="CountItemType"/>
			<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Counts" abstract="true">
		<xsd:sequence>
			<xsd:element name="DeviceClass" type="DeviceClass" minOccurs="0"/>
			<xsd:element name="GpUnitId" type="xsd:IDREF"/>
			<xsd:element name="IsSuppressedForPrivacy" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="Round" type="xsd:integer" minOccurs="0"/>
			<xsd:element name="Type" type="CountItemType"/>
			<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="DeviceClass">
		<xsd:sequence>
			<xsd:element name="Manufacturer" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Model" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Type" type="DeviceType" minOccurs="0"/>
			<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Election">
		<xsd:sequence>
			<xsd:element name="BallotCounts" type="BallotCounts" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="BallotStyle" type="BallotStyle" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Candidate" type="Candidate" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0"/>
			<xsd:element name="Contest" type="Contest" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="CountStatus" type="CountStatus" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="ElectionScopeId" type="xsd:IDREF"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Name" type="InternationalizedText"/>
			<xsd:element name="StartDate" type="xsd:date"/>
			<xsd:element name="EndDate" type="xsd:date"/>
			<xsd:element name="Type" type="ElectionType"/>
			<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="ElectionAdministration">
		<xsd:sequence>
			<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0"/>
			<xsd:element name="ElectionOfficialPersonIds" type="xsd:IDREFS" minOccurs="0"/>
			<xsd:element name="Name" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="ElectionReport">
		<xsd:sequence>
			<xsd:element name="Election" type="Election" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Format" type="ReportDetailLevel"/>
			<xsd:element name="GeneratedDate" type="DateTimeWithZone"/>
			<xsd:element name="GpUnit" type="GpUnit" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Header" type="Header" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Issuer" type="xsd:string"/>
			<xsd:element name="IssuerAbbreviation" type="xsd:string"/>
			<xsd:element name="IsTest" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="Notes" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Office" type="Office" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="OfficeGroup" type="OfficeGroup" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Party" type="Party" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Person" type="Person" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="SequenceStart" type="xsd:integer"/>
			<xsd:element name="SequenceEnd" type="xsd:integer"/>
			<xsd:element name="Status" type="ResultsStatus"/>
			<xsd:element name="TestType" type="xsd:string" minOccurs="0"/>
			<xsd:element name="VendorApplicationId" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="ExternalIdentifier">
		<xsd:sequence>
			<xsd:element name="Type" type="IdentifierType"/>
			<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Value" type="xsd:string"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="FormattedText"/>
	<xsd:complexType name="GpUnit" abstract="true">
		<xsd:sequence>
			<xsd:element name="ComposingGpUnitIds" type="xsd:IDREFS" minOccurs="0"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Name" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="Header">
		<xsd:sequence>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Name" type="InternationalizedText"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="Hours">
		<xsd:sequence>
			<xsd:element name="Day" type="DayType" minOccurs="0"/>
			<xsd:element name="StartTime" type="TimeWithZone"/>
			<xsd:element name="EndTime" type="TimeWithZone"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="InternationalizedText">
		<xsd:sequence>
			<xsd:element name="Text" type="LanguageString" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="LanguageString">
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="Language" type="xsd:language" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:complexType name="LatLng">
		<xsd:sequence>
			<xsd:element name="Latitude" type="xsd:float"/>
			<xsd:element name="Longitude" type="xsd:float"/>
			<xsd:element name="Source" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="Office">
		<xsd:sequence>
			<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0"/>
			<xsd:element name="Description" type="InternationalizedText" minOccurs="0"/>
			<xsd:element name="ElectoralDistrictId" type="xsd:IDREF" minOccurs="0"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="FilingDeadline" type="xsd:date" minOccurs="0"/>
			<xsd:element name="IsPartisan" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="Name" type="InternationalizedText"/>
			<xsd:element name="OfficeHolderPersonIds" type="xsd:IDREFS" minOccurs="0"/>
			<xsd:element name="Term" type="Term" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="OfficeGroup">
		<xsd:sequence>
			<xsd:element name="Name" type="xsd:string"/>
			<xsd:element name="OfficeIds" type="xsd:IDREFS" minOccurs="0"/>
			<xsd:element name="SubOfficeGroup" type="OfficeGroup" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="OrderedContent" abstract="true"/>
	<xsd:complexType name="OrderedContest">
		<xsd:complexContent>
			<xsd:extension base="OrderedContent">
				<xsd:sequence>
					<xsd:element name="ContestId" type="xsd:IDREF"/>
					<xsd:element name="HeaderIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="OrderedBallotSelectionIds" type="xsd:IDREFS" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="OrderedHeader">
		<xsd:complexContent>
			<xsd:extension base="OrderedContent">
				<xsd:sequence>
					<xsd:element name="HeaderId" type="xsd:IDREF"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="OtherCounts">
		<xsd:sequence>
			<xsd:element name="DeviceClass" type="DeviceClass" minOccurs="0"/>
			<xsd:element name="GpUnitId" type="xsd:IDREF"/>
			<xsd:element name="Overvotes" type="xsd:float" minOccurs="0"/>
			<xsd:element name="Undervotes" type="xsd:float" minOccurs="0"/>
			<xsd:element name="WriteIns" type="xsd:integer" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Party">
		<xsd:sequence>
			<xsd:element name="Abbreviation" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Color" type="HtmlColorString" minOccurs="0"/>
			<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="IsWriteIn" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="LeaderPersonIds" type="xsd:IDREFS" minOccurs="0"/>
			<xsd:element name="LogoUri" type="xsd:anyURI" minOccurs="0"/>
			<xsd:element name="Name" type="InternationalizedText"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="PartyContest">
		<xsd:complexContent>
			<xsd:extension base="Contest"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="PartyRegistration">
		<xsd:sequence>
			<xsd:element name="Count" type="xsd:integer"/>
			<xsd:element name="PartyId" type="xsd:IDREF"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="PartySelection">
		<xsd:complexContent>
			<xsd:extension base="BallotSelection">
				<xsd:sequence>
					<xsd:element name="PartyIds" type="xsd:IDREFS"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="Person">
		<xsd:sequence>
			<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="DateOfBirth" type="xsd:date" minOccurs="0"/>
			<xsd:element name="ExternalIdentifier" type="ExternalIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="FirstName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="FullName" type="InternationalizedText" minOccurs="0"/>
			<xsd:element name="Gender" type="xsd:string" minOccurs="0"/>
			<xsd:element name="LastName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="MiddleName" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Nickname" type="xsd:string" minOccurs="0"/>
			<xsd:element name="PartyId" type="xsd:IDREF" minOccurs="0"/>
			<xsd:element name="Prefix" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Profession" type="InternationalizedText" minOccurs="0"/>
			<xsd:element name="Suffix" type="xsd:string" minOccurs="0"/>
			<xsd:element name="Title" type="InternationalizedText" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="ObjectId" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="ReportingDevice">
		<xsd:complexContent>
			<xsd:extension base="GpUnit">
				<xsd:sequence>
					<xsd:element name="DeviceClass" type="DeviceClass" minOccurs="0"/>
					<xsd:element name="SerialNumber" type="xsd:string" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ReportingUnit">
		<xsd:complexContent>
			<xsd:extension base="GpUnit">
				<xsd:sequence>
					<xsd:element name="AuthorityIds" type="xsd:IDREFS" minOccurs="0"/>
					<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0"/>
					<xsd:element name="CountStatus" type="CountStatus" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element name="ElectionAdministration" type="ElectionAdministration" minOccurs="0"/>
					<xsd:element name="IsDistricted" type="xsd:boolean" minOccurs="0"/>
					<xsd:element name="IsMailOnly" type="xsd:boolean" minOccurs="0"/>
					<xsd:element name="Number" type="xsd:string" minOccurs="0"/>
					<xsd:element name="PartyRegistration" type="PartyRegistration" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element name="SpatialDimension" type="SpatialDimension" minOccurs="0"/>
					<xsd:element name="SubUnitsReported" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="TotalSubUnits" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="Type" type="ReportingUnitType"/>
					<xsd:element name="OtherType" type="xsd:string" minOccurs="0"/>
					<xsd:element name="VotersParticipated" type="xsd:integer" minOccurs="0"/>
					<xsd:element name="VotersRegistered" type="xsd:integer" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="RetentionContest">
		<xsd:complexContent>
			<xsd:extension base="BallotMeasureContest">
				<xsd:sequence>
					<xsd:element name="CandidateId" type="xsd:IDREF"/>
					<xsd:element name="OfficeId" type="xsd:IDREF" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="Schedule">
		<xsd:sequence>
			<xsd:element name="Hours" type="Hours" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="IsOnlyByAppointment" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="IsOrByAppointment" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="IsSubjectToChange" type="xsd:boolean" minOccurs="0"/>
			<xsd:element name="StartDate" type="xsd:date" minOccurs="0"/>
			<xsd:element name="EndDate" type="xsd:date" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="SpatialDimension">
		<xsd:sequence>
			<xsd:element name="MapUri" type="xsd:anyURI" minOccurs="0"/>
			<xsd:element name="SpatialExtent" type="SpatialExtent" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="SpatialExtent">
		<xsd:sequence>
			<xsd:element name="Coordinates" type="xsd:string"/>
			<xsd:element name="Format" type="GeoSpatialFormat"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Term">
		<xsd:sequence>
			<xsd:element name="StartDate" type="xsd:date" minOccurs="0"/>
			<xsd:element name="EndDate" type="xsd:date" minOccurs="0"/>
			<xsd:element name="Type" type="OfficeTermType" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="Label" type="xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name="VoteCounts">
		<xsd:complexContent>
			<xsd:extension base="Counts">
				<xsd:sequence>
					<xsd:element name="Count" type="xsd:float"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
</xsd:schema>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS