[Formed-commits] r345 - in trunk/formed: formed/plugins/export po

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 24 16:50:08 CET 2010


Author: roland
Date: 2010-03-24 16:50:08 +0100 (Wed, 24 Mar 2010)
New Revision: 345

Modified:
   trunk/formed/formed/plugins/export/xsd.py
   trunk/formed/po/de_DE.po
Log:
Generaded XML validates with new XSD

Modified: trunk/formed/formed/plugins/export/xsd.py
===================================================================
--- trunk/formed/formed/plugins/export/xsd.py	2010-03-11 15:16:58 UTC (rev 344)
+++ trunk/formed/formed/plugins/export/xsd.py	2010-03-24 15:50:08 UTC (rev 345)
@@ -29,6 +29,217 @@
 <!-- XML schema generated by FormEd 
      %s -->
 
+<xs:element name="document">
+    <xs:complexType>
+        <xs:sequence>
+            <xs:element ref="case"    minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="logbook" minOccurs="0" maxOccurs="1"/>
+        </xs:sequence>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="choice">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="bool"  minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="group" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="external-choice" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:choice>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="invisible"   type="xs:string"/>
+        <xs:attribute name="size"        type="xs:integer"/>
+        <xs:attribute name="target"      type="xs:string"/>
+        <xs:attribute name="flags"       type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="containers"  type="xs:string"/>
+        <xs:attribute name="function"    type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="bool">
+</xs:element>
+
+<xs:element name="text">
+</xs:element>
+
+<xs:element name="page">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="group"    minOccurs="0"/>
+            <xs:element ref="text"     minOccurs="0"/>
+            <xs:element ref="date"     minOccurs="0"/>
+            <xs:element ref="rule"     minOccurs="0"/>
+            <xs:element ref="repeat"   minOccurs="0"/>
+            <xs:element ref="textarea" minOccurs="0"/>
+            <xs:element ref="choice"   minOccurs="0"/>
+            <xs:element ref="int"      minOccurs="0"/>
+            <xs:element ref="conditional"  minOccurs="0"/>
+            <xs:element ref="radio-matrix" minOccurs="0"/>
+        </xs:choice>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="containers"  type="xs:string"/>
+        <xs:attribute name="invisible"   type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="target"      type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="group">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="repeat"      minOccurs="0"/>
+            <xs:element ref="choice"      minOccurs="0"/>
+            <xs:element ref="page"        minOccurs="0"/>
+            <xs:element ref="text"        minOccurs="0"/>
+            <xs:element ref="rule"        minOccurs="0"/>
+            <xs:element ref="date"        minOccurs="0"/>
+            <xs:element ref="bool"        minOccurs="0"/>
+            <xs:element ref="conditional" minOccurs="0"/>
+            <xs:element ref="textarea"    minOccurs="0"/>
+            <xs:element ref="group"       minOccurs="0"/>
+            <xs:element ref="radio"       minOccurs="0"/>
+            <xs:element ref="int"         minOccurs="0"/>
+            <xs:element ref="info"        minOccurs="0"/>
+            <xs:element ref="radio-matrix" minOccurs="0"/>
+        </xs:choice>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="invisible"   type="xs:string"/>
+        <xs:attribute name="containers"  type="xs:string"/>
+        <xs:attribute name="target"      type="xs:string"/>
+        <xs:attribute name="flags"       type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="logbook" type="xs:string"/>
+
+<xs:element name="rule">
+    <xs:complexType>
+        <xs:attribute name="expr"        type="xs:string"/>
+        <xs:attribute name="mark"        type="xs:string"/>
+        <xs:attribute name="value"       type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="flags"       type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="int">
+    <xs:complexType>
+        <xs:attribute name="target"      type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="minvalue"    type="xs:string"/>
+        <xs:attribute name="maxvalue"    type="xs:string"/>
+        <xs:attribute name="flags"       type="xs:string"/>
+        <xs:attribute name="alternative" type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="info">
+    <xs:complexType>
+        <xs:attribute name="name"     type="xs:string"/>
+        <xs:attribute name="target"   type="xs:string"/>
+        <xs:attribute name="value"    type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="external-choice">
+    <xs:complexType>
+        <xs:attribute name="target"      type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="value"       type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="textarea">
+    <xs:complexType>
+        <xs:attribute name="function"    type="xs:string"/>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="rows"        type="xs:string"/>
+        <xs:attribute name="target"      type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="radio-matrix">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="radio" minOccurs="0"/>
+            <xs:element ref="rule"  minOccurs="0"/>
+        </xs:choice>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="target"      type="xs:string"/>
+        <xs:attribute name="flags"       type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+
+<xs:element name="conditional">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="conditional" minOccurs="0"/>
+            <xs:element ref="group"       minOccurs="0"/>
+            <xs:element ref="choice"      minOccurs="0"/>
+            <xs:element ref="textarea"    minOccurs="0"/>
+            <xs:element ref="text"        minOccurs="0"/>
+            <xs:element ref="date"        minOccurs="0"/>
+            <xs:element ref="rule"        minOccurs="0"/>
+        </xs:choice>
+        <xs:attribute name="expr"      type="xs:string"/>
+        <xs:attribute name="invisible" type="xs:string"/>
+        <xs:attribute name="name"      type="xs:string"/>
+        <xs:attribute name="target"    type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="radio">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="bool" minOccurs="0"/>
+            <xs:element ref="group"       minOccurs="0"/>
+        </xs:choice>
+        <xs:attribute name="description"  type="xs:string"/>
+        <xs:attribute name="formularname" type="xs:string"/>
+        <xs:attribute name="name"         type="xs:string"/>
+        <xs:attribute name="size"         type="xs:string"/>
+        <xs:attribute name="target"       type="xs:string"/>
+        <xs:attribute name="flags"        type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+<xs:element name="repeat">
+    <xs:complexType>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element ref="text"     minOccurs="0"/>
+            <xs:element ref="group"    minOccurs="0"/>
+            <xs:element ref="textarea" minOccurs="0"/>
+            <xs:element ref="int"      minOccurs="0"/>
+            <xs:element ref="choice"   minOccurs="0"/>
+            <xs:element ref="page"     minOccurs="0"/>
+        </xs:choice>
+        <xs:attribute name="containers"  type="xs:string"/>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="min"         type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="target"      type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
+
+<xs:element name="date">
+    <xs:complexType>
+        <xs:attribute name="description" type="xs:string"/>
+        <xs:attribute name="flags"       type="xs:string"/>
+        <xs:attribute name="function"    type="xs:string"/>
+        <xs:attribute name="name"        type="xs:string"/>
+        <xs:attribute name="order"       type="xs:string"/>
+        <xs:attribute name="target"      type="xs:string"/>
+    </xs:complexType>
+</xs:element>
+
 <xs:simpleType name="version_type">
   <xs:restriction base="xs:string">
     <xs:pattern value="[0-2]{1}"/>
