<?xml version="1.0" encoding="UTF-8"?>
<!--
		swiss-sanctions-list doctype: Lists all the sanction targets belonging to a 
		certain set of sanctions programs, as published by the Swiss State 
		Secretariat for Economic Affairs (SECO).
		
		XML documents based on this schema are designed to be processed by "client
		systems". Those systems read the data and write it into a database where the
		data is read from for client on-boarding / client screening workflows. The
		data structures are therefore not primarily designed to be as small as 
		possible but to be easily read and processed by "machines".
		
		General notes:
		- Top-level tags in XML documents based on this schema are 
			"sanctions-program", "target" and "place". The reason why the place tags
			are on the top level too is the fact that they are collected separately
			on entering sanction data and are then referenced by the targets' birth
			places, addresses and identification documents.
		- Certain tags are identified by an "ssid" attribute, i.e. by a "Swiss
		  sanctions identifier". Such an SSID identifies a tag, e.g. a target or a 
		  name. These identifiers are useful to access a certain node and/or to 
		  update a value in the client system while processing an amendment. If such 
		  an identifiable tag changes, the related SSID changes too, EXCEPT it's a 
		  target tag: Target SSIDs never change.
		- The term "sanctions list" refers to a document containing all the targets
			of a certain sanctions program. So if a target is considered "being on a
			list", this is equal to "this target belongs to a sanctions set of a
			certain sanctions program".
	-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 
	<!-- 
		swiss-sanctions-list: Root tag, collecting "sanctions-program", "target" 
		and "place" tags, whereof none is required and each may occur more than 
		once.
		
		The inner structure of a swiss-sanctions-list is defined by its list type:
		- The "whole-list" type indicates a list containing all the sanction data
			ever recorded, for each sanctions program and each target, including the 
			formerly listed and eventually de-listed targets as well as all the 
			modifications of each target up to and therefore forming the current 
			state. 
			The value of the "date" attribute of a "whole list" reflects the last 
			enactment date.
		- The "amendmend" list type defines a certain modification of a certain 
			sanctions program (only one). Such a modification describes the changes 
			from one state of this sanctions program to the following. Therefore, 
			typically only a subset of the targets registered in this sanctions program 
			is contained in such an amendmend since mostly only a few targets become 
			added, updated or removed within a modification. 
			The value of the "date" attribute of an "amendment" equals the enactment 
			date of the underlying modification, or, if not yet enacted, the date 
			on which the amendment XML was created.

 		@list-type: Sanctions list type: "whole-list" or "amendment" 
		@date: Enactment date of the sanctions list or the amendment; the list 
			contains all the entries which have been published before or at this 
			specific date
 	-->
	<xs:element name="swiss-sanctions-list">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="sanctions-program"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="target"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="place"/>
			</xs:sequence>
			<xs:attribute name="list-type" use="required" type="list-type"/>
			<xs:attribute name="date" use="required" type="xs:date"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		list-type: Belongs to the "swiss-sanctions-list" element and lists the
		allowed values of the "list-type" attribute. Refer to the description of the
		"swiss-sanctions-list" tag for the explanation of the meanings of the 
		values.
 	-->
	<xs:simpleType name="list-type">
		<xs:restriction base="xs:string">
			<xs:pattern value="whole-list|amendment"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		sanctions-program: Per sanctions program, the Swiss government defines one 
		or more sanctions sets (at least one). The "sanctions-program" collects all 
		the necessary information belonging to such a sanctions set, in each of the 
		published languages. 
		Therefore, a "sanctions-program" may contain several program keys (short
		names) and program names (long names) as well as several sanctions sets, but
		each of them contains the same information in another language.
		
		The "origin" tag declares the source of the targets listed in this sanctions
		program, e.g. "UN" or "EU" or "CH".
		
		To allow the updating of client systems in case of changes in the sanctions
		program, the values of the "version-date" and "predecessor-version-date"
		attributes define the current and the previous states of this sanctions
		program.

		@ssid: The Swiss sanctions specific identifier of the record
		@version-date: Version date of the program, equal to the date of the last
			modification (of the sanctions program specific information, not of the
			targets belonging to it!)
		@predecessor-version-date: Version date preceding the "version-date" of the 
			program, equal to the date of the second-last modification (is empty if the
			sanctions program information has been saved only once)
 	-->
	<xs:element name="sanctions-program">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="program-key"/>
				<xs:element maxOccurs="unbounded" ref="program-name"/>
				<xs:element maxOccurs="unbounded" ref="sanctions-set"/>
				<xs:element minOccurs="0" ref="origin"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="version-date" use="required" type="xs:date"/>
			<xs:attribute name="predecessor-version-date" type="xs:date"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		program-key: A short description of the sanctions program, providable in
		different languages

		@lang: The three-letter language key, as defined in ISO 639-2
 	-->
	<xs:element name="program-key">
		<xs:complexType mixed="true">
			<xs:attribute name="lang" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>

	<!-- 
		program-name: A long description of the sanctions program, providable in
		different languages

		@lang: The three-letter language key, as defined in ISO 639-2
 	-->
	<xs:element name="program-name">
		<xs:complexType mixed="true">
			<xs:attribute name="lang" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		sanctions-set: The description of the set of sanctions, e.g. as a 
		comma-separated list, providable in different languages

		@ssid: The Swiss sanctions specific identifier of the record
		@lang: The three-letter language key, as defined in ISO 639-2
 	-->
	<xs:element name="sanctions-set">
		<xs:complexType mixed="true">
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="lang" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		origin: the source of the sanctions program's data, such as "UN" or "EU" 
		or "CH"
	-->
	<xs:element name="origin" type="xs:string" />
	
	<!-- 
		target: Targets are the main focus of the Swiss sanctions lists. Being 
		individuals, entities or objects of a certain type, they belong to a certain
		sanctions program and a therein defined sanctions set. This set describes 
		the sanctions measures which the Swiss government convicted this target. 
		Example: Individuals of country XYZ face a travel ban in Switzerland.
		
		Whether a target is an individual, an entity or an object of a certain type
		is defined by the respective subtag. Only one of those subtags is allowed 
		per target tag. 
		
		The foreign identifier is the identifier of this target on the source list 
		(see "origin" of "sanctions-program" tag referred to by the 
		"sanctions-set-id" attribute), if given.
		
		Generic attributes are used in special circumstances where multiple targets
		share an attribute, such as gross registered tonnage in case of vessels, 
		i.e. of objects of type "vessel". Additionally, generic attributes serve as 
		an extension point for future, not yet known attributes.
		
		The modifications form the update history of this target. The initial 
		modification is the one which brought this target onto the list. Each 
		subsequent modification indicates a change of the target's data, a so-called
		"amendment". If the target one day was removed from the list, the final 
		modification describes the "de-listed" event. The reason why zero 
		modications are allowed too is the fact that target tags may be child tags 
		of the modification's "added" and "removed" subtags as well. This is the 
		case when a target tag itself becomes modified, i.e. if the foreign 
		identifier or the individual's sex attribute are updated or if the target
		changes to another sanctions set. To avoid an endless loop "target -> 
		modification -> target -> modification etc.", the modification subtags are
		omitted in this very specific situation.

		@sanctions-set-id: The reference to a sanctions set and therefore 
			indirectly to the sanctions program which this target belongs to
		@ssid: The Swiss sanctions specific identifier of the record. This SSID
			NEVER changes (to be sure to always access the same target, also if it
			has become updated).
 	-->
	<xs:element name="target">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="sanctions-set-id" type="xs:integer" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element minOccurs="0" ref="foreign-identifier"/>
				<xs:choice>
					<xs:element ref="individual"/>
					<xs:element ref="entity"/>
					<xs:element ref="object"/>
				</xs:choice>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="generic-attribute"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="modification"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		foreign-identifier: identifier of the source list (see "origin" of
		"sanctions-program" tag referred to by the parent target node's
		"sanctions-set-id" attribute)
	 -->
	<xs:element name="foreign-identifier" type="xs:string"/>
	<!-- 
		generic-attribute: A simple key/value pair; useful if multiple target tags
		share a common attribute, e.g. gross registered tonnage in case of vessels,
		and an extension point for future extensions of the target tag

		@ssid: The Swiss sanctions specific identifier of the record
		@name: The key of the key/value pair, i.e. the attribute name
	-->
	<xs:element name="generic-attribute">
		<xs:complexType mixed="true">
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="name" use="required" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		individual: One of the possible formings of targets. The "individual" tag
		contains all the known data of this particular individual relevant for 
		identification. This data consists of at least an "identity" tag carrying
		the information of the "main" or "standard" identity of this individual.
		
		If more than one identity is provided in this tag, this means that the 
		herein described person maintains at least one "fake" identity. Such an 
		additional identity typically consists of a false name and a false passport 
		containing a false birth date and a - probably - false nationality.
		
		Although considered optional, the justification is in fact always given, 
		i.e. the "justification" tag is always present. This subtag contains the 
		information why this person is on the sanctions list at all. 
		
		Sometimes, the justification is based on a designation or on the fact that 
		this person is the relative of another one on the list or the owner of a 
		listed company. If such a relation between two targets on the list is 
		defined, the "relation" tag holds the information needed to describe this 
		particular relation.
		
		The "other-information" subtag is a fallback for all the additional,
		identifying information which cannot be filled into one of the other 
		defined tags.

		@sex: The sex of the individual, if provided by the source list and/or if 
		relevant for identification
 	-->
	<xs:element name="individual">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="identity"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="justification"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="relation"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="other-information"/>
			</xs:sequence>
			<xs:attribute name="sex" type="sex-values"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		sex-values: Belongs to the "individual" element and lists the
		allowed values of the "sex" attribute.
 	-->
	<xs:simpleType name="sex-values">
		<xs:restriction base="xs:string">
			<xs:pattern value="male|female"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		entity: The second possible forming of targets. The "entity" tag contains
		all the known data of this particular company or organization 
		relevant for identification. This data consists of at least an "identity" 
		tag carrying the information of the "main" or "standard" identity of this 
		entity.
		
		If more than one identity is provided in this tag, this means that the 
		herein described legal person maintains at least one "fake" identity. 
		Such an additional identity typically consists of a false name, paired with
		false and/or additinal addresses.
		
		Although considered optional, the justification is in fact always given, 
		i.e. the "justification" tag is always present. This subtag contains the 
		information why this entity is on the sanctions list at all. 
		
		Sometimes, the justification is the fact that this entity is owned or
		controlled by another target on the list, i.e. an individual facing 
		sanctions of the Swiss government. If such a relation between two  
		targets on the list is defined, the "relation" tag holds the information 
		needed to describe this particular relation.
		
		The "other-information" subtag is a fallback for all the additional,
		identifying information which cannot be filled into one of the other 
		defined tags.
 	-->
	<xs:element name="entity">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="identity"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="justification"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="relation"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="other-information"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		object: The third - and last - possible forming of targets. The "object" tag
		is a placeholder for all kinds of objects facing sanctions, such as vessels, 
		aircraft, Web sites etc. The kind of object is specified by the value of the
		"type" attribute. The "object" tag contains all the known data of 
		this particular "object of a certain type" relevant for identification. This 
		data consists of at least an "identity" tag carrying the information of the 
		"main" or "standard" identity of this entity.
		
		If more than one identity is provided in this tag, this means that for the 
		herein described object, a "fake" identity exists / is maintained. Such an 
		additional identity typically consists of a false name, paired with other
		false attributes.
		
		Although considered optional, the justification is in fact always given, 
		i.e. the "justification" tag is always present. This subtag contains the 
		information why this "object of a certain type" is on the sanctions list at 
		all. 
		
		Sometimes, the justification is the fact that this entity is owned or
		controlled by another target on the list, i.e. an individual facing 
		sanctions of the Swiss government. If such a relation between two  
		targets on the list is defined, the "relation" tag holds the information 
		needed to describe this particular relation.
		
		The "other-information" subtag is a fallback for all the additional,
		identifying information which cannot be filled into one of the other 
		defined tags.

		@object-type: The type of this object, as defined in the list of
		"object-type-values"
 	-->
	<xs:element name="object">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="identity"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="justification"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="relation"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="other-information"/>
			</xs:sequence>
			<xs:attribute name="object-type" use="required" type="object-type-values"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		object-type-values: Belongs to the "object" element and lists the
		allowed values of its "object" attribute.
 	-->
	<xs:simpleType name="object-type-values">
		<xs:restriction base="xs:string">
			<xs:pattern value="vessel|aircraft|web-site|other"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		identity: Collection of all the information related to a certain identity 
		of the target. The minimal content of such an identity is a name.
		
		Each target has a least one identity, the "main" one. Only if a target
		maintains another, i.e. a "fake" identity, more than one identity tags are
		contained in an individual, entity or object tag.
		
		The identity of an individual may contain each of the declared subtags,
		while an entity may neither contain a "nationality" nor a "place-of-birth"
		nor an "identification-document" subtag. An "object" tag may in addition
		not contain an "address" subtag.
		
		The identity tag may be a subtag of the following tag within an XML
		document: "individual", "entity", "object", "added" and "removed".
		- If it's a subtag of "individual", "entity" or "object", the identity tag
			describes a certain identity, i.e. its latest state.
		- If it's a subtag of "added", it's a part of a modification's list of 
		  additions or updates. If so, there are two cases:
		  1) A whole new identity is to be recorded, including all the information
		     belonging to that new identity. In this case, the identity must not
		     be empty since an identity must at least contain a name tag to be
		     meaningful.
		  2) A new "name", "nationality", "day-month-year", "place-of-birth", 
		     "address" and/or "identification-document" is to be added to the 
		     already existing identity. Providing such new nodes within the parent
		     identity tag allows for the identification of the identity which these
		     new node(s) belong(s) to.
		- If it's a subtag of "removed", it's a part of a modification's list of 
		  removals or updates. If so, the whole identity is to be removed. Whether
		  this identity must contain the various subtags or not is undefined.
		Note to the "added"/"removed" tags: If the parent target tag of this 
		"identity" tag is a subtag of an "added" or "removed" tag, this identity tag 
		must be provided WITHIN this target tag, NOT IN ADDITION to it (refer to the
		description of the "target", the "added" and the "removed" tags for more
		information).

		@ssid: The Swiss sanctions specific identifier of the record
		@main: Whether this is the main identity or not (default: true)
 	-->
	<xs:element name="identity">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="name"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="nationality"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="day-month-year"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="place-of-birth"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="address"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="identification-document"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="main" type="xs:boolean" default="true"/>
		</xs:complexType>
	</xs:element>


	<!-- 
		day-month-year: Generic term for dates of birth, foundation and creation, as
		used for individuals, entities and objects of any type.
		
		A day-month-year is a "incompleteness-aware" date, containing as much 
		information as known, e.g. only the year or month and year or the whole date
		information.

		@ssid: The Swiss sanctions specific identifier of the record
		@day: The day of the date in the specified calendar (may be omitted, if 
			unknown; minimum value: 1)
		@month: The month of the date in the specified calendar (may be omitted, if 
			unknown; minimum value: 1)
		@year: The year of the date in the specified calendar (may be omitted, if 
			unknown)
		@calendar: Name of the underlying calendar (default: Gregorian, i.e. the
			standard Western calendar)
		@quality: The quality of the information (default: good)
 	-->
	<xs:element name="day-month-year">
		<xs:complexType>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="day" type="xs:integer"/>
			<xs:attribute name="month" type="xs:integer"/>
			<xs:attribute name="year" type="xs:integer"/>
			<xs:attribute name="calendar" type="xs:NCName" default="Gregorian"/>
			<xs:attribute name="quality" type="quality-values" default="good"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		quality-values: Belongs to the "day-month-year", "place-of-birth", "name" 
		and "address" elements and lists the allowed values of the "quality" attribute.
 	-->
	<xs:simpleType name="quality-values">
		<xs:restriction base="xs:string">
			<xs:pattern value="good|low"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		place-of-birth: A reference to a place denominating the place of birth of an
		individual (entities and objects don't have places of birth). The reference
		is expressed by the id of the place in the "place-id" attribute.

		@ssid: The Swiss sanctions specific identifier of the record
		@place-id: The reference to the place record describing this place of birth
		@quality: The quality of the information (default: good)
 	-->
	<xs:element name="place-of-birth">
		<xs:complexType>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="place-id" use="required" type="xs:integer"/>
			<xs:attribute name="quality" type="quality-values" default="good"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		nationality: An two-letter ISO 3166 code denominating the country which 
		this individual is a national of. The nationality tag itself is in fact 
		empty, except for the country subtag which holds the country code and 
		the english name of the country.

		@ssid: The Swiss sanctions specific identifier of the record
 	-->
	<xs:element name="nationality">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="country"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		identification-document: Describes an identification document, such as a
		passport, a travel document or a driving permit, by providing all the known 
		attributes of this document.
		
		The minimal set of attributes consists of the document type, the dcoument 
		number and the issuer.

		@ssid: The Swiss sanctions specific identifier of the record
		@document-type: A descriptor of the document, such as "passport", 
			"diplomatic-passport", "travel-document" or "driving-permit"
 	-->
	<xs:element name="identification-document">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="number"/>
				<xs:element ref="issuer"/>
				<xs:element minOccurs="0" ref="date-of-issue"/>
				<xs:element minOccurs="0" ref="place-of-issue"/>
				<xs:element minOccurs="0" ref="expiry-date"/>
				<xs:element minOccurs="0" ref="remark"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="document-type" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		number: Belongs to the "identification-document" element and contains the
		number of the identification document as a string. 
	-->
	<xs:element name="number" type="xs:string"/>
	
	<!-- 
		issuer: An two-letter ISO 3166 code denominating the country OR an official 
		acronym (e.g. "EU") denominating the international organisation which issued
		the identification document, accompanied by the english name of the country 
		or the international organization. The reasons for providing both the 
		acronym and the full are an improved readability of the XML files and no 
		need for an external name resolution instance.
		
		@code: the code of the country or of the international organization
	-->
	<xs:element name="issuer">
		<xs:complexType mixed="true">
			<xs:attribute name="code" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		date-of-issue: An XSD compliant ISO 8601 date describing the date of issue 
		of the parent identification docuent, such as "2009-10-22" 
	-->
	<xs:element name="date-of-issue" type="xs:date"/>
	
	<!-- 
		expiry-date: An XSD compliant ISO 8601 date describing the expiry date of 
		the parent identification docuent, such as "2009-10-22" 
	-->
	<xs:element name="expiry-date" type="xs:date"/>
	
	<!-- 
		place-of-issue: Describes a reference to the place record describing the 
		place of issue of the parent identification document. If this tag is 
		contained in an XML document, it must contain the place-id attribute.
		
		@place-id: The id of the place record which is part of the list of places
		provided at the end of the XML document
	 -->
	<xs:element name="place-of-issue">
		<xs:complexType>
			<xs:attribute name="place-id" use="required" type="xs:integer"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		justification: The reasoning why the target is on the sanctions list at all.
		This reasoning is a string which may contain newline and tab characters too,
		i.e. which contains some formatting information.

		@ssid: The Swiss sanctions specific identifier of the record
	 -->
	<xs:element name="justification">
		<xs:complexType mixed="true">
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		relation: Collection of attributes describing the relation of any kind of 
		the parent target tag to another target on the list (i.e. within the XML 
		document).
		
		This relation is specified by the "relation-type" value. Such a value 
		describes the sort of the relation of this target to the other one, e.g.
		"(this target) son-of (other target)".
		
		If needed, additional information to this relation may be provided via the
		"remark" subtag.

		@ssid: The Swiss sanctions specific identifier of the record
		@target-id: The Swiss sanctions specific identifier of the other target
		@relation-type: A descriptor of the relation, such as "wife-of", 
			"subsidiary-of" or "controlled-by" (values predefined in the managing
			application), or a manually entered value
 	-->
	<xs:element name="relation">
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:element minOccurs="0" ref="remark"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="target-id" use="required" type="xs:integer"/>
			<xs:attribute name="relation-type" use="required" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		other-information: If there is information relevant for identification of
		the parent target which doesn't fit into any of the other tags, this
		information may be provided via this "other-information" tag.

		@ssid: The Swiss sanctions specific identifier of the record
	 -->
	<xs:element name="other-information">
		<xs:complexType mixed="true">
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		name: A name is collection of ordered name parts (at least one) which all
		together form the name. This construct allows for the representation of all 
		the variations of displaying names around the world.
		
		Each target must have at least one name. This is equal to the minimal set of
		information to be provided per target. This required name must belong to the
		main identity and consist of at least one name part.
		
		Discussion:
		- In Western countries, typically two name parts are provided (given name
			and family name).
		- In Russia, there is always a third name part, the "patronym" or "father
			name".
		- In many Asian countries, the order of the name parts is "family name 
			before given name".
		- In Arabian countries, a name may consist just a given name or many more
			name parts like grandfather's name, tribal name and so on.
		- A company typically has one single name, consisting of one or more tokens.
			Such a name is identified by the "whole-name" value of the name part's
			"name-part-type" attribute.
			
		If a name may be written in different ways and/or is to be provided in 
		different scriptings too, the name's name parts are enriched with spelling
		variants (not the name itself!).

		@ssid: The Swiss sanctions specific identifier of the record
		@name-type: A descriptor of the name, such as "primary-name", 
		"alias" or "formerly-known-as"
		@quality: The quality of the name (default: good)
		@lang: The four-letter language key, as defined in ISO 639-2
	 -->
	<xs:element name="name">
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="name-part"/>
			</xs:sequence>
			<xs:attribute name="ssid" type="xs:integer"/>
			<xs:attribute name="name-type" type="name-type"/>
			<xs:attribute name="quality" type="quality-values" default="good"/>
			<xs:attribute name="lang" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		name-type: Belongs to the "name" element and lists the allowed values of 
		the "name-type" attribute.
 	-->
	<xs:simpleType name="name-type">
		<xs:restriction base="xs:string">
			<xs:pattern value="primary-name|alias|formerly-known-as"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		name-part: A name part is one part of a whole name. Each name part is 
		defined by a certain name part type and optionally accompanied by one or 
		more spelling variants. By providing spelling variants, the findability
		of this name is improved.

		@order: A cardinal number defining the place of this name part within the 
			whole name.
		@name-part-type: A descriptor of the name part, such as "given-name", 
		"alternative-given-name", "family-name", "tribal-name" or "whole-name". The
		latter one is a catch-all for names which cannot be split up, such as names 
		of legal entities or names entirely written in a non-latin alphabet
	 -->
	<xs:element name="name-part">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="value"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="spelling-variant"/>
			</xs:sequence>
			<xs:attribute name="order" type="xs:integer"/>
			<xs:attribute name="name-part-type" use="required" type="name-part-type"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		value: Belongs to the "name-part" tag and holds the effective name part
		descriptor
	-->
	<xs:element name="value" type="xs:string"/>
	
	<!-- 
		remark: Placeholder for any additional information provided within an
		"identification-document", a "relation" or an "address" tag
	-->
	<xs:element name="remark" type="xs:string"/>
	
	<!-- 
		name-part-type: Belongs to the "name-part" element and lists the allowed 
		values of the "name-part-type" attribute. These values cover lots of 
		different ways to represent names and contain a catch-all ("whole-name") 
		for names which cannot be split up, such as names of legal entities or names
		 entirely written in a non-latin alphabet
 	-->
	<xs:simpleType name="name-part-type">
		<xs:restriction base="xs:string">
			<xs:pattern 
				value="given-name|further-given-name|family-name|father-name|grand-father-name|great-grand-father-name|tribal-name|mother-name|son-name|maiden-name|title|suffix|whole-name|other"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		spelling-variant: A spelling variant is a language or	a script specific 
		variant of a name part (not of a whole name!), such as a French 
		transliteration of an Arab name or the representation of the name part in
		the Cyrillic alphabet. A "spelling-variant" tag must be accompanied by the
		"spelling-variant-type" attribute, while the "lang" and the "script"
		attribute are optional.
		Note: In version 1 of the Swiss sanctions list application, the value of the
		spelling-variant-type attribute is always "not-defined".

		@lang: The three-letter language key, as defined in ISO 639-2
		@script: The four-letter script key, as defined in ISO 15924
		@spelling-variant-type: Defines the type of the spelling variant, such as 
		"original-name" or "transliteration". 
	 -->
	<xs:element name="spelling-variant">
		<xs:complexType mixed="true">
			<xs:attribute name="lang" type="xs:NCName"/>
			<xs:attribute name="script" type="xs:NCName"/>
			<xs:attribute name="spelling-variant-type" use="required" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		address: Collection of all the known information belonging to a location of
		a building where this target resides or formerly resided. In the ideal case, 
		the building is fully described, but often there is only a few information 
		available. Therefore, this tag isn't restrictive regarding the subtags, 
		except for the relation to the place, meaning that the minimal information
		needed to represent an address is a place.
		
		An address may be the current one or a former one. In the latter case, this
		is expressed by a the "false" value of the "current" attribute.
		
		If an address is considered inaccurate, this may be expressed by the "low"
		value of the "quality" attribute.

		@ssid: The Swiss sanctions specific identifier of the record
		@place-id: The reference to the place record describing this address
		@quality: The quality of the information (default: good)
		@current: Whether this address is the current one of this target or not
			(default: true)
	 -->
	<xs:element name="address">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" ref="c-o"/>
				<xs:element minOccurs="0" ref="address-details"/>
				<xs:element minOccurs="0" ref="p-o-box"/>
				<xs:element minOccurs="0" ref="zip-code"/>
				<xs:element minOccurs="0" ref="remark"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
			<xs:attribute name="place-id" use="required" type="xs:integer"/>
			<xs:attribute name="quality" type="quality-values" default="good"/>
			<xs:attribute name="current" type="xs:boolean" default="true"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		c-o: Subtag of the "address" tag, denominates an alternative name at the
		specified address. The value of the "c-o" tag doesn't contain the token 
		"c/o" (or similar).
	-->
	<xs:element name="c-o" type="xs:string"/>
	
	<!-- 
		address-details: All the address specific information used to identify a
		building in the area specified by the place and eventually by the zip code.
		Since this information varies a lot all over the world, the address tag
		doesn't contain more specific subtags than this "address-details" tag.
		
		The value of the "address-details" tag may contain formatting characters,
		such as newlines or tabs.
	-->
	<xs:element name="address-details" type="xs:string"/>
		
	<!-- 
		p-o-box: If a P.O. box is part of the address, the name or number of this
		P.O. box is given within this tag. The token "P.O.Box" (or similar) itself
		is not provided within this tag.
	-->
	<xs:element name="p-o-box" type="xs:string"/>
		
	<!-- 
		zip-code: Since zip codes vary a lot all over the world and are sometimes
		place before and sometimes after the place name, this tag provides the zip
		code as a separate string. This allows for location and language specific
		placing of the zip code string in the output created by the client systems.
	-->
	<xs:element name="zip-code" type="xs:string"/>
	
	<!-- 
		modification: This tag describes the sum of changes which a target underwent
		in a single modification. These changes are expressed by changed "ssid"
		attributes of the changed tags (except the "target" tag, see above).
		
		All the added tags (i.e. the additions to the target) are direct or indirect
		subtags of the "added" subtag, while the removed tags (i.e. the information
		removed from the target) are direct or indirect subtags of the "removed"
		subtag. In case an information was updated, the old information is given in
		the "removed" and the new one in the "added" tag (there are no "updated" 
		tags!).
		
		Such a modification is specified by three dates: 
		- The enactment date, i.e. the date on which the Swiss government enacted
		  the law which added this target to the list, updated it or removed it from
		  the list
		- The publication date, i.e. the date on which this new law was published
		- the effective date, i.e. the date on which this new law became part of the
		  current (= effective) law
		Since a target can undergo a series of modifications, the modification tags
		must be sortable. Relevant for sorting is the effective date.
		Amendment XML documents can be created before the enactment of the 
		amendment. These XML documents are considered "previews for internal review" 
		and are not designed to be published by the SECO. Nevertheless, since those 
		previews contain neither of the three dates, the corresponding date tags are 
		marked optional.
		
		Notes: 
		- A list of type "amendment" may contain only one modification per target
			tag. This modification is then part of that specific amendment. In 
			contrast, a list of type "whole-list" may contain several modifications
			per target, but then only effective ones, i.e. modifications with an
			"effective-date" of today or in the past.
		- Applying the sorted sequence of modifications up to a certain date allows 
			for the reconstruction of the sanctions target's state at that date. 
			Applying the sorted sequence of all modifications produces the current or
			last state of the target.
		- If there is only one modification (i.e. the "listed" one), this tag 
			doesn't contain any child tags to avoid redundant information. But if 
			there are more modification tags, the first one, i.e. the "listed" one,
			holds all the information of the target known when it became listed.
		- If the modification is of type "de-listed", i.e. one which describes the
			removal of the target from the list, then it doesn't contain any child 
			tags to avoid redundant information.
		- Modifications which are older than the going live of the Swiss sanctions
		  list application aren't dated back. Such modifications simply don't
		  contain neither of the three dates.
		
		@modification-type: "listed", "amended" or "de-listed"
		@enactment-date: Date of subscription by the Federal Council
		@publication-date: Date of publication of the amendment, i.e. the list of
			modifications which this target was a part of, in the the official 
			collection of Swiss laws as well as in the Internet 
		@effective-date: The date from which on the modification is part of the 
			official Swiss law
	 -->
	<xs:element name="modification">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="added"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="removed"/>
			</xs:sequence>
			<xs:attribute name="modification-type" use="required" type="modification-values"/>
			<xs:attribute name="enactment-date" type="xs:date"/>
			<xs:attribute name="publication-date" type="xs:date"/>
			<xs:attribute name="effective-date" type="xs:date"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		added: Collection of all the additions to the target at the date of the 
		parent modification.
		
		The subtags of this "added" tag are copied to the target on applying the
		modification. Therefore, client systems can simply add these tags to their stored version of the target to get the new state after the modification. 
		
		The "added" tag contains the new tags at "the lowest required level". This 
		means that the lowest tags in the hierarchy are added to this tag which 
		have an "ssid" attribute and which therefore are addressable directly. If
		additional information is needed to exactly know where this tag is to be
		added to (i.e. an identity), then this additional information must be
		provided too.
		
		Discussion: 
		- "name", "day-month-year", "place-of-birth", "address" and 
			"identification-document" tags must be provided as subtags of the identity 
			tag which they belong to. This is necessary because the client systems 
			must know which identity these added tags belong to.
		- If a "name-part" has changed, the whole name (within the related identity)
			must be added to this tag since the name part itself doesn't hold an "ssid"
			attribute.
		- If a foreign identifier or the sex of an individual is to be added, the
			whole target tag must be added to this tag, since neither the 
			"foreign-identifier" nor the "individual" tags hold an "ssid" attribute.
		- If the target is to be moved from one sanctions set to another, the whole
			target tag is to be added to this "added" tag containing the id of the new
			sanctions set as the "sanctions-set-id" attribute. Refer to the 
			description of the "removed" tag to see what else is to be done.
		- If a new justification tag is to be added to this target, the 
			"justification"	tag itself is sufficient since it holds an "ssid" 
			attribute and is therefore addressable directly.
	 -->
	<xs:element name="added">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="target" minOccurs="0"/>
				<xs:element ref="identity" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="justification" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="relation" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="other-information" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="generic-attribute" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		removed: Collection of all the removals from the target at the date of the 
		parent modification.
		
		The subtags of this "removed" tag are removed from the target on applying
		the modification. Therefore, client systems can simply remove these tags 
		from their stored version of the target to get the new state after the 
		modification. 
		
		The "removed" tag contains the old tags at "the lowest required level". This 
		means that the lowest tags in the hierarchy are added to this tag which 
		have an "ssid" attribute and which therefore are addressable directly. 
		
		Discussion: 
		- If this tag holds an identity subtag, this means that the whole identity
			and all the therein stored information is to be removed. This is different
			from the behavior of an identity tag being a subtag of an "added" tag!
			Whether such an identity tag contains the related subtags or not is
			undefined.
		- If a "name-part" has changed, the old whole name must be added to this 
			tag since the name part itself doesn't hold an "ssid" attribute.
		- If a foreign identifier or the sex of an individual is to be removed, the
			whole target tag must be added to this tag, since neither the 
			"foreign-identifier" nor the "individual" tags hold an "ssid" attribute.
		- If the target is to be moved from one sanctions set to another, the whole
			target tag is to be added to this "removed" tag containing the id of the 
			old sanctions set as the "sanctions-set-id" attribute. Whether this target
			tag contains the other, unchanged subtags or not is undefined.
		- If a justification tag is to be removed from this target, the 
			"justification"	tag itself is sufficient since it holds an "ssid" 
			attribute and is therefore addressable directly.
	 -->
	<xs:element name="removed">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="target" minOccurs="0"/>
				<xs:element ref="identity" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="name" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="day-month-year" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="place-of-birth" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="address" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="nationality" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="identification-document" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="justification" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="relation" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="other-information" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="generic-attribute" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		modification-values: Belongs to the "modification" element and lists the
		allowed values of the "modification-values" attribute.
 	-->
	<xs:simpleType name="modification-values">
		<xs:restriction base="xs:string">
			<xs:pattern value="listed|amended|de-listed"/> 
		</xs:restriction>
	</xs:simpleType>
	
	<!-- 
		place: Links either of a location, an area and/or a country to form a more 
		or less precisely identified place. These places are used in 
		"place-of-birth", in "address" and in "identification-document" tags.
		At least one of the "location", "area" and "country" subtags must be 
		contained within a place tag.
		
		For "location" and "area" tags, additional variants may be provided as well.
		These variants are similar to the spelling variants of names but not 
		identical since "spelling-variant" is only one the possible variant types, 
		besides e.g. "formerly-known-as".
		
		Places are listed in a separate section within XML documents. The reasons
		for this separation are as follows:
		- avoid redundant place tags within the same document
		- make sure that each place tag describing the same place contains the same
		  data

		@ssid: The Swiss sanctions specific identifier of the record
 	-->
	<xs:element name="place">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" ref="location"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="location-variant"/>
				<xs:element minOccurs="0" ref="area"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="area-variant"/>
				<xs:element minOccurs="0" ref="country"/>
			</xs:sequence>
			<xs:attribute name="ssid" use="required" type="xs:integer"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		location: The name of the location (village, city etc.), typically in 
		English
	-->
	<xs:element name="location" type="xs:string"/>
	
	<!-- 
		area:  The name of the area (district, region, province, state, canton 
		etc.), typically in English
	-->
	<xs:element name="area" type="xs:string"/>
	
	<!-- 
		country: A two-letter ISO 3166 code denominating the country, accompanied by 
		the english name of the country. The reasons for providing both the acronym 
		and the full are an improved readability of the XML files and no need for 
		an external name resolution instance.
		
		@iso-code: the two-letter country code, as defined in ISO 3166 
	-->
	<xs:element name="country">
		<xs:complexType mixed="true">
			<xs:attribute name="iso-code" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		location-variant: A variant of a location. Such a variant cannot be 
		contained in the XML document without the related location.

		@variant-type: Specifies the reason or source of this variant, e.g.
			"original-name", "formerly-known-as", "alternative-name" or
			"spelling-variant"
 	-->
	<xs:element name="location-variant">
		<xs:complexType mixed="true">
			<xs:attribute name="variant-type" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
	<!-- 
		area-variant: A variant of an area. Such a variant cannot be contained in 
		the XML document without the related area.

		@variant-type: Specifies the reason or source of this variant, e.g.
			"original-name", "formerly-known-as", "alternative-name" or
			"spelling-variant"
 	-->
	<xs:element name="area-variant">
		<xs:complexType mixed="true">
			<xs:attribute name="variant-type" use="required" type="xs:NCName"/>
		</xs:complexType>
	</xs:element>
	
</xs:schema>
