xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xerces-j-...@xml.apache.org
Subject [jira] Created: (XERCESJ-1014) Error handling restriction of complex type
Date Fri, 01 Oct 2004 09:23:34 GMT
Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-1014

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-1014
    Summary: Error handling restriction of complex type
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces2-J
   Versions:
             2.5.0

   Assignee: 
   Reporter: Paul Spencer

    Created: Fri, 1 Oct 2004 2:22 AM
    Updated: Fri, 1 Oct 2004 2:22 AM
Environment: Win 2k using the Xerces option in rsXMLtest.

Description:
In the OASIS Election Markup Language (EML), the IncomingGenericCommunicationStructure data
type using a restriction of the VoterIdentificationStructure. The restriction is to set the
maxOccurs of an optional xs:choice to zero. This causes the error messages "rcase-Recurse.2:
There is not a complete functional mapping between the particles." and "The particle of the
type is not a valid restriction of the particle of the base." I don't think either of these
messages is correct. The schemas look fine using XSV, MSV, MSXML4 SP2 and other validators.

The text below is a shortened version of the schema that shows the error. If I simplify it
right down, it parses OK, so this is quite long.

I am the editor of the EML schemas, which are currently waiting to be released.

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Paul Spencer (Boynings
Consulting) -->
<xs:schema targetNamespace="urn:oasis:names:tc:evs:schema:eml" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="4.0" id="eml-core" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ts="urn:oasis:names:tc:evs:schema:eml:ts" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns="urn:oasis:names:tc:evs:schema:eml">
	<xs:complexType name="temp1">
		<xs:sequence>
			<xs:element name="line" type="xs:token" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ContactDetails" type="ContactDetailsStructure"/>
	<xs:element name="ContestIdentifier" type="ContestIdentifierStructure"/>
	<xs:element name="ElectionIdentifier" type="ElectionIdentifierStructure"/>
	<xs:element name="ElectionStatement" type="MessagesStructure"/>
	<xs:element name="EventIdentifier" type="EventIdentifierStructure"/>
	<xs:element name="EventQualifier" type="EventQualifierStructure"/>
	<xs:element name="MessageType" type="MessageTypeType"/>
	<xs:element name="PersonName" type="xs:string"/>
	<xs:element name="PollingDistrict" type="PollingDistrictStructure"/>
	<xs:element name="PollingPlace" type="PollingPlaceStructure"/>
	<xs:element name="PreviousElectoralAddress" type="temp1"/>
	<xs:element name="ResponsibleOfficer" type="ResponsibleOfficerStructure"/>
	<xs:element name="VoterName" type="xs:string"/>
	<xs:element name="VotingChannel" type="VotingChannelType"/>
	<xs:element name="VotingMethod" type="VotingMethodType"/>
	<xs:element name="VToken" type="VTokenStructure"/>
	<xs:element name="VTokenQualified" type="VTokenQualifiedStructure"/>
	<xs:complexType name="ContactDetailsStructure">
		<xs:sequence>
			<xs:element name="MailingAddress" type="temp1" minOccurs="0"/>
			<xs:element name="Email" type="EmailStructure" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Telephone" type="TelephoneStructure" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Fax" type="TelephoneStructure" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="PreferredContact" type="xs:string" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
	</xs:complexType>
	<xs:complexType name="ContestIdentifierStructure">
		<xs:sequence>
			<xs:element name="ContestName" type="xs:token" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="DisplayIdMand"/>
		<xs:attribute name="ShortCode" type="ShortCodeType" use="optional"/>
	</xs:complexType>
	<xs:complexType name="ElectionGroupStructure">
		<xs:simpleContent>
			<xs:extension base="xs:token">
				<xs:attribute name="Id" type="xs:token" use="required"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="ElectionIdentifierStructure">
		<xs:sequence>
			<xs:element name="ElectionName" type="xs:token" minOccurs="0"/>
			<xs:element name="ElectionGroup" type="ElectionGroupStructure" minOccurs="0"/>
			<xs:element name="ElectionCategory" type="xs:NMTOKEN" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="DisplayIdMand"/>
		<xs:attribute name="ShortCode" type="ShortCodeType" use="optional"/>
	</xs:complexType>
	<xs:complexType name="EmailStructure">
		<xs:simpleContent>
			<xs:extension base="EmailType">
				<xs:attribute name="Preferred" type="YesNoType" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="EventIdentifierStructure">
		<xs:sequence>
			<xs:element name="EventName" type="xs:token" minOccurs="0"/>
			<xs:element name="EventQualifier" type="EventQualifierStructure" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="DisplayIdOpt"/>
	</xs:complexType>
	<xs:complexType name="EventQualifierStructure">
		<xs:simpleContent>
			<xs:extension base="xs:token">
				<xs:attribute name="Id" type="xs:NMTOKEN" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="IncomingGenericCommunicationStructure">
		<xs:sequence>
			<xs:element name="Voter">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="VoterIdentification">
							<xs:annotation>
								<xs:documentation>Restriction is to prohibit VToken and VTokenQualified</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:complexContent>
									<xs:restriction base="VoterIdentificationStructure">
										<xs:sequence>
											<xs:element ref="VoterName" minOccurs="0"/>
											<xs:element name="ElectoralAddress" type="temp1" minOccurs="0">
												<xs:annotation>
													<xs:documentation>This is the address that gives the voter the right to