@@ -95,11 +306,13 @@
 
 <xs:element name="case">
   <xs:complexType>
-    <xs:sequence>
-        <xs:element ref="master" minOccurs="0" maxOccurs="1"/>
-        <xs:element ref="repeat_group_type" minOccurs="0" maxOccurs="unbounded"/>
-        <xs:element ref="tagebuch" minOccurs="0" maxOccurs="1"/>
-    </xs:sequence>
+    <xs:choice maxOccurs="unbounded">
+        <xs:element ref="master"            minOccurs="0"/>
+        <xs:element ref="group"             minOccurs="0"/>
+        <xs:element ref="repeat_group_type" minOccurs="0"/>
+        <xs:element ref="tagebuch"          minOccurs="0"/>
+        <xs:element ref="page"              minOccurs="0"/>
+    </xs:choice>
   </xs:complexType>
 </xs:element>
 
@@ -522,7 +735,7 @@
     def doExport(self, path, main, creator):
         out = None
         try:
-            out = codecs.open(path, "wb", "UTF-8")    
+            out = codecs.open(path, "wb", "UTF-8")
             out.write(XSD_HEADER % strftime("%a, %Y-%m-%d %H:%M:%S +0000", gmtime()))
             case = creator.getCase()
             case.dumpTables(out)

