diff --git a/core/trunk/core/schema/Docserver.xsd b/core/trunk/core/schema/Docserver.xsd index b7e245ab42b5b998e410265fd920401867d864b0..b0cb4e87f44603ccd955f254a2ea57ef24d78229 100644 --- a/core/trunk/core/schema/Docserver.xsd +++ b/core/trunk/core/schema/Docserver.xsd @@ -4,7 +4,7 @@ xmlns:das="maarch:DataAccessService" elementFormDefault="qualified"> - <xsd:include schemaLocation='core/xml/datatypes.xsd' /> + <xsd:include schemaLocation='core/schema/datatypes.xsd' /> <xsd:include schemaLocation='apps/maarch_entreprise/xml/datasources.xsd' /> <xsd:element name='Docserver' type='Docserver' diff --git a/core/trunk/core/schema/datatypes.xsd b/core/trunk/core/schema/datatypes.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5d1aa696aa62c500a5017a13568e230daddd5e57 --- /dev/null +++ b/core/trunk/core/schema/datatypes.xsd @@ -0,0 +1,200 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<xsd:schema + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:das="maarch:DataAccessService" + elementFormDefault="qualified" + > +<!-- ==================================================================== --> +<!-- ==== ==== --> +<!-- ==== DATA TYPES ==== --> +<!-- ==== ==== --> +<!-- ==================================================================== --> + + <!-- ==================================================================== --> + <!-- ==== CHARACTER DATA TYPES ==== --> + <!-- ==================================================================== --> + <!-- Character varying(10) --> + <xsd:simpleType name="varchar10" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(10)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="10"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(20) --> + <xsd:simpleType name="varchar20" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(20)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="20"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(32) --> + <xsd:simpleType name="varchar32" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(32)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="32"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(50) --> + <xsd:simpleType name="varchar50" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(50)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="50"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(64) --> + <xsd:simpleType name="varchar64" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(64)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="64"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(100) --> + <xsd:simpleType name="varchar100" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(100)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="100"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(128) --> + <xsd:simpleType name="varchar128" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(128)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="128"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character varying(255) --> + <xsd:simpleType name="varchar255" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(255)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="255"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Character text --> + <xsd:simpleType name="text" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>text</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:minLength value="0"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- Boolean --> + <xsd:simpleType name="boolean" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(1)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Y"/> + <xsd:enumeration value="N"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- ==================================================================== --> + <!-- ==== NUMERIC DATA TYPES ==== --> + <!-- ==================================================================== --> + <xsd:simpleType name="bigint" das:enclosed='false'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>bigint</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:minInclusive value="0"/> + <xsd:maxInclusive value="9223372036854775807"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="integer" das:enclosed='false'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>integer</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:minInclusive value="0"/> + <xsd:maxInclusive value="2147483648"/> + </xsd:restriction> + </xsd:simpleType> + + <!-- ==================================================================== --> + <!-- ==== DATE AND TIME DATA TYPES ==== --> + <!-- ==================================================================== --> + <!-- Datetime --> + <xsd:simpleType name="datetime" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>timestamp</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:union memberTypes="xsd:date xsd:time xsd:string" das:baseType="xsd:string"/> + </xsd:simpleType> + + <!-- Datetime --> + <xsd:simpleType name="date" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>date</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:union memberTypes="xsd:date" das:baseType="xsd:string"/> + </xsd:simpleType> + + <xsd:simpleType name="fingerprint" das:enclosed='true'> + <xsd:annotation> + <xsd:appinfo> + <das:sqltype driver='postgresql'>character varying(64)</das:sqltype> + </xsd:appinfo> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="64"/> + <xsd:minLength value="1"/> + </xsd:restriction> + </xsd:simpleType> +</xsd:schema>