How to get translation from tableDDL statment to Schema exemples!??

Please, could you send me xmlSchema exemples on how to correctly
represent a database.table.structure with primaryKeys, checkConstraints
and foreignKeys and everything included?

The latest version of the OracleXDK was supposed to do it, but it stops
at the DTD.
I have to deploy a B2B secured preAuthorized openedChannel on our
database Portal, and I had thougth my procedure properly generated it,
but after parsing it with MS's MSXML2.XMLSchemaCache, I realize I'm a
bit off...

Here's an exemple of a table statment I tried to translate...:

CREATE TABLE VWT_CIE ( 
  NO_CIE          VARCHAR2 (12)  NOT NULL, 
  NOM             VARCHAR2 (75)  NOT NULL, 
  TYPE_SITE       VARCHAR2 (1)  NOT NULL, 
  TYPE_SITE2      VARCHAR2 (1)  DEFAULT 'N' NOT NULL, 
  OPTI_BUSI       VARCHAR2 (1)  DEFAULT 'N' NOT NULL, 
  PRES_LANG       NUMBER (1)    DEFAULT 1 NOT NULL, 
  MODE_PRES       NUMBER (2)    DEFAULT 10 NOT NULL, 
  AFFI_INVE       VARCHAR2 (1)  DEFAULT 'N' NOT NULL, 
  CLIE_EXTE       VARCHAR2 (1)  DEFAULT 'N' NOT NULL, 
  PANI_VIDE       VARCHAR2 (1)  DEFAULT 'N' NOT NULL, 
  NO_TRAI         NUMBER (25), 
  ETAT_ENRE       VARCHAR2 (1), 
  NBRE_CATE_LARG  NUMBER (1)    DEFAULT 3, 
  ADRE            VARCHAR2 (50), 
  VILLE           VARCHAR2 (35), 
  PROV_ETAT       VARCHAR2 (30), 
  PAYS            VARCHAR2 (30), 
  CODE_POST       VARCHAR2 (12), 
  TEL             VARCHAR2 (14), 
  FAX             VARCHAR2 (14), 
  HTTP            VARCHAR2 (100), 
  EMAIL           VARCHAR2 (50), 
  TEMP_BRAN       VARCHAR2 (15), 
  TEMP_BOUT       VARCHAR2 (12), 

   CONSTRAINT CK_CIE_AFFIINVE
          CHECK (AFFI_INVE IN ('O','N')) , 
   CONSTRAINT CK_CIE_PANIVIDE
          CHECK (pani_vide in ('O','N')) , 
   CONSTRAINT CK_CIE_TYPESITE2
          CHECK (NVL(TYPE_SITE2,'S') IN ('L','P','O','C','N')) , 
   CONSTRAINT CK_CIE_CLIEEXTE
          CHECK (NVL(CLIE_EXTE,'S') IN ('O','N')) , 
   CONSTRAINT CK_CIE_NBRECATELARG
          CHECK (nvl(nbre_cate_larg,3) between 1 and 5) , 
   CONSTRAINT CK_CIE_TYPESITE
          CHECK (NVL(TYPE_SITE,'S') IN ('L','P','O','C','N')) , 
   CONSTRAINT CK_CIE_MODEPRES
          CHECK (NVL(MODE_PRES,99) BETWEEN 1 AND 18) , 
   CONSTRAINT CK_CIE_OPTIBUSI
          CHECK (NVL(OPTI_BUSI,'S') IN ('O','N')) , 
   CONSTRAINT CK_CIE_PRESLANG
          CHECK (NVL(PRES_LANG,9) IN (1,2,3)), 
  CONSTRAINT PK_CIE_NOCIE
  PRIMARY KEY ( NO_CIE ) 
    USING INDEX 
     TABLESPACE IW43_INDX PCTFREE 10
     STORAGE ( INITIAL 16K NEXT 16K PCTINCREASE 0 ))




<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">

<xsd:complexType name="VWT_CIE">
	<xsd:sequence name="VWT_CIE">
	<xsd:sequence name="PK_CIE_NOCIE">
		<xsd:element name="NO_CIE" use="required">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:length value="12"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:element>

	</xsd:sequence>
	<xsd:element name="NOM" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="75"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="TYPE_SITE" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_TYPESITE"
base="xsd:string">
					<xsd:enumeration value="L"/>
					<xsd:enumeration value="P"/>
					<xsd:enumeration value="O"/>
					<xsd:enumeration value="C"/>
					<xsd:enumeration value="N"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="TYPE_SITE2" use="default" value="N">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_TYPESITE2"
base="xsd:string">
					<xsd:enumeration value="L"/>
					<xsd:enumeration value="P"/>
					<xsd:enumeration value="O"/>
					<xsd:enumeration value="C"/>
					<xsd:enumeration value="N"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="OPTI_BUSI" use="default" value="N">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_OPTIBUSI"
base="xsd:string">
					<xsd:enumeration value="O"/>
					<xsd:enumeration value="N"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="PRES_LANG" use="default" value="1">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:totalDigits value="1"/>
			</xsd:restriction>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="0"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_PRESLANG"
base="xsd:decimal">
					<xsd:enumeration value="1"/>
					<xsd:enumeration value="2"/>
					<xsd:enumeration value="3"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="MODE_PRES" use="default" value="10">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:totalDigits value="2"/>
			</xsd:restriction>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="0"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_MODEPRES"
base="xsd:decimal">
					<xsd:minInclusive value="1"/>
					<xsd:maxInclusive value="18"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="AFFI_INVE" use="default" value="N">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_AFFIINVE"
base="xsd:string">
					<xsd:enumeration value="O"/>
					<xsd:enumeration value="N"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="CLIE_EXTE" use="default" value="N">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_CLIEEXTE"
base="xsd:string">
					<xsd:enumeration value="O"/>
					<xsd:enumeration value="N"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="PANI_VIDE" use="default" value="N">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
				<xsd:restriction name="CK_CIE_PANIVIDE"
base="xsd:string">
					<xsd:enumeration value="O"/>
					<xsd:enumeration value="N"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="NO_TRAI">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:totalDigits value="25"/>
			</xsd:restriction>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="0"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="ETAT_ENRE">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="1"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="NBRE_CATE_LARG" use="default" value="3">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:totalDigits value="1"/>
			</xsd:restriction>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="0"/>
			</xsd:restriction>
				<xsd:restriction
name="CK_CIE_NBRECATELARG" base="xsd:decimal">
					<xsd:minInclusive value="1"/>
					<xsd:maxInclusive value="5"/>
				</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="ADRE">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="50"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="VILLE">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="35"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="PROV_ETAT">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="30"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="PAYS">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="30"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="CODE_POST">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="12"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="TEL">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="14"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="FAX">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="14"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="HTTP">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="100"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="EMAIL">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="50"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="TEMP_BRAN">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="15"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	<xsd:element name="TEMP_BOUT">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:length value="12"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:element>
	</xsd:sequence>
</xsd:complexType>
</xsd:schema >

Can you tell me what's wrong with it????????????

Thank you so much!


Pierre Garon
Versalys
une filiale de Telus
(418)694-3000 poste 309
1-800-RESEAUX
courriel : pierre.garon@versalys.com
notre site web : http://www.versalys.com

Received on Thursday, 26 April 2001 17:29:35 UTC