<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:misc="http://www.atsc.org/XMLSchemas/iss/misc/1"
    xmlns:nrt="http://www.atsc.org/XMLSchemas/nrt/2012/1"
    targetNamespace="http://www.atsc.org/XMLSchemas/iss/misc/1" elementFormDefault="qualified"
    version="1.0">
    <import namespace="http://www.atsc.org/XMLSchemas/nrt/2012/1" schemaLocation="SG1.0.xsd"/>
    
    <annotation>
        <documentation source="http://www.atsc.org/cms/standards/a_nnn-2013.pdf">
            ATSC IIS Miscellaneous schema elements
            Version: 1.0
            Date: m/dd/2013
            Location: http://www.atsc.org/XMLSchemas/iss/misc/1.0.xsd
            Namespace: http://www.atsc.org/XMLSchemas/iss/misc/1
            
            Information about the use of this schema can be found in ATSC standard
            A/nnn Interactive Services
            available at http://www.atsc.org/.
            
            This schema defines three XML elements:
            (1) An XML element named LinkMetadata that is used to 
            provide attributes associated with a Link (URL) to a Declarative
            Object (application) that can be downloaded from a remote server 
            and run on demand. 
            (2) An XML element named AugmentedTrigger that is used to
           convey an activation trigger and associated TPT information from 
            a TV receiver to a second screen device.
            (3) An XML element named Trigger that is used to convey a
            trigger in its raw form from a TV receiver to a second screen
            device.
        </documentation>
    </annotation>
    
    <annotation>
        <documentation xml:lang="en">
            LinkMetadata element, used to provide attributes associated with a Link
        </documentation>
    </annotation>
    <element name="LinkMetadata" type="misc:LinkMetadataType"/>

    <annotation>
        <documentation xml:lang="en">
            AugmentedTrigger  element, used to convey an activation trigger and
            associated TPT information from a TV receiver to a second screen
            device
        </documentation>
    </annotation>
    <element name="AugmentedTrigger" type="misc:AugTriggerType"/>

    <annotation>
        <documentation xml:lang="en">
            Trigger  element, used to convey a trigger in its raw form from a
            TV receiver to a second screen device
        </documentation>
    </annotation>
    <element name="Trigger">
        <complexType>
            <attribute name="interactionModel" type="unsignedByte" use="optional"/>
            <attribute name="triggerString" type="string"/>
        </complexType>
    </element>

    <annotation>
        <documentation xml:lang="en">
            LinkMetadataType, the XML type for a LinkMetadata element
        </documentation>
    </annotation>
    <complexType name="LinkMetadataType">
        <sequence>
            <element name="Icon" maxOccurs="unbounded">
                <complexType>
                    <attribute name="source" type="anyURI"/>
                    <attribute name="width" type="unsignedShort" use="optional"/>
                    <attribute name="height" type="unsignedShort" use="optional"/>
                </complexType>
            </element>
        </sequence>
        <attribute name="url" type="anyURI"/>
        <attribute name="title" type="string" use="optional"/>
        <attribute name="majChanNum" type="unsignedShort" use="optional"/>
        <attribute name="minChanNum" type="unsignedShort" use="optional"/>
        <attribute name="channelName" type="string" use="optional"/>
        <attribute name="programName" type="string" use="optional"/>
        <attribute name="expiration" type="dateTime" use="optional"/>
    </complexType>

    <annotation>
        <documentation xml:lang="en">
           AugTriggerType, the XML type  for an AugmentedTrigger element
        </documentation>
    </annotation>
    <complexType name="AugTriggerType">
        <sequence>
            <element name="Capabilities" type="nrt:CapabilitiesType" minOccurs="0"/>
            <element name="Event">
                <complexType>
                    <attribute name="action" type="unsignedByte"/>
                    <attribute name="destination" type="unsignedByte" use="optional"/>
                    <attribute name="diffusion" type="unsignedByte" use="optional"/>
                    <attribute name="data" type="base64Binary" use="optional"/>
                </complexType>
            </element>
        </sequence>
        <attribute name="interactionModel" type="unsignedByte"/>
        <attribute name="appURL" type="anyURI"/>
        <attribute name="cookieSpace" type="unsignedByte" use="optional"/>
    </complexType>

</schema>
