<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2010 rel. 3 (http://www.altova.com) by Swadmin (CableLabs) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:pdn="urn:cablelabs:namespaces:safi:xsd:pdn:3.0" xmlns:adm="http://www.scte.org/schemas/130-3/2008a/adm" xmlns:core="http://www.scte.org/schemas/130-2/2008a/core" xmlns:common="urn:cablelabs:safi:xsd:com:3.0" xmlns:cip="urn:cablelabs:safi:xsd:cip:3.0" targetNamespace="urn:cablelabs:namespaces:safi:xsd:pdn:3.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<xs:annotation>
		<xs:documentation>
			<p>
				<b>Copyright (c)2012, Cable Television Laboratories, Inc.</b>
				<b>XML Schema, Release Version 3.0.0</b>
				<b>SaFI Campaign Information Package Interface.</b>
				<b>This schema is a normative component of CableLabs® Subscription and Fulfillment
					Interfaces, Placement Decision Interface Specification,
					OC-SP-SaFI-PDIv3.0-xxxxxx</b>
			</p>
		</xs:documentation>
	</xs:annotation>
	<!-- Revision History
		D01 - D. Burt.  Convert to Cablelabs namespace, add schema level documentation, switch to Part 3 2010
		End Revision History -->
	<xs:import namespace="http://www.scte.org/schemas/130-2/2008a/core" schemaLocation="SCTE_130-2_2008a.xsd"/>
	<xs:import namespace="http://www.scte.org/schemas/130-3/2008a/adm" schemaLocation="SCTE_130-3_2010.xsd"/>
	<xs:import namespace="urn:cablelabs:safi:xsd:com:3.0" schemaLocation="OC-SaFI-COM-3.0.1.xsd"/>
	<xs:import namespace="urn:cablelabs:safi:xsd:cip:3.0" schemaLocation="OC-SaFI-CIP-3.0.1.xsd"/>
	<!-- Element Declarations -->
	<xs:element name="PlacementDecisionNotification" type="pdn:PlacementDecisionNotificationType"/>
	<xs:element name="PlacementDecisionAcknowledgment" type="pdn:PlacementDecisionAcknowledgmentType"/>
	<!-- Complex Type Declaratons -->
	<xs:complexType name="PlacementDecisionNotificationType">
		<xs:complexContent>
			<xs:extension base="core:Msg_NotificationBaseType">
				<xs:sequence>
					<xs:element name="PlacementData" type="pdn:PlacementDataType" maxOccurs="unbounded"/>
					<xs:element ref="core:Ext" minOccurs="0"/>
				</xs:sequence>
				<xs:anyAttribute namespace="##any" processContents="lax"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="PlacementDecisionAcknowledgmentType">
		<xs:complexContent>
			<xs:extension base="core:Msg_AcknowledgementBaseType"/>
		</xs:complexContent>
	</xs:complexType>
	<!-- PDNPlacementDecisionEventType - sourced from SCTE 130-3 and extended to use the extended Placement (PDNPlacementType) to carry decision related data -->
	<xs:complexType name="PlacementDecisionEventType">
		<xs:sequence>
			<xs:annotation>
				<xs:documentation>
					<p>Status Code is an SCTE 130 status code reflecting the result of the entire decision event (i.e., corresponding to the PlacementResult.StatusCode).</p>
					<p>The PlacementConstraints element applies to the entire PlacementDecision which may be subdivided via the list of Placement elements. Individual placements may be further controlled by their own local PlacementConstraints element.</p>
					<p> utcDecisionTime - timestamp of decision in utc </p>
					<p>One or more of the data items will carried in elements/attriubutes under PlacementDecisionEvent </p>
					<p>id = unique ID for this record</p>
					<p>placementOpportunityRef = POID</p>
					<p>Entertainment - PAID of the entertainment assets (this PAID plus the POID creates an unambiguous link to the placement opportunity)</p>
				</xs:documentation>
			</xs:annotation>
			<xs:element name="StatusCode" type="core:StatusCodeType"/>			
			<xs:element ref="adm:Entertainment" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element ref="adm:OpportunityBinding"/>
				<xs:element ref="adm:LinearAvailBinding"/>
			</xs:choice>
			<xs:element ref="adm:PlacementConstraints" minOccurs="0"/>
			<xs:element name="Placement" type="pdn:PDNPlacementType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="core:Ext" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="core:idAttrType" use="required">
			<xs:annotation>
				<xs:documentation>Unique identifier.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="utcDecisionTime" type="xs:dateTime" use="required">
			<xs:annotation>
				<xs:documentation>date and time when the placement decision was made</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="fillAction">
			<xs:annotation>
				<xs:documentation>fillAction – specifies the fill action taken. Valid values:
					<ul>
						<li>- filled - return "filled" if one or more placements made</li>
						<li>- noCampaignMatch - return "noCampaignMatch" if no "campaign" (ex. CableLabs SAFI CIP) entries matched this opportunity</li>
						<li>- noAssetOpportunities - return "noAssetOpportunities" if there are no opportunities to fill in the asset.</li>
						<li>- private:.+ - a private fillAction</li>
					</ul>
				</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="delete|filled|noCampaignMatch|noAssetOpportunities|private:.+"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="placementOpportunityRef" type="core:idAttrType">
			<xs:annotation>
				<xs:documentation>Reference associating this PlacementDecision with a  CableLabs Metdata 3.0 PlacementOpportunity element.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="poProviderVersionNum" type="xs:integer" use="optional">
			<xs:annotation>
				<xs:documentation>Optionally identifies the specific provider version number of a referenced PlacementOpportunityGroup</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="poInternalVersionNum" type="xs:integer" use="optional">
			<xs:annotation>
				<xs:documentation>Optionally identifies the specific internal version number of a referenced PlacementOpportunityGroup</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="localServiceRef" type="adm:localServiceRefAttrType" use="optional">
			<xs:annotation>
				<xs:documentation>Reference to a Service element contained locally in the PlacementResponse message.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:anyAttribute namespace="##any" processContents="lax"/>
	</xs:complexType>
	<xs:complexType name="PlacementDataType">
		<xs:sequence>
			<xs:element name="ADMIdentifyingInformation" minOccurs="0">
				<xs:annotation>
					<xs:documentation>ADM message information as received in the PlacementRequest</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element ref="core:Ext" minOccurs="0"/>
					</xs:sequence>
					<xs:attributeGroup ref="core:Msg_BaseAttrsType"/>
					<xs:attribute name="messageReceiveDateTime" type="xs:dateTime">
						<xs:annotation>
							<xs:documentation>date/time the message was received</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:anyAttribute namespace="##any" processContents="lax"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="ADSIdentifyingInformation" minOccurs="0">
				<xs:annotation>
					<xs:documentation>ADS message information as supplied in the PlacementResponse</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element ref="core:Ext" minOccurs="0"/>
					</xs:sequence>
					<xs:attributeGroup ref="core:Msg_BaseAttrsType"/>
					<xs:attribute name="messageSendDateTime" type="xs:dateTime">
						<xs:annotation>
							<xs:documentation>date/time when the PlacementResponse was sent</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:anyAttribute namespace="##any" processContents="lax"/>
				</xs:complexType>
			</xs:element>
			<xs:sequence minOccurs="0">
				<xs:annotation>
					<xs:documentation>These elements apply to all PlacementDecision events below. If the element appears here then it should not appear in any named event anywhere below. </xs:documentation>
				</xs:annotation>
				<xs:element name="SystemContext" type="adm:SystemContextType" minOccurs="0"/>
				<xs:element name="Client" type="adm:ClientType" minOccurs="0"/>
			</xs:sequence>
			<xs:element name="PlacementDecisionEvent" type="pdn:PlacementDecisionEventType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="core:Ext" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="adm:eventRangeDateTimeAttrsType"/>
		<xs:anyAttribute namespace="##any" processContents="lax"/>
	</xs:complexType>
	<!--PDNPlacementType element - extend adm:PlacementType to carry decision specific data -->
	<xs:complexType name="PDNPlacementType">
		<xs:complexContent>
			<xs:extension base="adm:PlacementType">
				<xs:sequence>
					<xs:annotation>
						<xs:documentation>The PlacementConstraints element applies to the entire PlacementDecision which may be subdivided via the list of Placement elements. Individual placements may be further controlled by their own local PlacementConstraints element.</xs:documentation>
						<xs:documentation>
							<p>Status code is an SCTE 130 status code applying to this particular placement.</p>
							<p>adm:Placement@action - delete or fill</p>
							<p>adm:Placement@position - position within the POID</p>
							<p>pdn:PlacementCIPDataAttributeGroup - PEID/EPSID/revision from the CIP</p>
							<p>Terms - logical value data </p>
						</xs:documentation>
					</xs:annotation>
					<xs:element name="StatusCode" type="core:StatusCodeType"/>					
					<xs:element name="Terms" type="cip:TermType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Pass one or more lvalue's as defined in SAFI CIP. See SAFI CIP for complete description of how lvalue's are resolved.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attributeGroup ref="pdn:CIPDataAttributeGroup"/>
				<xs:anyAttribute namespace="##any" processContents="lax"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:attributeGroup name="CIPDataAttributeGroup">
		<xs:attribute name="peid" type="common:PeidType" use="optional">
			<xs:annotation>
				<xs:documentation>peid/epsid from the CIP (ex. peid/epsid from the AssetRef of the placed asset)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="epsid" type="common:EpsidType" use="optional"/>
		<xs:attribute name="cipRevision" type="cip:ElementRevisionNumberType" use="optional">
			<xs:annotation>
				<xs:documentation>The revision number the Peid and Epsid. This is the revision attribute on the CIP Placment.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>
</xs:schema>