Modified: trunk/formed/po/de_DE.po
===================================================================
--- trunk/formed/po/de_DE.po	2010-03-11 15:16:58 UTC (rev 344)
+++ trunk/formed/po/de_DE.po	2010-03-24 15:50:08 UTC (rev 345)
@@ -152,8 +152,7 @@
 msgid "Error occured while loading document"
 msgstr "Beim Laden des Dokumentes ist ein Fehler aufgetreten."
 
-#: ../formed/main.py:441
-#: ../formed/main.py:508
+#: ../formed/main.py:441 ../formed/main.py:508
 msgid "Error occured while saving document"
 msgstr "Beim Speichern des Dokumentes ist ein Fehler aufgetreten."
 
@@ -187,29 +186,26 @@
 
 #: ../formed/plugins/names/filter.py:51
 msgid "Rename items by there formname or description"
-msgstr "Komponenten nach ihrem Formularnamen oder ihrer Beschreibung umbenennen."
+msgstr ""
+"Komponenten nach ihrem Formularnamen oder ihrer Beschreibung umbenennen."
 
 #: ../formed/plugins/export/html.py:173
 msgid "Export As &HTML Table..."
 msgstr "Export als &HTML-Tabelle"
 
-#: ../formed/plugins/export/html.py:176
-#: ../formed/plugins/export/html2.py:141
+#: ../formed/plugins/export/html.py:176 ../formed/plugins/export/html2.py:141
 msgid "Exports document as a table in HTML"
 msgstr "Dokument als HTML-Tabelle exportieren"
 
-#: ../formed/plugins/export/html.py:179
-#: ../formed/plugins/export/html2.py:144
+#: ../formed/plugins/export/html.py:179 ../formed/plugins/export/html2.py:144
 msgid "HTML files (*.html)|*.html;*.htm"
 msgstr "HTML-Dateien (*.html)|*.html;*.htm"
 
-#: ../formed/plugins/export/html.py:182
-#: ../formed/plugins/export/html2.py:147
+#: ../formed/plugins/export/html.py:182 ../formed/plugins/export/html2.py:147
 msgid "Export as HTML table document"
 msgstr "Dokument als HTML-Tabelle exportieren"
 
-#: ../formed/plugins/export/html.py:185
-#: ../formed/plugins/export/html2.py:150
+#: ../formed/plugins/export/html.py:185 ../formed/plugins/export/html2.py:150
 msgid "Error occured while exporting HTML"
 msgstr "Beim Speichern als HTML ist ein Fehler aufgetreten."
 
@@ -221,8 +217,7 @@
 msgid "Exports document as SQL statements"
 msgstr "Dokument als SQL-Statements exportieren"
 
-#: ../formed/plugins/export/sql.py:553
-#: ../formed/plugins/export/old_sql.py:27
+#: ../formed/plugins/export/sql.py:553 ../formed/plugins/export/old_sql.py:27
 msgid "SQL files (*.sql)|*.sql"
 msgstr "SQL-Dateien (*.sql)|*.sql"
 
@@ -262,8 +257,7 @@
 msgid "Import data"
 msgstr "Daten importieren"
 
-#: ../formed/plugins/export/data.py:23
-#: ../formed/plugins/export/data.py:49
+#: ../formed/plugins/export/data.py:23 ../formed/plugins/export/data.py:49
 #: ../formed/plugins/export/mode.py:25
 msgid "XML files (*.xml)|*.xml"
 msgstr "XML-Dateien (*.xml)|*.xml"
@@ -411,4 +405,3 @@
 #: ../formed/plugins/ui/controls.py:26
 msgid "All files (*.*)|*.*"
 msgstr "Alle Dateien (*.*)|*.*"
-



More information about the Formed-commits mailing list