<?xml version="1.0"?>
<!--
NAME
    dataSecurity.xsd
DESCRIPTION
    Data Security Documents schema

MODIFIED        MM/DD/YY
   pknaggs      10/23/07 - DSD KGL loading of rewriteMinACL attribute.
   pknaggs      07/16/07 - Aclid to aclpath. Add master-detail instance set.
   sgul         11/16/06 - Adding XML Translation capability.
   sgul         11/15/06 - 
   pthornto     09/14/06 - Initial version
 -->
<schema targetNamespace="http://xmlns.oracle.com/xs" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdbds="http://xmlns.oracle.com/xs" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:sc="http://xmlns.oracle.com/xs" elementFormDefault="qualified" version="1.0" xdb:flags="24885" xdb:schemaURL="http://xmlns.oracle.com/xs/dataSecurity.xsd" xdb:schemaOwner="XDB" xdb:numProps="46">
  <annotation>
    <documentation>
         This XML schema describes the structure of Data Security documents.
     </documentation>
  </annotation>
  <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/csx.xml.xsd"/>
  <import namespace="http://xmlns.oracle.com/xdb" schemaLocation="http://xmlns.oracle.com/xdb/csx.xmltr.xsd"/>
  <element name="DataSecurity" type="xdbds:DataSecurityType" xdb:defaultTable="XS$DATA_SECURITY" xdb:propNumber="2533" xdb:global="true" xdb:memType="258" xdb:defaultTableSchema="XDB"/>
  <complexType name="DataSecurityType" xdb:typeID="162">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2540" kidNum="0"/>
          <xdb:kid propNum="2541" kidNum="1"/>
          <xdb:kid propNum="2542" kidNum="2"/>
          <xdb:kid propNum="2543" kidNum="3"/>
          <xdb:kid propNum="2544" kidNum="4"/>
          <xdb:kid propNum="2545" kidNum="5"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <element ref="sc:title" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2540" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element ref="sc:description" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2541" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element name="selectPrivilege" type="QName" minOccurs="0" xdb:propNumber="2542" xdb:global="false" xdb:SQLType="qname" xdb:memType="260" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <element name="attributeSecs" type="xdbds:attributeSecType" minOccurs="0" xdb:propNumber="2543" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element name="instanceSets" type="xdbds:instanceSetsType" xdb:propNumber="2544" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <!-- this "any" contains all application specific information
             For an attribute set in general e.g. reason for creation -->
      <any minOccurs="0" maxOccurs="unbounded" namespace="##other" xdb:propNumber="2545" xdb:SQLName="SYS_XDBANY97$" xdb:SQLType="VARCHAR2" xdb:memType="258"/>
    </sequence>
  </complexType>
  <complexType name="attributeSecType" xdb:typeID="163">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2551" kidNum="0"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <element name="attributeSec" minOccurs="0" maxOccurs="unbounded" xdb:propNumber="2551" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false">
        <complexType>
          <annotation>
            <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
                <xdb:kid propNum="2546" kidNum="0"/>
                <xdb:kid propNum="2547" kidNum="1"/>
                <xdb:kid propNum="2548" kidNum="2"/>
                <xdb:kid propNum="2549" kidNum="3"/>
                <xdb:kid propNum="2550" kidNum="4"/>
              </xdb:kidList></appinfo>
          </annotation>
          <sequence>
            <element ref="sc:title" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2546" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
            <element ref="sc:description" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2547" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
            <element name="attribute" type="xdbds:coListType" xdb:propNumber="2548" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
            <element name="privilege" type="QName" xdb:propNumber="2549" xdb:global="false" xdb:SQLType="qname" xdb:memType="260" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
            <!-- this "any" contains all application specific information
                 For an attribute set in general e.g. reason for creation -->
            <any minOccurs="0" maxOccurs="unbounded" namespace="##other" xdb:propNumber="2550" xdb:SQLName="SYS_XDBANY96$" xdb:SQLType="VARCHAR2" xdb:memType="258"/>
          </sequence>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <simpleType name="rewriteMinACLType" xdb:typeID="160">
    <restriction base="unsignedInt">
      <minInclusive value="1"/>
      <maxInclusive value="499"/>
      <!-- sys_checkacl max params is 1000 -->
    </restriction>
  </simpleType>
  <simpleType name="dbnameType" xdb:typeID="161">
    <restriction base="string">
      <minLength value="1"/>
      <maxLength value="30"/>
    </restriction>
  </simpleType>
  <complexType name="coListType" xdb:typeID="164">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2552" kidNum="0"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <element name="colName" maxOccurs="1000" type="xdbds:dbnameType" xdb:propNumber="2552" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
    </sequence>
  </complexType>
  <complexType name="convListType" xdb:typeID="165">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb">
          <xdb:kid propNum="2553" kidNum="0"/>
          <xdb:kid propNum="2554" kidNum="1"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <choice maxOccurs="1000">
        <element name="colName" type="xdbds:dbnameType" xdb:propNumber="2553" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
        <element name="colValue" type="string" xdb:propNumber="2554" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      </choice>
    </sequence>
  </complexType>
  <complexType name="aclListType" xdb:typeID="166">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2555" kidNum="0"/>
          <xdb:kid propNum="2556" kidNum="1"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <choice>
        <element name="aclFiles" type="xdbds:aclFilesType" xdb:propNumber="2555" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
        <element name="aclDirectory" type="anyURI" xdb:propNumber="2556" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      </choice>
    </sequence>
  </complexType>
  <complexType name="instanceSetsType" xdb:typeID="167">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb">
          <xdb:kid propNum="2557" kidNum="0"/>
          <xdb:kid propNum="2558" kidNum="1"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <choice maxOccurs="unbounded">
        <element name="instanceSet" type="xdbds:instanceSetType" xdb:propNumber="2557" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
        <element name="inheritedFrom" type="xdbds:inheritedFromType" xdb:propNumber="2558" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      </choice>
    </sequence>
  </complexType>
  <complexType name="inheritedFromType" xdb:typeID="168">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2559" kidNum="0"/>
          <xdb:kid propNum="2560" kidNum="1"/>
          <xdb:kid propNum="2561" kidNum="2"/>
          <xdb:kid propNum="2562" kidNum="3"/>
          <xdb:kid propNum="2563" kidNum="4"/>
          <xdb:kid propNum="2564" kidNum="5"/>
          <xdb:kid propNum="2565" kidNum="6"/>
          <xdb:kid propNum="2566" kidNum="7"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <element ref="sc:title" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2559" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element ref="sc:description" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2560" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element name="name" type="xdbds:dbnameType" xdb:propNumber="2561" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <element name="when" minOccurs="0" type="string" xdb:propNumber="2562" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <element name="parentSchemaName" type="xdbds:dbnameType" xdb:propNumber="2563" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <element name="parentObjectName" type="xdbds:dbnameType" xdb:propNumber="2564" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <element name="primaryKey" type="xdbds:coListType" xdb:propNumber="2565" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element name="foreignKey" type="xdbds:convListType" xdb:propNumber="2566" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
    </sequence>
  </complexType>
  <complexType name="aclFilesType" xdb:typeID="169">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2567" kidNum="0"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <element name="aclFile" minOccurs="0" maxOccurs="unbounded" type="anyURI" xdb:propNumber="2567" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
    </sequence>
  </complexType>
  <complexType name="instanceSetType" xdb:typeID="170">
    <annotation>
      <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
          <xdb:kid propNum="2571" kidNum="0"/>
          <xdb:kid propNum="2572" kidNum="1"/>
          <xdb:kid propNum="2573" kidNum="2"/>
          <xdb:kid propNum="2574" kidNum="3"/>
          <xdb:kid propNum="2578" kidNum="4"/>
          <xdb:kid propNum="2575" kidNum="5"/>
          <xdb:kid propNum="2576" kidNum="6"/>
          <xdb:kid propNum="2568" kidNum="7"/>
          <xdb:kid propNum="2569" kidNum="8"/>
          <xdb:kid propNum="2570" kidNum="9"/>
        </xdb:kidList></appinfo>
    </annotation>
    <sequence>
      <element ref="sc:title" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2571" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element ref="sc:description" minOccurs="0" maxOccurs="unbounded" xdb:maxOccurs="1" xdb:translate="true" xdb:propNumber="2572" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <element name="name" type="xdbds:dbnameType" xdb:propNumber="2573" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <element name="memberEvaluationRule" type="string" xdb:propNumber="2574" xdb:global="false" xdb:SQLType="string" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
      <sequence>
        <element name="paramDatatype" minOccurs="0" maxOccurs="unbounded" xdb:propNumber="2578" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false">
          <complexType>
            <annotation>
              <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
                  <xdb:kid propNum="2577" kidNum="0"/>
                </xdb:kidList></appinfo>
            </annotation>
            <simpleContent>
              <extension base="string">
                <attribute name="name" type="xdbds:dbnameType" use="required" xdb:propNumber="2577" xdb:global="false" xdb:memType="1"/>
              </extension>
            </simpleContent>
          </complexType>
        </element>
      </sequence>
      <element name="acls" minOccurs="0" type="xdbds:aclListType" xdb:propNumber="2575" xdb:global="false" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false"/>
      <!-- this "any" contains all application specific information
             For an instance set in general e.g. reason for creation -->
      <any minOccurs="0" maxOccurs="unbounded" namespace="##other" xdb:propNumber="2576" xdb:SQLName="SYS_XDBANY95$" xdb:SQLType="VARCHAR2" xdb:memType="258"/>
    </sequence>
    <attribute name="static" type="boolean" default="false" xdb:propNumber="2568" xdb:global="false" xdb:memType="252"/>
    <attribute name="rewriteMinACL" type="xdbds:rewriteMinACLType" default="100" xdb:propNumber="2569" xdb:global="false" xdb:memType="68" xdb:memByteLength="4"/>
    <attribute name="rewriteManually" type="boolean" default="false" xdb:propNumber="2570" xdb:global="false" xdb:memType="252"/>
  </complexType>
  <element name="title" xdb:propNumber="2536" xdb:global="true" xdb:memType="258" xdb:defaultTable="title93_TAB" xdb:defaultTableSchema="XDB">
    <complexType>
      <annotation>
        <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
            <xdb:kid propNum="2534" kidNum="0"/>
            <xdb:kid propNum="2535" kidNum="1"/>
          </xdb:kidList></appinfo>
      </annotation>
      <simpleContent>
        <extension base="string">
          <attribute ref="xml:lang" xdb:propNumber="2534" xdb:global="false" xdb:memType="1"/>
          <attribute ref="xdb:srclang" xdb:propNumber="2535" xdb:global="false" xdb:memType="252"/>
        </extension>
      </simpleContent>
    </complexType>
  </element>
  <element name="description" xdb:propNumber="2539" xdb:global="true" xdb:memType="258" xdb:defaultTable="description94_TAB" xdb:defaultTableSchema="XDB">
    <complexType>
      <annotation>
        <appinfo><xdb:kidList xmlns:xdb="http://xmlns.oracle.com/xdb" sequential="true">
            <xdb:kid propNum="2537" kidNum="0"/>
            <xdb:kid propNum="2538" kidNum="1"/>
          </xdb:kidList></appinfo>
      </annotation>
      <simpleContent>
        <extension base="string">
          <attribute ref="xml:lang" xdb:propNumber="2537" xdb:global="false" xdb:memType="1"/>
          <attribute ref="xdb:srclang" xdb:propNumber="2538" xdb:global="false" xdb:memType="252"/>
        </extension>
      </simpleContent>
    </complexType>
  </element>
</schema>