vote</xs:documentation>
												</xs:annotation>
											</xs:element>
											<xs:element name="PreviousElectoralAddress" type="temp1" minOccurs="0"/>
											<xs:choice minOccurs="0" maxOccurs="0">
												<xs:element ref="VToken"/>
												<xs:element ref="VTokenQualified"/>
											</xs:choice>
											<xs:element name="Id" minOccurs="0" maxOccurs="unbounded">
												<xs:complexType>
													<xs:simpleContent>
														<xs:extension base="xs:token">
															<xs:attribute name="Type" type="xs:token" use="required"/>
														</xs:extension>
													</xs:simpleContent>
												</xs:complexType>
											</xs:element>
										</xs:sequence>
									</xs:restriction>
								</xs:complexContent>
							</xs:complexType>
						</xs:element>
						<xs:element name="VoterContact" type="ContactDetailsStructure"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Recipient" type="ResponsibleOfficerStructure" minOccurs="0"/>
			<xs:element ref="EventIdentifier" minOccurs="0"/>
			<xs:element ref="ElectionIdentifier" minOccurs="0"/>
			<xs:element ref="ContestIdentifier" minOccurs="0"/>
			<xs:element name="Messages" type="MessagesStructure" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessagesStructure">
		<xs:sequence>
			<xs:element name="Message" maxOccurs="unbounded">
				<xs:complexType mixed="true">
					<xs:sequence>
						<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="Format" type="xs:NMTOKEN" use="optional"/>
					<xs:attribute name="Type" type="xs:token" use="optional"/>
					<xs:attribute name="Lang" type="LanguageType" use="optional"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
	</xs:complexType>
	<xs:complexType name="PollingDistrictStructure">
		<xs:sequence>
			<xs:element name="Name" minOccurs="0"/>
			<xs:element name="Association" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="Type" type="xs:token" use="required"/>
					<xs:attributeGroup ref="DisplayIdOpt"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attributeGroup ref="DisplayIdOpt"/>
	</xs:complexType>
	<xs:complexType name="PollingPlaceStructure">
		<xs:sequence>
			<xs:choice>
				<xs:element name="PhysicalLocation">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Address" type="temp1"/>
							<xs:element name="PollingStation" minOccurs="0" maxOccurs="unbounded">
								<xs:complexType>
									<xs:simpleContent>
										<xs:extension base="xs:token">
											<xs:attribute name="Id" type="xs:NMTOKEN" use="optional"/>
										</xs:extension>
									</xs:simpleContent>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="Id" type="xs:NMTOKEN" use="optional"/>
					</xs:complexType>
				</xs:element>
				<xs:element name="PostalLocation">
					<xs:complexType>
						<xs:complexContent>
							<xs:extension base="temp1">
								<xs:attributeGroup ref="DisplayIdOpt"/>
							</xs:extension>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="ElectronicLocation">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:token">
								<xs:attributeGroup ref="DisplayIdOpt"/>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="OtherLocation">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:string">
								<xs:attributeGroup ref="DisplayIdOpt"/>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
			</xs:choice>
			<xs:element name="TimeAvailable" 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:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="Channel" type="VotingChannelType" use="required"/>
		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
	</xs:complexType>
	<xs:complexType name="ResponsibleOfficerStructure">
		<xs:sequence>
			<xs:choice>
				<xs:sequence>
					<xs:element name="Responsibility" type="xs:token"/>
					<xs:element name="Name" type="xs:string" minOccurs="0"/>
				</xs:sequence>
				<xs:element name="Name" type="xs:string"/>
			</xs:choice>
			<xs:element name="Contact" type="ContactDetailsStructure" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="Id" type="xs:NMTOKEN" use="optional"/>
	</xs:complexType>
	<xs:complexType name="TelephoneStructure">
		<xs:sequence>
			<xs:element name="Number" type="TelephoneNumberType"/>
			<xs:element name="Extension" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:token">
						<xs:maxLength value="6"/>
						<xs:minLength value="1"/>
						<xs:pattern value="[0-9]{1,6}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="Preferred" type="YesNoType" use="optional"/>
		<xs:attribute name="Mobile" type="YesNoType" use="optional"/>
	</xs:complexType>
	<xs:complexType name="VoterIdentificationStructure">
		<xs:sequence>
			<xs:element ref="VoterName" minOccurs="0"/>
			<xs:element name="ElectoralAddress" type="temp1" minOccurs="0">
				<xs:annotation>
					<xs:documentation>This is the address that gives the voter the right to vote</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PreviousElectoralAddress" type="temp1" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element ref="VToken"/>
				<xs:element ref="VTokenQualified"/>
			</xs:choice>
			<xs:element name="Id" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:token">
							<xs:attribute name="Type" type="xs:token" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
		<xs:attribute name="Id" type="xs:NMTOKEN" use="optional"/>
	</xs:complexType>
	<xs:complexType name="VTokenStructure">
		<xs:sequence>
			<xs:element name="Component" maxOccurs="unbounded">
				<xs:complexType mixed="true">
					<xs:sequence>
						<xs:any namespace="##other" minOccurs="0"/>
					</xs:sequence>
					<xs:attribute name="Type" type="xs:NMTOKEN" use="required"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="VTokenQualifiedStructure">
		<xs:complexContent>
			<xs:extension base="VTokenStructure">
				<xs:sequence>
					<xs:element name="Reason">
						<xs:complexType>
							<xs:simpleContent>
								<xs:extension base="xs:token">
									<xs:attribute name="Type" type="xs:token" use="required"/>
								</xs:extension>
							</xs:simpleContent>
						</xs:complexType>
					</xs:element>
					<xs:element ref="VToken" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:simpleType name="DateType">
		<xs:union memberTypes="xs:date xs:dateTime"/>
	</xs:simpleType>
	<xs:simpleType name="EmailType">
		<xs:restriction base="xs:token">
			<xs:maxLength value="129"/>
			<xs:pattern value="[^@]+@[^@]+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="GenderType">
		<xs:restriction base="xs:token">
			<xs:enumeration value="male"/>
			<xs:enumeration value="female"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="LanguageType">
		<xs:restriction base="xs:language"/>
	</xs:simpleType>
	<xs:simpleType name="MessageTypeType">
		<xs:restriction base="xs:NMTOKEN"/>
	</xs:simpleType>
	<xs:simpleType name="ShortCodeType">
		<xs:restriction base="xs:NMTOKEN"/>
	</xs:simpleType>
	<xs:simpleType name="TelephoneNumberType">
		<xs:restriction base="xs:token">
			<xs:maxLength value="35"/>
			<xs:minLength value="1"/>
			<xs:pattern value="\+?[0-9\(\)\-\s]{1,35}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="VotingChannelType">
		<xs:restriction base="xs:token">
			<xs:enumeration value="SMS"/>
			<xs:enumeration value="WAP"/>
			<xs:enumeration value="digitalTV"/>
			<xs:enumeration value="internet"/>
			<xs:enumeration value="kiosk"/>
			<xs:enumeration value="polling"/>
			<xs:enumeration value="postal"/>
			<xs:enumeration value="telephone"/>
			<xs:enumeration value="other"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="VotingMethodType">
		<xs:restriction base="xs:token">
			<xs:enumeration value="AMS"/>
			<xs:enumeration value="FPP"/>
			<xs:enumeration value="OPV"/>
			<xs:enumeration value="SPV"/>
			<xs:enumeration value="STV"/>
			<xs:enumeration value="approval"/>
			<xs:enumeration value="block"/>
			<xs:enumeration value="partylist"/>
			<xs:enumeration value="supplementaryvote"/>
			<xs:enumeration value="other"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="VotingValueType">
		<xs:annotation>
			<xs:documentation>The weight or preference applied to a selection</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:positiveInteger"/>
	</xs:simpleType>
	<xs:simpleType name="YesNoType">
		<xs:restriction base="xs:token">
			<xs:enumeration value="no"/>
			<xs:enumeration value="yes"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:attributeGroup name="DisplayIdMand">
		<xs:attribute name="Id" type="xs:NMTOKEN" use="required"/>
		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="DisplayIdOpt">
		<xs:attribute name="Id" type="xs:NMTOKEN" use="optional"/>
		<xs:attribute name="DisplayOrder" type="xs:positiveInteger" use="optional"/>
	</xs:attributeGroup>
</xs:schema>




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message