[Formed-commits] r304 - in trunk: . formed/formed/plugins/export

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jan 21 16:57:15 CET 2009


Author: torsten
Date: 2009-01-21 16:57:15 +0100 (Wed, 21 Jan 2009)
New Revision: 304

Modified:
   trunk/ChangeLog
   trunk/formed/formed/plugins/export/xsd.py
Log:
Changed XSD-Schema generation


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-01-20 15:42:35 UTC (rev 303)
+++ trunk/ChangeLog	2009-01-21 15:57:15 UTC (rev 304)
@@ -1,3 +1,22 @@
+2009-01-21	Torsten Irländer <torsten.irlaender at intevation.de>
+
+	Changed way how XSD-Scheme is generated	
+
+	* formed/formed/plugins/export/xsd.py: Enhanced xsd schema to support
+	  logbookentrys. The scheme definiton is now hardcoded in the
+	  exporter as it will rarely change. It logbookpart will not be
+	  generated from the formedtree anymore. 
+
+2009-01-20	Torsten Irländer <torsten.irlaender at intevation.de>
+
+	Support Logbook entrys in xsd schema export
+
+	* formed/formed/model/data.py: Repeatnode are now handeld as
+	  repeatgroups in xsd-export
+	* formed/formed/plugins/export/xsd.py: Enhanced xsd schema to support
+	  logbookentrys. The scheme will now validate against an xmlfile from
+	  the offlineclient.
+
 2009-01-09	Torsten Irländer <torsten.irlaender at intevation.de>
 
 	Added new repeat node

Modified: trunk/formed/formed/plugins/export/xsd.py
===================================================================
--- trunk/formed/formed/plugins/export/xsd.py	2009-01-20 15:42:35 UTC (rev 303)
+++ trunk/formed/formed/plugins/export/xsd.py	2009-01-21 15:57:15 UTC (rev 304)
@@ -44,6 +44,26 @@
   </xs:complexType>
 </xs:element>
 
+<xs:simpleType name="tagebuch-datum_type">
+  <xs:restriction base="xs:dateTime">
+    <xs:pattern value="[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{2}:[0-9]{2}:[0-9]{2}"/>
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:element name="tagebuch-eintrag">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element minOccurs="0" maxOccurs="1" name="uuid_id" type="uuid_type"/>
+      <xs:element minOccurs="0" maxOccurs="1" name="tagebuch-datum" type="tagebuch-datum_type"/>
+      <xs:element minOccurs="0" maxOccurs="1" name="tagebuch-bearbeiter" type="xs:string"/>
+      <xs:element minOccurs="0" maxOccurs="1" name="tagebuch-art" type="xs:integer"/>
+      <xs:element minOccurs="0" maxOccurs="1" name="tagebuch-sonstiges" type="xs:string"/>
+      <xs:element minOccurs="0" maxOccurs="1" name="tagebuch-notiz" type="xs:string"/>
+      <xs:element minOccurs="0" maxOccurs="1" name="tagebuch-dauer" type="unknown_integer"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:element>
+
 <xs:element name="tagebuch">
   <xs:complexType>
     <xs:sequence>
@@ -59,15 +79,15 @@
 </xs:simpleType>
 
 <xs:simpleType name="simple_date_type">
-  <xs:restriction base="xs:string">
-    <xs:pattern value="[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}|[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{2}:[0-9]{2}:[0-9]{2}"/>
+  <xs:restriction base="xs:date">
+    <xs:pattern value="[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}"/>
   </xs:restriction>
 </xs:simpleType>
 
 <xs:simpleType name="unknown_integer">
   <xs:restriction base="xs:integer">
     <xs:minInclusive value="-999999"/>
-    <xs:maxInclusive value="-999999"/>
+    <xs:maxInclusive value="999999"/>
   </xs:restriction>
 </xs:simpleType>
 



More information about the Formed-commits mailing list