schemas/base.xsd

Christian Mollekopf mollekopf at kolabsys.com
Fri Oct 21 12:07:56 CEST 2011


 schemas/base.xsd |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit b5f21df7075a47024a36755e40b88192555b01d5
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Fri Oct 21 12:07:49 2011 +0200

    unanonymous types

diff --git a/schemas/base.xsd b/schemas/base.xsd
index 05219bd..67f7ee9 100644
--- a/schemas/base.xsd
+++ b/schemas/base.xsd
@@ -6,22 +6,9 @@
 
     <xs:complexType name="XMLBase" abstract="true">
         <xs:sequence>
-            <xs:element name="uid">
-                <xs:simpleType>
-                    <xs:restriction base="xs:string">
-                        <xs:minLength value="1"/>
-                        <xs:whiteSpace value="collapse"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:element>
+            <xs:element name="uid" type="UID"/>
             <xs:element name="body" type="xs:string"/>
-            <xs:element name="categories">
-                <xs:simpleType>
-                    <xs:restriction base="xs:string">
-                        <xs:pattern value="(\w+(,\w+)+)?"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:element>
+            <xs:element name="categories" type="Category"/>
             <xs:element name="creation-date" type="xs:dateTime"/>
             <xs:element name="last-modification-date" type="xs:dateTime"/>
             <xs:element name="sensitivity" type="Sensitivity" default="public"/>
@@ -34,6 +21,19 @@
         <xs:attribute name="version" type="xs:double"/>
     </xs:complexType>
 
+     <xs:simpleType name="UID">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:whiteSpace value="collapse"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="Category">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="(\w+(,\w+)+)?"/>
+        </xs:restriction>
+    </xs:simpleType>
+
     <xs:simpleType name="Color">
         <xs:restriction base="xs:string">
             <xs:length value="7"/>





More information about the commits mailing list