From 531f7ebba96a9d9ebca58c3e6117a6baa33df6e0 Mon Sep 17 00:00:00 2001
From: Cyril Vazquez <cyril.vazquez@maarch.org>
Date: Fri, 29 Jun 2012 08:55:56 +0000
Subject: [PATCH]

---
 core/trunk/core/xml/datatypes.xsd | 91 +++++++++++++++++++++++--------
 1 file changed, 67 insertions(+), 24 deletions(-)

diff --git a/core/trunk/core/xml/datatypes.xsd b/core/trunk/core/xml/datatypes.xsd
index 378fe1d760d..d6d7ebbae62 100644
--- a/core/trunk/core/xml/datatypes.xsd
+++ b/core/trunk/core/xml/datatypes.xsd
@@ -4,81 +4,124 @@
   xmlns:das="maarch:DataAccessService" 
   elementFormDefault="qualified"  
   >
-  
-  <!-- Character varying(10) --> 
-  <xsd:simpleType name="bigint">
-    <xsd:restriction base="xsd:unsignedLong">
-        <xsd:minInclusive value="0"/>
-    </xsd:restriction>
-  </xsd:simpleType> 
-  
+
   <!-- Character varying(10) --> 
-  <xsd:simpleType name="varchar10">
+  <xsd:simpleType name="varchar10" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>character varying(10)</das:sqltype>
+      </xsd:appinfo>
+    </xsd:annotation>
     <xsd:restriction base="xsd:string">
       <xsd:maxLength value="10"/>
     </xsd:restriction>
   </xsd:simpleType> 
-  
+ 
   <!-- Character varying(32) --> 
-  <xsd:simpleType name="varchar32">
+  <xsd:simpleType name="varchar32" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>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">
+  <xsd:simpleType name="varchar50" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>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">
+  <xsd:simpleType name="varchar64" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>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">
+  <xsd:simpleType name="varchar100" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>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">
+  <xsd:simpleType name="varchar128" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>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">
+  <xsd:simpleType name="varchar255" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>character varying(255)</das:sqltype>
+      </xsd:appinfo>
+    </xsd:annotation>
     <xsd:restriction base="xsd:string">
       <xsd:maxLength value="255"/>
     </xsd:restriction>
   </xsd:simpleType> 
   
   <!-- Boolean -->
-  <xsd:simpleType name="boolean">
+  <xsd:simpleType name="boolean" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>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> 
   
-  <!-- microsecond --> 
-  <!--<xsd:simpleType name="microsecond">
-    <xsd:restriction base="xsd:string">
-      <xsd:pattern value="[0-9]{1,6}"/>
+    
+  <xsd:simpleType name="bigint" enclosed='false'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>bigint</das:sqltype>
+      </xsd:appinfo>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:unsignedLong">
+        <xsd:minInclusive value="0"/>
     </xsd:restriction>
-  </xsd:simpleType>-->
+  </xsd:simpleType> 
   
   <!-- Datetime --> 
-  <xsd:simpleType name="datetime">
+  <xsd:simpleType name="datetime" enclosed='true'>
+    <xsd:annotation>
+      <xsd:appinfo>
+        <das:sqltype driver='pgsql'>timestamp</das:sqltype>
+      </xsd:appinfo>
+    </xsd:annotation>
     <xsd:union memberTypes="xsd:date xsd:time xsd:string" das:baseType="xsd:string"/>
   </xsd:simpleType>
 
-</xsd:schema>
+</xsd:schema>
\ No newline at end of file
-- 
GitLab