[Volute] r4023 - trunk/projects/dm/vo-dml/xsd/ext

Volute commit messages volutecommits at g-vo.org
Sun May 7 15:43:22 CEST 2017


Author: gerard.lemson
Date: Sun May  7 15:43:22 2017
New Revision: 4023

Log:
updates to schema based on discussions and observation in email tracks in the weeks before 20170507

Modified:
   trunk/projects/dm/vo-dml/xsd/ext/VODML-mapping.xsd

Modified: trunk/projects/dm/vo-dml/xsd/ext/VODML-mapping.xsd
==============================================================================
--- trunk/projects/dm/vo-dml/xsd/ext/VODML-mapping.xsd	Sun May  7 15:41:24 2017	(r4022)
+++ trunk/projects/dm/vo-dml/xsd/ext/VODML-mapping.xsd	Sun May  7 15:43:22 2017	(r4023)
@@ -31,7 +31,11 @@
 		<xs:sequence>
 			<xs:element name="INSTANCE" type="VODMLObject" minOccurs="1" maxOccurs="unbounded" />
 		</xs:sequence>
-    <xs:attribute name="ID" type="xs:ID" use="optional"/>
+    <xs:attribute name="ID" type="xs:ID" use="optional">
+    <!-- TODO document purpose of this attribute? Can be used by targetid in  ORM reference to refer to
+    the collection of objects containing the actually referenced one. Analagously to using the targetid to
+    refer to a template object that also represents a collection of objects. -->
+    </xs:attribute>
 	</xs:complexType>
 
 	<xs:complexType name="VODMLInstanceTemplates">
@@ -55,7 +59,7 @@
             <xs:pattern value="[a-zA-Z][a-zA-Z0-9_\-]*">
               <xs:annotation>
                 <xs:documentation>
-                  The name fof the model that is to be used as prefix when referring to its elements in a VODMLRef.
+                  The name of the model that is to be used as prefix when referring to its elements in a VODMLRef.
                 </xs:documentation>
               </xs:annotation>
             </xs:pattern>
@@ -71,18 +75,10 @@
       </xs:annotation>
       </xs:element>
 		</xs:sequence>
-		<xs:attribute name="ID" type="xs:ID" />
 	</xs:complexType>
 
 	<xs:complexType name="VODMLInstance" abstract="true">
 	  <xs:attribute name="dmtype" type="VODMLRef" use="required" />
-		<xs:attribute name="ID" type="xs:ID">
-			<xs:annotation>
-				<xs:documentation>
-					Can be used by references as identifier for an object or template.
-				</xs:documentation>
-			</xs:annotation>
-		</xs:attribute>
 	</xs:complexType>
 
 	<xs:complexType name="VODMLObject">
@@ -110,6 +106,13 @@
 					<xs:element name="COMPOSITION" type="VODMLComposition" minOccurs="0" maxOccurs="unbounded" />
 					<xs:element name="REFERENCE" type="VODMLReference" minOccurs="0" maxOccurs="unbounded" />
 				</xs:sequence>
+        <xs:attribute name="ID" type="xs:ID">
+          <xs:annotation>
+            <xs:documentation>
+              Can be used by references as identifier for an object or template.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
 			</xs:extension>
 		</xs:complexContent>
 	</xs:complexType>
@@ -185,7 +188,7 @@
       <xs:attribute name="dmrole" type="VODMLRef" use="optional">
         <xs:annotation>
           <xs:documentation>
-          NB: ROLE has minOccurs=0 , at the moment only because VODMLObject::CONTAINER (a VODMLReferece) needs no role.
+          NB: dmrole is optional (at the moment) *only* because VODMLObject::CONTAINER (a VODMLReferece) needs no role.
           ATTRIBUTE, COMPOSITION and REFERENCE MUST have a ROLE.
           Hard to model in XML schema, could be done in Schematron.
           </xs:documentation>
@@ -196,40 +199,45 @@
   <xs:complexType name="VODMLAttribute">
     <xs:complexContent>
       <xs:extension base="VODMLRole">
