<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema targetNamespace="http://www.omg.org/spec/rms/20101201/AttributeProfile" 
	xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ap="http://www.omg.org/spec/rms/20101201/AttributeProfile">
	<xs:annotation>
		<xs:documentation>The AttributeProfile package provides the capability of specifying attribution by class type for the major RECORDS MANAGEMENT classes. This enables attribution based on the business context of the RECORDS MANAGEMENT environment allowing attribution according to such standards as DoD 5015.2, Dublin Core, etc.</xs:documentation>
	</xs:annotation>
	<xs:element name="AttributeProfileSet" type="ap:AttributeProfileSet"/>
	<xs:complexType name="AttributeProfileSet">
		<xs:sequence minOccurs="1" maxOccurs="1">
			<xs:element name="AttributableObject" type="ap:AttributableObject" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="DataProfile" type="ap:DataProfile" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="RmsProfiledItems" type="ap:RmsProfiledItems" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="AttributableClassType" type="ap:AttributableClassType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="RmsAttributeType" type="ap:RmsAttributeType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="AttributeValue" type="ap:AttributeValue"/>
	<xs:complexType name="AttributeValue">
		<xs:annotation>
			<xs:documentation>A value of an attribute associated with an AttributableObject.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="attributeDefinitionID" type="xs:NCName" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The RMSAttributeDefn on which the AttributeValue is based.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="attributevalue" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The string representing the value of the attribute of the AttributableObject</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="dateset" type="xs:dateTime" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The date/time that the value of the AttributableObject was set.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="nextID" type="xs:NCName" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The superceding AttributeValue for a chronicled attribute.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="previousID" type="xs:NCName" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The superceded AttributeValue for a chronicled attribute.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="setterID" type="xs:NCName" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="DataProfile" type="ap:DataProfile"/>
	<xs:complexType name="DataProfile">
		<xs:annotation>
			<xs:documentation>A profile of attribute definitions that may apply to AttributableObject's under organizational, ad hoc, or de jure standards or conventions.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="description" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Textual description of the DataProfile</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="id" type="xs:ID" minOccurs="1" maxOccurs="1"/>
			<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The unique name of the data profile.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="version" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The version of the DataProfile</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="attributeDefinition" type="ap:DataProfileAttrDefn" minOccurs="1" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The DataProfile of which the DataProfileAttrDefn is a member.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="AttributableClassType" type="ap:AttributableClassType"/>
	<xs:complexType name="AttributableClassType">
		<xs:annotation>
			<xs:documentation>The specialization class type of the Attributable object which aggregates the set of attributes as defined by the DataProfileAttrDefn's that can be assigned as AttributeValue's to an AttributableObject.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="attributableObjectID" type="xs:NCName" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The object that is attributed.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="attributeDefinitionID" type="xs:NCName" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The definition of an attribute that applies to the AttibutableClassType</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="id" type="xs:ID" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Unique Identifier</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="name" type="ap:AttributableClassTypes" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The name of the records management domain classes whose objects can be assigned AttributeValue's if defined in a DataProfile.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="RmsProfiledItems" type="ap:RmsProfiledItems"/>
	<xs:complexType name="RmsProfiledItems">
		<xs:sequence/>
	</xs:complexType>
	<xs:element name="AttributableObject" type="ap:AttributableObject"/>
	<xs:complexType name="AttributableObject" abstract="true">
		<xs:annotation>
			<xs:documentation>An object that can be attributed through the AttributeProfile services.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="attributableClassTypeID" type="xs:NCName" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The type of the object that is attributed.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="value" type="ap:AttributeValue" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The attributed object.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="DataProfileAttrDefn" type="ap:DataProfileAttrDefn"/>
	<xs:complexType name="DataProfileAttrDefn">
		<xs:annotation>
			<xs:documentation>A member of a DataProfile that describes an attribute that is applicable to a specific AttributableClassType.
    
    If the object specified by a DataProfileAttrDefn is a RecordPart, it must specify oneor more DocumentType's to which the attribute applies.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="attributableClassTypeID" type="xs:NCName" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The class of object to which the DataProfileAttrDefn applies</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="attributedescription" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Textual description of the attribute.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="attributetype" type="ap:RmsAttributeType" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The AttributableClassType to which the DataProfileAttrDefn applies.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="chronicled" type="xs:boolean" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>When .chronicled and .updateable = "True" , a new AttributeValue of the same RMSAttributeDefn may be created and linked to the previous one through the next/previous association.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="documentTypeID" type="xs:NCName" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The DocumentType's that makes the DataProfileAttrDefn eligible for use on a RecordPart.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="id" type="xs:ID" minOccurs="1" maxOccurs="1"/>
			<xs:element name="profileattributename" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The name of the profile, unique in the context of its DataProfile. There may be multiple DataProfileAttrDefn's with the same name if they are in different DataProfile's</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="removeable" type="xs:boolean" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>If "True", the object's AttributeValue conformant to this definition may be removed (deleted).</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="requiredatcreation" type="xs:boolean" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>If "True", the object must be provided an AttributeValue conformant to this definition at time of creation.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="requiredfordisposition" type="xs:boolean" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>If "True", the object's AttributeValue conformant to this definition must be present before final disposition (Transfer or Destroy) can be performed on the ManagedRecord associated with an object with this AttributeValue.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="requiredformanagement" type="xs:boolean" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>If "True", the object's AttributeValue conformant to this definition must be present for management of the ManagedRecord associated with an object with this AttributeValue.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="updateable" type="xs:boolean" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>If "True", the object's AttributeValue conformant to this definition may be updated. In the case that the value is not chronicled, the .attributeValue may be changed with new .dateSet, and .party. In the case that the value is chronicled, a new AttributeValue of the same RMSAttributeDefn is created and linked to the previous one through the next/previous association.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="valueID" type="xs:NCName" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The AttributeValue which is based on the RMSAttributeDefn</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="AttributableClassTypes">
		<xs:annotation>
			<xs:documentation>The classes whose instances can be attributed through an RMSDataProfile, i.e., be assigned AttributeValue's.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="managedrecord">
				<xs:annotation>
					<xs:documentation>ManagedRecord is attibutable</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="provenanceassociation">
				<xs:annotation>
					<xs:documentation>ProvenanceAssociation is attibutable.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="annotation">
				<xs:annotation>
					<xs:documentation>Annotation is attributable.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="recordpart">
				<xs:annotation>
					<xs:documentation>RecordPart is attributable.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="RmsAttributeType">
		<xs:annotation>
			<xs:documentation>The type of the attribute.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="integer"/>
			<xs:enumeration value="string"/>
			<xs:enumeration value="datetime"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
