<?xml version="1.0" encoding="UTF-8"?>
<!-- **************************************************************** -->
<!--                            UNCLASSIFIED                          -->
<!-- **************************************************************** -->
<!-- ****************************************************************
    INTELLIGENCE COMMUNITY TECHNICAL SPECIFICATION  
    XML DATA ENCODING SPECIFICATION FOR PUBLICATIONS (NTK.XML)
    ****************************************************************
    Module:   NTK-XML
    Date:     2011-01-31
    Creators: Office of the Director of National Intelligence
    Intelligence Community Chief Information Officer
    **************************************************************** -->
<!-- **************************************************************** -->
<!--                            INTRODUCTION                          -->
<!-- **************************************************************** -->
<!-- This XML Schema file is one component of the XML Data Encoding 
    Specification (DES). Please see the document titled 
    XML DATA ENCODING SPECIFICATION FOR NEED TO KNOW METADATA 
    for a complete description of the encoding as well as list
    of all components.  
    
    It is envisioned that this schema or its components, as well as other
    parts of the DES may be overridden for localized implementations. 
    Therefore, permission to use, copy, modify and distribute this XML 
    Schema and the other parts of the DES for any purpose is hereby 
    granted in perpetuity.
    
    Please reference the preceding two paragraphs in all copies or
    variations. The developers make no representation about the
    suitability of the schema or DES for any purpose. It is provided 
    "as is" without expressed or implied warranty.
    
    If you modify this XML Schema in any way label your schema
    as a variant of NTK.XML. 
    
    Please direct all questions, bug reports,or suggestions for changes
    to the points of contact identified in the document referenced above.
-->
<!-- **************************************************************** -->
<!-- **************************************************************** -->
<!--                       Formal Change List                         -->
<!-- **************************************************************** -->
<!-- The formal change list is at the end of this file.               -->
<!-- **************************************************************** -->
<xsd:schema 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:ntk="urn:us:gov:ic:ntk"
    xmlns:ism="urn:us:gov:ic:ism"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    attributeFormDefault="qualified" 
    elementFormDefault="qualified"
    targetNamespace="urn:us:gov:ic:ntk">
    
    <!-- ************************************************************* -->
    <!-- IMPORT IC INFORMATION SECURITY MARKING ATTRIBUTES ........... -->
    <!-- ************************************************************* -->
    <xsd:import namespace="urn:us:gov:ic:ism" schemaLocation="../ISM/IC-ISM.xsd"/>
    
    <xsd:element name="Access">
        <xsd:annotation>
            <xsd:documentation>A way of describing a formalized Need to Know required for a
                document. NTK requires being inside a schema that implements ISM therefore some element in the implementing schema MUST have 
                ism:ISMRootNodeAttributeGroup and ism:ResourceNodeAttributeGroup since both of those are required for a valid ISM implementation. In addition the root node of the 
                implementing schema must have ntk:NTKRootNodeAttributeGroup specified.</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:all>
                <xsd:element ref="ntk:AccessIndividualList" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ntk:AccessGroupList" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ntk:AccessProfileList" minOccurs="0" maxOccurs="1"/>
            </xsd:all>
            <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:attributeGroup name="NTKRootNodeAttributeGroup">
        <xsd:attribute name="DESVersion" use="required" type="xsd:int" fixed="4" form="qualified">
            <xsd:annotation>
                <xsd:documentation xml:lang="en"> The version number of the DES </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:attributeGroup>
    
    <xsd:element name="AccessIndividualList">
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="unbounded">
                <xsd:element ref="ntk:AccessIndividual"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessIndividual">
        <xsd:annotation>
            <xsd:documentation> A system name followed by 1 or more Individual values representing
                the people that a user wanting access to the document must be a member of.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="1">
                <xsd:element ref="ntk:AccessSystemName" minOccurs="1" maxOccurs="1"/>
                <xsd:element ref="ntk:AccessIndividualValue" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessIndividualValue" type="ntk:StringWithSecurityType"/>
    
    
    <xsd:element name="AccessGroupList">
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="1">
                <xsd:element ref="ntk:AccessGroup" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessGroup">
        <xsd:annotation>
            <xsd:documentation> A system name followed by 1 or more group values representing the
                groups that a user wanting access to the document must be a member of. Logic for the
                group list being boolean AND vs OR is System defined. </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="1">
                <xsd:element ref="ntk:AccessSystemName" minOccurs="1" maxOccurs="1"/>
                <xsd:element ref="ntk:AccessGroupValue" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessGroupValue" type="ntk:StringWithSecurityType"/>
    
    <xsd:element name="AccessProfileList">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="ntk:AccessProfile" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessProfile">
        <xsd:annotation>
            <xsd:documentation> A system name followed by 1 or more values representing a profile
                that a user wanting access to the document must meet. Logic for the profile list
                being boolean AND vs OR is System defined. </xsd:documentation>
        </xsd:annotation>
        
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="1">
                <xsd:element ref="ntk:AccessSystemName" minOccurs="1" maxOccurs="1"/>
                <xsd:element ref="ntk:AccessProfileValue" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessProfileValue">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ntk:StringWithSecurityType">
                    <xsd:attribute name="vocabulary" type="xsd:NMTOKEN" use="required">
                        <xsd:annotation>
                            <xsd:documentation xml:lang="en">
                                A list of words, codes and/or phrases: a lexicon.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessAuthorizationList">
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="1">
                <xsd:element ref="ntk:AccessIndividualList" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ntk:AccessGroupList" minOccurs="0" maxOccurs="1"/>
            </xsd:sequence>
            <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="AccessSystemName" type="ntk:TokenWithSecurityType"/>
    
    <xsd:complexType name="TokenWithSecurityType">
        <xsd:simpleContent>
            <xsd:extension base="xsd:NMTOKEN">
                <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
                <xsd:attributeGroup ref="ntk:CommonAttributesGroup"/>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
    
    <xsd:complexType name="StringWithSecurityType">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attributeGroup ref="ism:SecurityAttributesGroup"/>
                <xsd:attributeGroup ref="ntk:CommonAttributesGroup"/>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
    
    <!-- Common Attributes Group -->
    <xsd:attributeGroup name="CommonAttributesGroup">
        <xsd:attribute name="id" type="xsd:ID" use="optional">
            <xsd:annotation>
                <xsd:documentation xml:lang="en"> A unique XML identifier used to assign an XML
                    unique identifier to an element, such as a paragraph, note or table.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="IDReference" type="xsd:IDREFS" use="optional">
            <xsd:annotation>
                <xsd:documentation xml:lang="en"> A cross-reference to a unique identifier used to
                    point from one element to one or more other elements. The value of the attribute
                    must be one or more XML unique identifiers that are the value(s) of id
                    attribute(s) elsewhere in the document. </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="qualifier" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation xml:lang="en"> A user-defined property within an element for
                    general purpose processing used with block objects to provide supplemental
                    information over and above that conveyed by the element name. This attribute is
                    analogous to HTML's "class" attribute. </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:attributeGroup>
<!-- **************************************************************** -->
<!--                     Formal Change List                           -->
<!-- **************************************************************** -->
<!-- For all changes, provide:
    version, date, modified by, and purpose information.             -->
<!-- **************************************************************** -->
<!-- Version 4, 2011-01-31, modified by:
     Sun, Booz Allen Hamilton    
     - (CR 2011-01) Remove unused ddms namespace declaration
-->    
<!-- **************************************************************** -->
<!--                 End of NTK.XML Schema                      -->
<!-- **************************************************************** -->
<!--                        UNCLASSIFIED                              -->    
</xsd:schema>


