<?xml version="1.0"?>
<!-- 2006 (c)CableLabs. All rights reserved -->
<!-- PacketCable PACM: XML Schema Definitions for "CL-PKTC-ACL" -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cablelabs.com/namespaces/PacketCable/R2/XSD/v1/CL-PKTC-ACL" targetNamespace="http://www.cablelabs.com/namespaces/PacketCable/R2/XSD/v1/CL-PKTC-ACL" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:simpleType name="baseAccessControlType">
        <xsd:annotation>
            <xsd:documentation>Standard access levels</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="stdAccessControlsType">
        <xsd:annotation>
            <xsd:documentation>Standard access levels</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="baseAccessControlType">
            <xsd:enumeration value="NetworkWritable"/>
            <xsd:enumeration value="EntityWritable"/>
            <xsd:enumeration value="AnyWritable"/>
        </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="accessLevelType">
        <xsd:union memberTypes="baseAccessControlType stdAccessControlsType"/>
    </xsd:simpleType>
    <xsd:element name="access-control">
        <xsd:annotation>
            <xsd:documentation>The access level for the node referenced above.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base="accessLevelType">
                    <xsd:attribute ref="access-control"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element>
    <xsd:attribute name="access-control" type="accessLevelType"/>
    <xsd:element name="access">
        <xsd:annotation>
            <xsd:documentation>
             Access level declarations for a given node within the current document
             </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="node" type="xsd:string">
                    <xsd:annotation>
                        <xsd:documentation>
                         Node is an XPath reference to a node witin the current document
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element ref="access-control"/>
                <xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute ref="access-control"/>
            <xsd:anyAttribute namespace="##other"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="documentAclType">
        <xsd:sequence>
            <xsd:element ref="access" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:anyAttribute namespace="##other"/>
    </xsd:complexType>
    <xsd:element name="aggregated-acls">
        <xsd:annotation>
            <xsd:documentation>
             The access control element specifies one of either  an inline access control 
             specification for the container  document, or a reference to an external document.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="documentAclType">
                    <xsd:attribute name="source" type="xsd:anyURI" use="optional"/>
                    <xsd:attribute ref="access-control"/>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="access-declarations">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="document" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>Access definitions for a document
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:complexType>
                        <xsd:complexContent>
                            <xsd:extension base="documentAclType">
                                <xsd:attribute name="source" type="xsd:anyURI" use="required"/>
                                <xsd:attribute name="access-control" type="accessLevelType"/>
                            </xsd:extension>
                        </xsd:complexContent>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
            <xsd:attribute ref="access-control"/>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

