MINI MINI MANI MO
<?xml version="1.0"?>
<!--
Copyright (c) 2005, 2007, Oracle. All rights reserved.
NAME
kuscnstr.xsd
DESCRIPTION
XML Schema types for constraints in SXML.
MODIFIED MM/DD/YY
lbarton 08/10/07 - parsed conditions
lbarton 12/19/07 - Bug 6655531: customer area
lbarton 11/27/07 - bug 6474004: RELY
lbarton 11/30/06 - more diff support
lbarton 11/20/06 - remove ENABLE VALIDATE
lbarton 11/15/06 - diff support
lbarton 11/09/05 - Bug 4724986: reformat files for use with XMLSpy
lbarton 10/18/05 - lbarton_mddiff2
lbarton 09/06/05 - Initial version
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:ku="http://xmlns.oracle.com/ku" targetNamespace="http://xmlns.oracle.com/ku" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- include files -->
<xsd:include schemaLocation="kuscomm.xsd"/>
<xsd:include schemaLocation="kusindxt.xsd"/>
<!-- types, groups and elements -->
<xsd:group name="TableConstraintsGroup">
<!-- *******************************************************************
Table constraints
[ CHECK_CONSTRAINT_LIST ]
[ PRIMARY_KEY_CONSTRAINT_LIST ]
[ UNIQUE_KEY_CONSTRAINT_LIST ]
[ FOREIGN_KEY_CONSTRAINT_LIST ]
[ SCOPE_CONSTRAINT_LIST ]
[ ROWID_CONSTRAINT_LIST ]
Note: For some reason, dbms_xmlschema.registerSchema insists that
these elements have a declared SQLType. So we oblige.
******************************************************************** -->
<xsd:sequence>
<xsd:element name="CHECK_CONSTRAINT_LIST" type="ku:CHECK_CONSTRAINT_LISTType" minOccurs="0" xdb:SQLType="CLOB"/>
<xsd:element name="PRIMARY_KEY_CONSTRAINT_LIST" type="ku:PRIMARY_KEY_CONSTRAINT_LISTType" minOccurs="0" xdb:SQLType="CLOB"/>
<xsd:element name="UNIQUE_KEY_CONSTRAINT_LIST" type="ku:UNIQUE_KEY_CONSTRAINT_LISTType" minOccurs="0" xdb:SQLType="CLOB"/>
<xsd:element name="FOREIGN_KEY_CONSTRAINT_LIST" type="ku:FOREIGN_KEY_CONSTRAINT_LISTType" minOccurs="0" xdb:SQLType="CLOB"/>
<xsd:element name="SCOPE_CONSTRAINT_LIST" type="ku:SCOPE_CONSTRAINT_LISTType" minOccurs="0" xdb:SQLType="CLOB"/>
<xsd:element name="ROWID_CONSTRAINT_LIST" type="ku:ROWID_CONSTRAINT_LISTType" minOccurs="0" xdb:SQLType="CLOB"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="CHECK_CONSTRAINT_LISTType">
<xsd:sequence>
<xsd:element name="CHECK_CONSTRAINT_LIST_ITEM" type="ku:CHECK_CONSTRAINT_LIST_ITEMType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for CHECK_CONSTRAINT_LIST
list of CHECK_CONSTRAINT_LIST_ITEM
[ NAME ]
( CONDITION | PARSED_CONDITION )
[ Constraint state ]
[ CUSTOMER_AREA ]
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="CHECK_CONSTRAINT_LIST_ITEMType">
<xsd:sequence>
<xsd:element name="NAME" type="ku:char30ElementWithValue1" minOccurs="0"/>
<xsd:choice>
<xsd:element name="CONDITION" type="ku:char4000ElementWithValue1"/>
<xsd:element name="PARSED_CONDITION" type="ku:PrsExpressionType"/>
</xsd:choice>
<xsd:group ref="ku:ConstraintState" minOccurs="0"/>
<xsd:element name="CUSTOMER_AREA" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
</xsd:complexType>
<xsd:group name="ConstraintState">
<!-- *******************************************************************
Constraint state
[ DEFERRABLE INITIALLY_DEFERRED ]
[ RELY ]
[ DISABLE ] [ NOVALIDATE ]
[ USING_INDEX ]
******************************************************************** -->
<xsd:sequence>
<xsd:group ref="ku:ConstraintStateDeferrable" minOccurs="0"/>
<xsd:element name="RELY" type="ku:EmptyType" minOccurs="0"/>
<xsd:group ref="ku:ConstraintStateEnable" minOccurs="0"/>
<xsd:element name="USING_INDEX" type="ku:USING_INDEXType" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="ConstraintStateEnable">
<xsd:sequence>
<xsd:element name="DISABLE" type="ku:EmptyType" minOccurs="0"/>
<xsd:element name="NOVALIDATE" type="ku:EmptyType" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="ConstraintStateDeferrable">
<xsd:sequence>
<xsd:element name="DEFERRABLE" type="ku:EmptyType"/>
<xsd:element name="INITIALLY_DEFERRED" type="ku:EmptyType" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="USING_INDEXType">
<xsd:sequence>
<xsd:choice>
<xsd:group ref="ku:SCHEMA_NAMEGroup"/>
<xsd:element name="INDEX" type="ku:INDEXType"/>
<xsd:group ref="ku:IndexProperties"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for USING_INDEX
choice of
SCHEMA and NAME
INDEX
Index properties
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="PRIMARY_KEY_CONSTRAINT_LISTType">
<xsd:sequence>
<xsd:element name="PRIMARY_KEY_CONSTRAINT_LIST_ITEM" type="ku:PKUK_CONSTRAINT_LIST_ITEMType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for PRIMARY_KEY_CONSTRAINT_LIST
list of PRIMARY_KEY_CONSTRAINT_LIST_ITEM
[ NAME ]
COL_LIST
[ Constraint state ]
[ CUSTOMER_AREA ]
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="PKUK_CONSTRAINT_LIST_ITEMType">
<xsd:sequence>
<xsd:element name="NAME" type="ku:char30ElementWithValue1" minOccurs="0"/>
<xsd:element name="COL_LIST" type="ku:SimpleCOL_LISTType"/>
<xsd:group ref="ku:ConstraintState" minOccurs="0"/>
<xsd:element name="CUSTOMER_AREA" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
</xsd:complexType>
<xsd:complexType name="UNIQUE_KEY_CONSTRAINT_LISTType">
<xsd:sequence>
<xsd:element name="UNIQUE_KEY_CONSTRAINT_LIST_ITEM" type="ku:PKUK_CONSTRAINT_LIST_ITEMType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for UNIQUE_KEY_CONSTRAINT_LIST
list of UNIQUE_KEY_CONSTRAINT_LIST_ITEM
[ NAME ]
COL_LIST
[ Constraint state ]
[ CUSTOMER_AREA ]
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="FOREIGN_KEY_CONSTRAINT_LISTType">
<xsd:sequence>
<xsd:element name="FOREIGN_KEY_CONSTRAINT_LIST_ITEM" type="ku:FOREIGN_KEY_CONSTRAINT_LIST_ITEMType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for FOREIGN_KEY_CONSTRAINT_LIST
list of FOREIGN_KEY_CONSTRAINT_LIST_ITEM
[ NAME ]
COL_LIST
REFERENCES
SCHEMA
NAME
[ COL_LIST ]
[ ON_DELETE ]
Constraint state
[ CUSTOMER_AREA ]
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="FOREIGN_KEY_CONSTRAINT_LIST_ITEMType">
<xsd:sequence>
<xsd:element name="NAME" type="ku:char30ElementWithValue1" minOccurs="0"/>
<xsd:element name="COL_LIST" type="ku:SimpleCOL_LISTType"/>
<xsd:element name="REFERENCES">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="ku:SCHEMA_NAMEGroup"/>
<xsd:element name="COL_LIST" type="ku:SimpleCOL_LISTType" minOccurs="0"/>
<xsd:element name="ON_DELETE" type="ku:ON_DELETETypeWithValue1" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:group ref="ku:ConstraintState" minOccurs="0"/>
<xsd:element name="CUSTOMER_AREA" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
</xsd:complexType>
<xsd:simpleType name="ON_DELETEType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CASCADE"/>
<xsd:enumeration value="SET_NULL"/>
</xsd:restriction>
<!-- *******************************************************************
ON_DELETE - CASCADE, SET_NULL
******************************************************************** -->
</xsd:simpleType>
<xsd:complexType name="ON_DELETETypeWithValue1">
<xsd:simpleContent>
<xsd:extension base="ku:ON_DELETEType">
<xsd:attribute name="value1" type="ku:ON_DELETEType"/>
<xsd:attribute name="src" type="ku:srcType"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- scope constraints -->
<xsd:complexType name="SCOPE_CONSTRAINT_LISTType">
<xsd:sequence>
<xsd:element name="SCOPE_CONSTRAINT_LIST_ITEM" type="ku:SCOPE_CONSTRAINT_LIST_ITEMType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for SCOPE_CONSTRAINT_LIST
list of SCOPE_CONSTRAINT_LIST_ITEM
[ COL ]
REFERENCES
SCHEMA
NAME
[ CUSTOMER_AREA ]
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="SCOPE_CONSTRAINT_LIST_ITEMType">
<xsd:sequence>
<xsd:element name="COL" type="ku:char30ElementWithValue1" minOccurs="0"/>
<xsd:element name="REFERENCES">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="ku:SCHEMA_NAMEGroup"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CUSTOMER_AREA" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
</xsd:complexType>
<!-- rowid constraints -->
<xsd:complexType name="ROWID_CONSTRAINT_LISTType">
<xsd:sequence>
<xsd:element name="ROWID_CONSTRAINT_LIST_ITEM" type="ku:ROWID_CONSTRAINT_LIST_ITEMType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
<!-- *******************************************************************
complexType for ROWID_CONSTRAINT_LIST
list of ROWID_CONSTRAINT_LIST_ITEM
COL
[ ALLOW_PRIMARY_KEY ]
[ CUSTOMER_AREA ]
******************************************************************** -->
</xsd:complexType>
<xsd:complexType name="ROWID_CONSTRAINT_LIST_ITEMType">
<xsd:sequence>
<xsd:element name="COL" type="ku:char30ElementWithValue1"/>
<xsd:element name="ALLOW_PRIMARY_KEY" type="ku:EmptyType" minOccurs="0"/>
<xsd:element name="CUSTOMER_AREA" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="src" type="ku:srcType"/>
</xsd:complexType>
</xsd:schema>
OHA YOOOO