-          <xs:choice>
-            <xs:choice maxOccurs="unbounded">
-              <xs:element name="COLUMN" type="VODMLFieldOrParamRef">
-                <xs:annotation>
-                  <xs:documentation>
-                    When used inside a "template" structured type, i.e. one defined inside a TABLE element,
-                    this allows one to indicate a FIELD representing the attribute.
-                  </xs:documentation>
-                </xs:annotation>
-              </xs:element>
-              <xs:element name="CONSTANT" type="VODMLFieldOrParamRef">
-                <xs:annotation>
-                  <xs:documentation>
-                    Ref to a predefined PARAM.
-                  </xs:documentation>
-                </xs:annotation>
-              </xs:element>
-              <xs:element name="LITERAL" type="VODMLLiteral">
-                <xs:annotation>
-                  <xs:documentation>
-                    Simple, primitive value, possibly with extra attributes.
-                    Similar to PARAM, but restricted attribute set.
-                  </xs:documentation>
-                </xs:annotation>
-              </xs:element>
-            </xs:choice>
-            <xs:element name="INSTANCE" type="VODMLObject" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>
+          a VODMLAttribute MUST have a dmrole attribute
+          </xs:documentation>
+        </xs:annotation>
+        <xs:choice>
+          <xs:choice maxOccurs="unbounded">
+            <xs:element name="COLUMN" type="VODMLFieldOrParamRef">
               <xs:annotation>
                 <xs:documentation>
-                  Structured value, must be instance of DataType
+                  When used inside a "template" structured type, i.e. one defined inside a TABLE element,
+                  this allows one to indicate a FIELD representing the attribute.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:element>
+            <xs:element name="CONSTANT" type="VODMLFieldOrParamRef">
+              <xs:annotation>
+                <xs:documentation>
+                  Ref to a predefined PARAM.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:element>
+            <xs:element name="LITERAL" type="VODMLLiteral">
+              <xs:annotation>
+                <xs:documentation>
+                  Simple, primitive value, possibly with extra attributes.
+                  Similar to PARAM, but restricted attribute set.
                 </xs:documentation>
               </xs:annotation>
             </xs:element>
           </xs:choice>
+          <xs:element name="INSTANCE" type="VODMLObject" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>
+                Structured value, must be instance of DataType
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:choice>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
@@ -244,6 +252,11 @@
 	  </xs:annotation>
 		<xs:complexContent>
 			<xs:extension base="VODMLRole">
+        <xs:annotation>
+          <xs:documentation>
+          a VODMLComposition MUST have a dmrole attribute, even though it is optional on VODMLRole
+          </xs:documentation>
+        </xs:annotation>
 				<xs:sequence>
 					<xs:element name="INSTANCE" type="VODMLObject" maxOccurs="unbounded" minOccurs="0">
 					  <xs:annotation>
@@ -256,7 +269,11 @@
           <xs:element name="EXTINSTANCES" type="xs:IDREF" maxOccurs="unbounded" minOccurs="0">
             <xs:annotation>
               <xs:documentation>
-             Reference to a VODMLOBJECT declaration possibly containing child objects for this composition relation. 
+             Reference to an annotation of a a collection of objects that mnay contain child objects for this composition.
+             This may be a GLOBALS or (a VODMLObject in )a TEMPLATES. 
+             These object in general SHOULD have a CONTAINER pointer to the parent object.
+             If they don't, then all objects in the collection are assumed to be children of the current parent object.
+             NB we should add a consistency constraint on this.
               </xs:documentation>
             </xs:annotation>
           </xs:element>
@@ -272,7 +289,7 @@
 		<xs:annotation>
 			<xs:documentation>
 				Provides a reference to an ObjectType instance. Must allow that instance to be identified exactly.
-				VArious different modes depending on how that instance is serialized.
+				Various different modes depending on how that instance is serialized.
 				- If as a Standalone instance in same VOTable document, an IDREF can point to its ID (use IDREF).
 				- If as a row in a TABLE a relational foreign key can be used (use ORMREFERENCE)
 				- if a remote document contains the serialized instance, a URI must be used that MUST be able to identify that object
@@ -281,6 +298,12 @@
 		</xs:annotation>
 		<xs:complexContent>
 			<xs:extension base="VODMLRole">
+        <xs:annotation>
+          <xs:documentation>
+          a VODMLReference MUST have a dmrole attribute UNLESS it is used in a VODMLObject::CONTAINER, 
+          even though it is optional on VODMLRole.
+          </xs:documentation>
+        </xs:annotation>
 				<xs:sequence>
 					<xs:choice maxOccurs="unbounded">
 						<xs:element name="IDREF" type="xs:IDREF">


More information about the Volutecommits mailing list