<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:cip="http://www.cablelabs.com/namespaces/safi/xsd/cip/2.0"
	xmlns:common="http://www.cablelabs.com/namespaces/safi/xsd/com/2.0"
	targetNamespace="http://www.cablelabs.com/namespaces/safi/xsd/cip/2.0"
	elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!-- R3 -->
	<!-- Added Copyright, title -->
	<xs:annotation>
		<xs:documentation>
			<b>Copyright (C) 2008-2010, Cable Television Laboratories, Inc.</b>
			<b>SaFI Campaign Information Package Interface,
			XML Schema,  Release Version 2.0.0.</b>
		</xs:documentation>
	</xs:annotation>	
	<!-- From CIP 1.dev-2.1 for 20100619 Interop -->
	<!-- Edits from dev-2 to r1, 11/1/2010, DVB
		  changed target, cip, and common namespace. changed com inport file and namespace
		Edits from r1 to r2, 12/7/2010		
		  Added Copyright, title
		  Removed ReadRequest/@contextId, /@isRetry
		  ReadResponse/CampInfoPkg allowed occurs unbounded
		  Removed ReadResponse/@contextId
		  Made UpdateNotice/CampInfoPkg occurs unbounded, remove contextId
	      Removed UpdateResponse/@contextId
	      Removed Placement/action placeholder
	      Made five Placement/@Cip.. start w/lowrer case
	      Removed now unreferenced ActionType
	      Removed redundant non-empty requirement in AssetMetadataKeyType
	      Removed redundant non-empty requirement in AssetMetadataValueType
	      Removed unreferenced ImpressionGoalType
	      Removed redundant non-empty requirement in NamespaceType
	      Removed redundant non-empty requirement in QualifierNameType
	      Removed unreferenced SendTriggerType
	      Removed unreferenced TerminateType
	      Removed redundant non-empty requirement in ValueType
	      Made 3 /@Cip... attributes lower caes in CipNotificationGroup
	      Made 7 /@Cip..., one /@Bundle attribute lower caes in CipSelectorGroup
	    Edits from r2 to r3, 1/10/2011		
	      Added Ext as last (or only) sequential element in all message bodies
	      Deleted AppPhaseType
	      Added Ext as last (or only) sequential element in QualifierType, TermType
	      Deleted RetDataType
	      Removed AtomicGroup
	      Removed relatedPeid and relatedEpsid
	      Update definitions of MetadataKey and MetadataValue
	      Change import schema location to CL public URL
	-->
	<!-- Changed to URL for import -->
	<xs:import namespace="http://www.cablelabs.com/namespaces/safi/xsd/com/2.0"
		schemaLocation="http://www.cablelabs.com/namespaces/safi/xsd/com/v2.0/CL-SaFI-COM-2.0.0.xsd
		"/>
	
	<!-- Normal document root -->
	<xs:element name="CampInfoPkg">
		<xs:annotation>
			<xs:documentation>CIP root element</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Version" type="common:VersionType"/>
				<xs:element name="MsoOrder" type="cip:MsoOrderType" maxOccurs="unbounded"/>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- Message elements -->
	<xs:element name="ReadRequest">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation>Element for Read message. ContextId will be returned in the
					ReadResponse data that corresponds to this query.</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
			<!-- Removed ReadRequest contextId, isRetry -->
			<xs:attributeGroup ref="cip:CipSelectorGroup"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="ReadResponse">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation>Response for Read message. ContextId matches
					ReadRequest.</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<!-- allowed occurs unbounded -->
				<xs:element ref="cip:CampInfoPkg" minOccurs="0" maxOccurs="unbounded" />
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
			<!-- Removed contextId -->
			<xs:attributeGroup ref="cip:MsgResultAttributeGroup"/>
		</xs:complexType>
	</xs:element>
	<!-- Made CampInfoPkg occurs unbounded, removed contextId -->
	<xs:element name="UpdateNotice">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation>Distributes (pushes) one or more updates to campaign data.
					ContextId will be returned in UpdateResponse, provides transaction
					traceability.</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element ref="cip:CampInfoPkg" minOccurs="0" maxOccurs="unbounded"/>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
			<xs:attribute name="isRetry" type="xs:boolean" default="false"/>
		</xs:complexType>
	</xs:element>
	<!-- Removed contextId -->
	<xs:element name="UpdateResponse">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation> Response to the Campaign update identified contextId.
				</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
			<xs:attributeGroup ref="cip:MsgResultAttributeGroup"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="SetRegistrationRequest">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation> Element for SetRegistration message. Identifies target URL,
					boolean Active sets as enabled or disabled (by Active value) for distributions.
					For both operations, if the syscode set is empty the entire set of syscodes
					predefined for the subscriber (via some out unspecified mechanism) is implied.
				</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="Subscriber" type="xs:anyURI"/>
				<xs:element name="Active" type="xs:boolean"/>
				<xs:element name="Syscodes" type="common:SyscodeType" minOccurs="0"
					maxOccurs="unbounded"/>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="SetRegistrationResponse">
		<xs:complexType mixed="true">
			<xs:annotation>
				<xs:documentation>Response for SetRegistration message. Note that if any syscode of
					an enabled registration is already registered to another Subscriber the
					registration fails. In this case a reponse of "NOTOK" with a reason of "Syscode
					not Unique" will be returned, and the text will contain a space-delimited list
					of the errored syscode(s). </xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
			<xs:attributeGroup ref="cip:MsgResultAttributeGroup"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="GetRegistrationRequest">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation> Element for GetRegistration message. Identifies target URL of
					query and requests the list of syscodes active at that URL. </xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="Subscriber" type="xs:anyURI"/>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="GetRegistrationResponse">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation> Response for GetRegistration message. Identifies target URL and a
					list of syscodes that are currently enabled. </xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="Subscriber" type="xs:anyURI"/>
				<xs:element name="Syscodes" type="common:SyscodeType" minOccurs="0"
					maxOccurs="unbounded"/>
				<!-- Added Ext -->
				<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>				
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="InvalidRequest">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation>Contents of fault on Read Request.</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="Reason">
					<xs:simpleType>
						<xs:restriction base="xs:NMTOKEN">
							<xs:enumeration value="From-ToNotPaired"/>
							<xs:enumeration value="IdOwnerNotPaired"/>
							<xs:enumeration value="NoSelection"/>
							<xs:enumeration value="NoneFound"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="Values">
					<xs:complexType>
						<xs:sequence/>
						<xs:attributeGroup ref="cip:CipSelectorGroup"/>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- Complex Types -->
	<!-- Removed AppPhaseType -->
	<xs:complexType name="AssetIdentifierType">
		<xs:annotation>
			<xs:documentation> Use Metadata 3.0 asset identifier here </xs:documentation>
		</xs:annotation>
		<xs:attribute name="id" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="AssetMetadataAttribute">
		<xs:annotation>
			<xs:documentation>
				<p>These pairs define metadata elements whose value must match that provided
				to enable placement of the asset</p>
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="assetMetadataKey" type="xs:string" use="required"/>
		<xs:attribute name="assetMetadataValue" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="AssetReferenceType">
		<xs:annotation>
			<xs:documentation> This supplies the detail of an asset that is part of the placement.
					<p>Note that an AssetReferenceType contains a RecordIdAttributeGroupOpt, but no
					RecordStatusAttributeGroup. Consequently an AssetReferenceType is a reportable
					CIP node, but is not an independent revision group. Rather it is a contained
					member of its parent revision. If no PEID is present in the AssetReferenceType
					it is inherited from the parent Placement. The Epsid is required always
					required.</p>
				<p>The key-value sets may be used to describe any metadata that might be needed to
					be attached to the asset such as the PAID of the creative</p>
				<p>The assetType identifies the family of the asset, which enables some
					interpretations of the asset structure without reference to the metadata</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<!-- Sequence of key-value sets, optional -->
			<xs:element name="AssetMetadata" type="cip:AssetMetadataAttribute" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="rotation" type="cip:PerCentType"/>
		<xs:attribute name="assetType" type="cip:AssetTypeType" use="required"/>
		<xs:attribute name="apply" type="cip:AssetApplicationType" use="required"/>
		<xs:attributeGroup ref="cip:RecordIdAttributeGroupOpt"/>
	</xs:complexType>
	<xs:complexType name="CommonQualifierGroupType">
		<xs:annotation>
			<xs:documentation> A boolean qualifier expression that is defined for a bundle and
				evaluated for each placement of the bundle. Multipe qualifiers represent enclosed
				expressions, and are combined with the condition operator. <p>Qualifier is an
					enclosed expression</p>
				<p>Condition is the binary boolean operator used to combine the qualifiers</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Qualifier" type="cip:QualifierType" maxOccurs="unbounded"/>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="condition" type="cip:ConditionType" use="required"/>
	</xs:complexType>
	<xs:complexType name="GuidType">
		<xs:annotation>
			<xs:documentation> A guid is a general purpose UUID. Guids are always defined with this
				type, which provides an alternative meaningful human readable name
			</xs:documentation>
		</xs:annotation>
		<xs:attributeGroup ref="cip:GuidAttributeGroup"/>
	</xs:complexType>
	<xs:complexType name="MsoOrderType">
		<xs:annotation>
			<xs:documentation>
				<p>A container for campaign placement data for a single MSO. The container will
					contain placements for one or more campaigns.</p>
				<p>The SysOrder list holds campaign placements by syscode within the MSO</p>
				<p>The name is a standardized name of the MSO</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="SysOrder" type="cip:SystemOrderType" maxOccurs="unbounded"/>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="name" type="cip:MsoNameType" use="optional"/>
	</xs:complexType>
	<xs:complexType name="PlacementType">
		<xs:annotation>
			<xs:documentation>
				<p>The definition of a specific placement within a bundle.</p>
				<p>The Placement is uniquely identified by the PEID+EPSID in the
					RecordIdAttributeGroupOpt. Note a missing PEID is defaulted to be that of the
					parent Bundle. Since Placement also has a RecordStatusAttributeGroup it is an
					updateable element. All Placements with a single PEID+EPSID comprise one
					revision group, of which only zero or one will be valid at any time. The
					document order will have them as adjacent elements in decreasing revision number
					order. </p>
				<p>The AssetReference list is a list of the components of this placement.</p>
				<p>The list of QualifierGroups define qualifier expressions that must be satisified
					for this specific placement. The multiple groups are always 'and'ed, so this
					placement occurs only if each group is individually true. If there are common
					qualifier groups defined for the placement's bundle, they are also and'ed with
					these groups.</p>
				<p>The ProductFamily identifies the type of ad unit being expressed. The
					interpretation of this element is conditioned by the ProductFamily. This field
					is optional, and will be missing if the placement productFamily does not need
					further qualification.</p>
				<p>If this element contains an ApplicationDefinitionAttributeGroup it describes an
					enhanced asset. If there is no associated placed media, it describes an
					application only, which enhances the target directly. If there are also
					AssetReferences to placed media, the enhancement applies to those media.</p>
				<p>If this element contains an ApplicationDefinitionAttributeGroup and includes one
					or more CoDF or CoDF data AssetReferences, it is describing an application
					placement that is to be performed on the target asset, possibly in conjunction
					with a media placement. When there is no CoDF or CoDF data AssetReferences this
					is a description of an enhancement that has been made externally, and is only
					present to inform plant management and return data processing.</p>
				<p>Category is an optional field that labels this placement's category with for the
					benefit of later placements</p>
				<p>TrickMode can be used to describe the permitted trick modes during a VOD media
					playout</p>
				<p>Priority is a placeholder for further business terms. In the mean time it is
					passed to the placement decision owner for interpretation.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="QualifierGroup" type="cip:QualifierGroupType" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="AssetReference" type="cip:AssetReferenceType" minOccurs="0"
				maxOccurs="unbounded"/>
			<!-- Removed RetDataType -->
			<!-- Removed Placement/action placeholder -->
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<!-- Removed atomic group -->
		<xs:attribute name="category" type="cip:CategoryType" use="optional"/>
		<xs:attribute name="productFamily" type="cip:ProductFamilyType" use="optional"/>
		<xs:attributeGroup ref="cip:ApplicationDefinitionAttributeGroup"/>
		<xs:attribute name="trickMode" type="cip:TrickModeControlType" use="optional"/>
		<xs:attribute name="priority" type="cip:PriorityType" use="required"/>
		<!-- Removed relatedPeid and relatedEpsid -->
		<xs:attributeGroup ref="cip:RecordIdAttributeGroupOpt"/>
		<xs:attributeGroup ref="cip:RecordStatusAttributeGroup"/>
	</xs:complexType>
	<xs:complexType name="BundleType">
		<xs:annotation>
			<xs:documentation>
				<p>This contains the definition of a set of placements in a specific campaign at an
					indicated MSO and syscode. The relation between the placements that forms the
					basis of a bundle is out of scope for this specification. Each placement of the
					bundle is evaluated independently except for the specifically defined
					interactions with attributes of the bundle or atomic groups within the
					bundle.</p>
				<p>A Placement is uniquely identified by the PEID+EPSID in the
					RecordIdAttributeGroupReq. Since it also has a RecordStatusAttributeGroup it is
					an updateable element. All placements with the same PEID+EPSID define one
					revision group, of which only zero or one will be valid at any time. If the
					document has multiple revisions of one group, the document will contain them as
					adjacent elements in decreasing revision number order.</p>
				<p>The list of CommonQualifierGroups define qualifier expressions that must be
					satisified for this placement. The multiple groups are always 'and'ed, so the
					placement occurs only if each group is individually true.</p>
				<p>If the placement evalutes to true, each contained placement is inidividually
					evaluated and may or may not participate in the placement instance.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="StwShpData" type="cip:StewardshipDataType"/>
			<xs:element name="CommonQualifierGroup" type="cip:CommonQualifierGroupType"
				minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Placement" type="cip:PlacementType" maxOccurs="unbounded"/>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<!-- Made five Placement/@Cip.. start w/lower case -->
		<xs:attribute name="cipVer" type="cip:CampaignVersionType" use="required"/>
		<xs:attribute name="cipOrdrOwnr" type="cip:IdentifierOwnerType" use="required"/>
		<xs:attribute name="cipOrder" type="cip:IdentifierIdType" use="required"/>
		<xs:attribute name="cipCreDat" type="cip:CampaignCreationDateType"/>
		<xs:attribute name="cipRevDat" type="cip:CampaignRevisionDateType" use="required"/>
		<xs:attribute name="decisionOwner" type="cip:DecisionOwnerType" use="required"/>
		<xs:attributeGroup ref="cip:GuidAttributeGroup"/>
		<xs:attributeGroup ref="cip:RecordIdAttributeGroupReq"/>
		<xs:attributeGroup ref="cip:RecordStatusAttributeGroup"/>
	</xs:complexType>
	<xs:complexType name="QualifierGroupType">
		<xs:annotation>
			<xs:documentation> A boolean qualifier expression that is evaluated for a placement that
				is and'ed with the bundle's commonQualfier groups. Multiple qualifiers within the
				group are enclosed expressions, and are combined with the condition operator.
					<p>Qualifier supplies an enclosed expression</p>
				<p>condition is the binary boolean operator used to combine the enclosed
					expressions</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Qualifier" type="cip:QualifierType" maxOccurs="unbounded"/>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="condition" type="cip:ConditionType" use="required"/>
	</xs:complexType>
	<xs:complexType name="QualifierType">
		<xs:annotation>
			<xs:documentation>
				<p>Set of one or more boolean terms that are always 'and'ed</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Term" type="cip:TermType" minOccurs="1" maxOccurs="unbounded"/>
			<!-- Adde Ext -->
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TermType">
		<xs:annotation>
			<xs:documentation> An individual boolean qualifier term, which is a binary boolean
				operation. The qualifier and namespace select a data element known to the evaluation
				environment which compares the current value of that element with the value supplied
				in the expression. The comparison is subject to the semantics of the qualifier's
				datatype, and the comparison operation is defined by the operation. <p>namespace is
					a value from a predefined set of namespaces which have implementions in each
					execution environment.</p>
				<p>qualifier is a predefined name within the identified namespace</p>
				<p>operation is binary boolean operator describing a required relation for this
					qualifier. The current actual value of the qualifier name in the implementation
					environment is the right operand for that operator.</p>
				<p>value is the left operand of the defined boolean operator.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<!-- Added Ext -->
			<xs:element name="Ext" type="common:ExtType" minOccurs="0" maxOccurs="unbounded"/>		
		</xs:sequence>
		<xs:attribute name="namespace" type="cip:NamespaceType" use="required"/>
		<xs:attribute name="qualifier" type="cip:QualifierNameType" use="required"/>
		<xs:attribute name="operation" type="cip:OperationType" use="required"/>
		<xs:attribute name="value" type="cip:ValueType" use="required"/>
	</xs:complexType>
	<!-- Deleted RetDataType -->
	<xs:complexType name="StewardshipDataType">
		<xs:annotation>
			<xs:documentation>
				<p>The Contact list provides one or more contacts identified to provide operational
					assistance. Contact roles can help in selecting the correct contact. </p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Contact" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attributeGroup ref="cip:ContactAttributeGroup"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SystemOrderType">
		<xs:annotation>
			<xs:documentation>
				<p>A System Order provides a container for campaign placement data at a single
					syscode within one MSO.</p>
				<p>The operational instructions are defined by an unordered series of bundles.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Bundle" type="cip:BundleType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Ext" type="common:ExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="name" type="common:SyscodeType" use="optional"/>
	</xs:complexType>
	<!-- Simple Types -->
	<!-- Removed unreferenced ActionType -->
	<xs:simpleType name="AppMessageRepositoryType">
		<xs:annotation>
			<xs:documentation> This identifies an application message template repository.
				AppMessageRuleSetType select specific rule sets in the repository.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:UuidUrlType"/>
	</xs:simpleType>
	<xs:simpleType name="AppMessageRuleSetType">
		<xs:annotation>
			<xs:documentation> This identifies a completely defined set of application messages that
				may be issued by an application. It is a key to access the record set in the
				application message template repository. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="AssetApplicationType">
		<xs:annotation>
			<xs:documentation> Defines the appplication of an asset reference. <p>Validate means
					insure a prflight that the asset is present as defined</p>
				<p>place means this asset is part of the placement response data set, but does not
					get preflight validation</p>
				<p>valAndPlace means the asset should be validate at preflight, and is also a part
					of the placement response data set.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="validate"/>
			<xs:enumeration value="place"/>
			<xs:enumeration value="valAndPlace"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="AssetMetadataKeyType">
		<xs:annotation>
			<xs:documentation>This contains an XPath Reference into an asset-specific metadata document
			confroming to an approved schema
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<!-- Removed redundant non-empty requirement in AssetMetadataKeyType -->
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="AssetMetadataValueType">
		<xs:annotation>
			<xs:documentation>This contains the value that must be matched by an asset-specific metadata
				document at the key's Xpath.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<!-- Removed redundant non-empty requirement in AssetMetadataValueType -->
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="AssetTypeType">
		<xs:annotation>
			<xs:documentation> This identifies the kind of asset defined in a reference. It enables
				some decisions about the asset structures prior to, or without requiring examination
				of, the metadata structures. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="media"/>
			<xs:enumeration value="CoDFFile"/>
			<xs:enumeration value="CoDFData"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="AtomicGroupType">
		<xs:annotation>
			<xs:documentation> An identifier that labels a set of placements. All placements in a
				CIP with the same label string are part of an atomic group. All the placements in
				the group must be evaluated when any one is, and all must evaluate to true for any
				of the placments to be true. <p>The domain of an atomic group label is the placement
					in which it occurs.</p>
			</xs:documentation>
		</xs:annotation>
		<!-- Removed redundant non-empty requirement in AtomicGroupType -->
		<xs:restriction base="common:nonEmptyStringType"/>		
	</xs:simpleType>
	<xs:simpleType name="CampaignCreationDateType">
		<xs:annotation>
			<xs:documentation> The time the initial revision of the Campaign Information Package was
				created. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:dateTime"/>
	</xs:simpleType>
	<xs:simpleType name="CampaignRevisionDateType">
		<xs:annotation>
			<xs:documentation> The time this revision of the Campaign Information Package was
				created. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:dateTime"/>
	</xs:simpleType>
	<xs:simpleType name="CampaignVersionType">
		<xs:annotation>
			<xs:documentation>
				<p>Campaign version number. The version number is incremented once if the campaign
					is changed after publication. After an increment the revision number can be
					retained until the next publication.</p>
				<p>CIP documents with the same revision number are guranteed to contain the same
					data for each (MSO, SysCode) present. However, CIP document preparation may
					qualify the contents of a document, so that not all (MSO, SysCode) combinations
					are necessarily present in every document.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonNegativeIntType"/>
	</xs:simpleType>
	<xs:simpleType name="CategoryType">
		<xs:annotation>
			<xs:documentation> Category value for an inserted ad unit, similar to current linear
				usage. Note the value of an exclusion for category collisions depends on all
				placements providing a meaningful category(s). </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="ConditionType">
		<xs:annotation>
			<xs:documentation> A set of boolean binary operators defined on qualifier terms with a
				group. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="and"/>
			<xs:enumeration value="or"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ContactNameType">
		<xs:annotation>
			<xs:documentation> The name of a contact available for issues with a campaign.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<xs:maxLength value="35"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ContactRoleType">
		<xs:annotation>
			<xs:documentation> The role in the campaign workflow represented by a contact.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<xs:maxLength value="25"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ContextIdType">
		<xs:annotation>
			<xs:documentation> Value supplied in a message and echoed in the response to identify
				matched message sets. In the case of CampaignUpdate the contextId may also provide
				traceability to the update that created the message. Use of a UUID or similar unique
				identifier is recommended. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="40"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DecisionOwnerType">
		<xs:annotation>
			<xs:documentation> Identifies the owner of the placement decision. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="ElementRevisionDateType">
		<xs:annotation>
			<xs:documentation> The time this revision of the element was created.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:dateTime"/>
	</xs:simpleType>
	<xs:simpleType name="ElementRevisionNumberType">
		<xs:annotation>
			<xs:documentation> A revision number of an element, incremented each time any data is
				modified. No data within an identified element is changed without a new revision
				number. For each element with an ElementRevisionNumber, only the record with the
				highest revision number currently applies. All others records are present to permit
				processing in the presence of the asynchronous application of update data, but may
				also be of value in reconciliation or continuity. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonNegativeIntType"/>
	</xs:simpleType>
	<xs:simpleType name="ElementStateType">
		<xs:annotation>
			<xs:documentation>
				<p>The current status of the data model of an Element.</p>
				<p>Pending (Pnd)- Data is present, but not an operationally complete or consistent
					set.</p>
				<p>Committed (Com)- Data is present that is an operationally complete and consistent
					set (although not necessarily final. Data may be modified, even when
					active.)</p>
				<p>Active - (Act) The data present is intended to be operational and the line item
					should be executed according to the contained parameters. This is a statement of
					intent, not the result of operational feedback. </p>
				<p>Pause - (Pse) No presentations should be made based on this element. This is
					expected to be a temporary state that will return to Active, but may instead go
					to Windup.</p>
				<p>Windup (Wnd) - All presentations of the line item should have ceased, but
					post-processing functions may continue.</p>
				<p>Closed - (Cls) All activity with respect to the line item should be
					terminated.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="pnd"/>
			<xs:enumeration value="com"/>
			<xs:enumeration value="act"/>
			<xs:enumeration value="pse"/>
			<xs:enumeration value="wnd"/>
			<xs:enumeration value="cls"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="EmailAddressType">
		<xs:annotation>
			<xs:documentation> The email address of a stewardship contact. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="100"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="IdentifierIdType">
		<xs:annotation>
			<xs:documentation> Generic owner identifier ID. Identifiers MUST be unique within the
				namespace of their Identifier Owner. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<xs:maxLength value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="IdentifierOwnerType">
		<xs:annotation>
			<xs:documentation> All identifier owners MUST be set to a registered Internet domain
				name or a qualified domain name that is rooted in a registered internet domain name
				belonging to the provider of the identifier. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:anyURI">
			<xs:maxLength value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- Removed unreferenced ImpressionGoalType -->
	<xs:simpleType name="MessagePrimaryUrlType">
		<xs:annotation>
			<xs:documentation> A Url directly addressed from applications for app fulfillment and
				service metrics messages. May be distinct from summary level url(s).
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:anyURI"/>
	</xs:simpleType>
	<xs:simpleType name="MessageSecondaryUrlType">
		<xs:annotation>
			<xs:documentation> Url for delivering processed reporting received on the primary url.
				This will be empty if no intermediate processing is defined (e.g., the Primary Url
				directly addressed the final data campaign level data sink). </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:anyURI"/>
	</xs:simpleType>
	<xs:simpleType name="MsoNameType">
		<xs:annotation>
			<xs:documentation> A unqiue name assigned to an MSO and present in all the MSO orders or
				queries for that MSO. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<xs:maxLength value="30"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="NamespaceType">
		<xs:annotation>
			<xs:documentation> A predfined value for a qualifier namespace. Each namespace holds a
				set of predefined names, each of which has a datatype and semantic definition.
			</xs:documentation>
		</xs:annotation>
		<!-- Removed redundant non-empty requirement in NamespaceType -->
		<xs:restriction base="common:nonEmptyStringType"/>
	</xs:simpleType>
	<xs:simpleType name="OperationType">
		<xs:annotation>
			<xs:documentation> Binary operator defined on quailifier name-value pairs. The sematics
				of the operations are defined by the datatype assigned to the name.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="eq"/>
			<xs:enumeration value="ne"/>
			<xs:enumeration value="lt"/>
			<xs:enumeration value="gt"/>
			<xs:enumeration value="le"/>
			<xs:enumeration value="ge"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PerCentType">
		<xs:annotation>
			<xs:documentation> Accepts a percent value from 0 to 100 </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:nonNegativeInteger">
			<xs:maxInclusive value="100"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PriorityType">
		<xs:annotation>
			<xs:documentation> A placeholder for general business terms applied to a placement.
				Priorities are defined by a decision owner and those definitions must be honored in
				all placement decision processing that represents that owner. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:long"/>
	</xs:simpleType>
	<xs:simpleType name="ProductFamilyType">
		<xs:annotation>
			<xs:documentation> This is a predefined set of known product families defined by the
				afflilate. It is primarily used for preflight, monitoring, or other stewardship
				functions rather than execution decisions. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="QualifierNameType">
		<xs:annotation>
			<xs:documentation> A predefined name string in one of the qualifier namespaces. An
				external definition of the namespaces is to be found at ??? </xs:documentation>
		</xs:annotation>
		<!-- Remove redundant non-empty requirement in QualifierNameType -->
		<xs:restriction base="common:nonEmptyStringType"/>
	</xs:simpleType>
	<xs:simpleType name="RecordRevokedFlagType">
		<xs:annotation>
			<xs:documentation> True indicates the containing record is deprecated. A higher revision
				may exist with the flag false representing more current data. There will be no
				record with the flag false if the record is deleted. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:boolean"/>
	</xs:simpleType>
	<xs:simpleType name="ReportBeginType">
		<xs:annotation>
			<xs:documentation>
				<p>Describes the beginning of an application reporting window as a signed offset
					with respect to the start of a placement that inculdes an application.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:duration"/>
	</xs:simpleType>
	<xs:simpleType name="ReportEndType">
		<xs:annotation>
			<xs:documentation>
				<p>Describes the end of an application reporting window as a signed offset with
					respect to the end of a placement that inculdes an application.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:duration"/>
	</xs:simpleType>
	<xs:simpleType name="ReportIntervalType">
		<xs:annotation>
			<xs:documentation>
				<p>Describes the interval between reports for a placement. A value of zero indicates
					immediate reporting on each IAM occurance.</p>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:duration"/>
	</xs:simpleType>
	<xs:simpleType name="RepositoryAppKeyType">
		<xs:annotation>
			<xs:documentation> This identifies a complete application. It is a key to access the
				application characterization in the application repository. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:anyURI"/>
	</xs:simpleType>
	<!-- Remove unreferenced SendTriggerType -->
	<!-- Remove unreferenced TerminateType -->
	<xs:simpleType name="TrickModeControlType">
		<xs:annotation>
			<xs:documentation> This will be an enumerated list of defined trick mode options
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="UuidNameType">
		<xs:annotation>
			<xs:documentation> Human-readable name associated with every UUID to allow meaningful
				communication. Should be chosen to have a very low probability of duplication, but
				uniqueness is neither required nor testable. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="common:nonEmptyStringType">
			<xs:maxLength value="40"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ValueType">
		<xs:annotation>
			<xs:documentation> A value to be tested in a qualifier returning a boolean result. The
				specific test to perform is identified by the operation type. </xs:documentation>
		</xs:annotation>
		<!-- Remove redundant non-empty requirement in ValueType -->
		<xs:restriction base="common:nonEmptyStringType"/>
	</xs:simpleType>
	<!-- Attribute Groups -->
	<xs:attributeGroup name="ApplicationDefinitionAttributeGroup">
		<xs:annotation>
			<xs:documentation> The attribute set for characterizing an application. The
				repositoryAppKey characterizes an application according to the specification format,
				and the OrgID,AppID,version identify a specific expression of that repository
				template held in the application repository. AppId/orgId/appVer are a set, all
				present or absent. Either that set or appDataReverence or both must be present for
				the applicationDefinition to be valid. </xs:documentation>
		</xs:annotation>
		<xs:attribute name="appOrgId" type="xs:string" use="optional"/>
		<xs:attribute name="appAppId" type="xs:string" use="optional"/>
		<xs:attribute name="appVer" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="appDataReference" type="cip:RepositoryAppKeyType" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="ContactAttributeGroup">
		<xs:annotation>
			<xs:documentation> Describes one operational contact. Note one of phone or email is
				required </xs:documentation>
		</xs:annotation>
		<xs:attribute name="name" type="cip:ContactNameType" use="required"/>
		<xs:attribute name="role" type="cip:ContactRoleType" use="required"/>
		<xs:attribute name="phone" type="common:PhoneNumberType" use="optional"/>
		<xs:attribute name="email" type="cip:EmailAddressType" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="GuidAttributeGroup">
		<xs:annotation>
			<xs:documentation> Attribute group for all GUIDs </xs:documentation>
		</xs:annotation>
		<xs:attribute name="guid" type="common:UuidUrlType" use="required"/>
		<xs:attribute name="gname" type="cip:UuidNameType" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="RecordIdAttributeGroupReq">
		<xs:annotation>
			<xs:documentation> The set of attributes that identify a specific CIP element as an
				independently reportable unit or identifying elements of a revision set. This group
				requires both the PEID and the Epsid. The group is only identifying a revision set
				if it occurs in conjunction with the RecordStatusAttributeGroup. </xs:documentation>
		</xs:annotation>
		<xs:attribute name="peid" type="common:PeidType" use="optional"/>
		<xs:attribute name="epsid" type="common:EpsidType" use="required"/>
		<xs:attribute name="rname" type="cip:UuidNameType" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="RecordIdAttributeGroupOpt">
		<xs:annotation>
			<xs:documentation> The set of attributes that identify a specific CIP element as an
				independently reportable unit or identifying elements of a revision set. This group
				requires only the Epsid; The PEID can be inherited from a parent. The group is only
				identifying a revision set if it occurs in conjunction with the
				RecordStatusAttributeGroup. </xs:documentation>
		</xs:annotation>
		<xs:attribute name="peid" type="common:PeidType" use="optional"/>
		<xs:attribute name="epsid" type="common:EpsidType" use="required"/>
		<xs:attribute name="rname" type="cip:UuidNameType" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="RecordStatusAttributeGroup">
		<xs:annotation>
			<xs:documentation> Group describing the currency of a document element and it's
				children. Any element with a RecordStatusAttributeGroup must also have a
				RecordIdAttributeGroupOpt. The elements of the revision set will be present in
				document order, sorted by decreasing revision number.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="recState" type="cip:ElementStateType" use="required"/>
		<xs:attribute name="recRevoked" type="cip:RecordRevokedFlagType" use="required"/>
		<xs:attribute name="revision" type="cip:ElementRevisionNumberType" use="required"/>
		<xs:attribute name="revDat" type="cip:ElementRevisionDateType" use="required"/>
	</xs:attributeGroup>

	<xs:attributeGroup name="MsgResultAttributeGroup">
		<xs:annotation>
			<xs:documentation> Attribute group for most message result status </xs:documentation>
		</xs:annotation>
		<xs:attribute name="msgResult">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="OK">
						<xs:annotation>
							<xs:documentation> Accepted </xs:documentation>
						</xs:annotation>
					</xs:enumeration>
					<xs:enumeration value="NOTOK">
						<xs:annotation>
							<xs:documentation> Rejected although content valid </xs:documentation>
						</xs:annotation>
					</xs:enumeration>
					<xs:enumeration value="FAIL">
						<xs:annotation>
							<xs:documentation> Rejected because content invalid </xs:documentation>
						</xs:annotation>
					</xs:enumeration>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<xs:attributeGroup name="CipNotificationGroup">
		<xs:annotation>
			<xs:documentation> Defines data for a Notice operation. Indicates the recipient should
				fetch the referenced Cip. </xs:documentation>
		</xs:annotation>
		<!-- Made 3 /@Cip... attributes lower caes in CipNotificationGroup -->
		<xs:attribute name="cipGUID" type="common:UuidUrlType"/>
		<xs:attribute name="cipGname" type="cip:UuidNameType"/>
		<xs:attribute name="cipVer" type="cip:CampaignVersionType"/>
	</xs:attributeGroup>

	<xs:attributeGroup name="CipSelectorGroup">
		<xs:annotation>
			<xs:documentation> Defines selection criteria for a ReadRequest. A specific campaign is
				identified by GUID or gname or orderId+orderOwner, while orderOwner alone is all
				campaigns of the owner. Date selects CreateFrom LT CipCreateDate and LEQ CreateTo.
				Version omitted or zero returns latest version, else specific version identified,
				version -1 is all. A specific bundle may be requested by PEID, otherwise all are
				implied. </xs:documentation>
		</xs:annotation>
		<!-- Made 7 /@Cip..., one /@Bundle attribute lower caes in CipSelectorGroup -->
		<xs:attribute name="cipCreateFrom" type="cip:CampaignCreationDateType"/>
		<xs:attribute name="cipCreateTo" type="cip:CampaignCreationDateType"/>
		<xs:attribute name="cipGUID" type="common:UuidUrlType"/>
		<xs:attribute name="cipGname" type="cip:UuidNameType"/>
		<xs:attribute name="cipOrderId" type="cip:IdentifierIdType"/>
		<xs:attribute name="cipOrderIdOwner" type="cip:IdentifierOwnerType"/>
		<xs:attribute name="cipVer" type="cip:CampaignVersionType" default="0"/>
		<xs:attribute name="bundlePeid" type="common:PeidType"/>
	</xs:attributeGroup>

</xs:schema>
