← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 70: Removed IDs and IDREFS. Replaced with dxfIDs and dxfIDREfs which are really only integers undern...

 

------------------------------------------------------------
revno: 70
committer: Bob Jolliffe <bobj@bobj-laptop>
branch nick: dhis2-docbook-docs
timestamp: Mon 2009-12-14 14:36:53 +0000
message:
  Removed IDs and IDREFS.  Replaced with dxfIDs and dxfIDREfs which are really only integers underneath.
modified:
  src/schemas/dxf_v2_schema/dxf2.rng
  src/schemas/dxf_v2_schema/sample_dxf2.xml


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription.
=== modified file 'src/schemas/dxf_v2_schema/dxf2.rng'
--- src/schemas/dxf_v2_schema/dxf2.rng	2009-12-05 15:44:57 +0000
+++ src/schemas/dxf_v2_schema/dxf2.rng	2009-12-14 14:36:53 +0000
@@ -120,10 +120,20 @@
   </define>
 
 
+  <!-- dxf2 ids -->
+  <define name="dxfID" ns="http://dhis2.org/ns/schema/dxf2";>
+    <data type="int"/>
+  </define>
+  
+  <!-- dxf2 idrefs -->
+  <define name="dxfIDRef" ns="http://dhis2.org/ns/schema/dxf2";>
+    <data type="int"/>
+  </define>
+  
   <!-- common base for identifiable objects -->
   <define name="identifiableObject" ns="http://dhis2.org/ns/schema/dxf2";>
     <attribute name="id">
-      <data type="ID"/>
+      <ref name="dxfID"/>
     </attribute>
     <element name="uuid">
       <text/>
@@ -178,7 +188,7 @@
   <define name="categoryCombo">
     <element name="categoryCombo" ns="http://dhis2.org/ns/schema/dxf2";>
       <attribute name="id">
-        <data type="ID"/>
+        <ref name="dxfID"/>
       </attribute>
       <element name="name">
         <text/>
@@ -198,13 +208,13 @@
       <zeroOrMore>
         <element name="categoryOptionCombo">
           <ref name="identifiableObject"/>
-          <attribute name="categoryComboId">
-            <data type="IDREF"/>
+          <attribute name="categoryComboRef">
+            <ref name="dxfIDRef"/>
           </attribute>
           <zeroOrMore>
-            <element name="categoryoptionID">
-              <attribute name="id">
-                <data type="IDREF"></data>
+            <element name="categoryoption">
+              <attribute name="ref">
+                <ref name="dxfIDRef"/>
               </attribute>
             </element>
           </zeroOrMore>
@@ -223,9 +233,9 @@
               <element name="dataElementGroup">
                 <ref name="identifiableObject"/>
                 <zeroOrMore>
-                  <element name="dataElementID">
-                    <attribute name="id">
-                      <data type="ID"/>
+                  <element name="dataElement">
+                    <attribute name="ref">
+                      <ref name="dxfIDRef"/>
                     </attribute>
                   </element>
                 </zeroOrMore>
@@ -248,8 +258,8 @@
                 <ref name="identifiableObject"/>
                 <zeroOrMore>
                   <element name="indicator">
-                    <attribute name="id">
-                      <data type="ID"/>
+                    <attribute name="idref">
+                      <ref name="dxfIDRef"/>
                     </attribute>
                   </element>
                 </zeroOrMore>
@@ -271,8 +281,8 @@
   </define>
   <define name="dataElement">
     <element name="dataElement" ns="http://dhis2.org/ns/schema/dxf2";>
-      <attribute name="categoryCombo">
-        <data type="IDREF"/>
+      <attribute name="categoryComboRef">
+        <ref name="dxfIDRef"/>
       </attribute>
       <ref name="identifiableObject"/>
       <element name="active">
@@ -293,7 +303,7 @@
       <zeroOrMore>
         <element name="indicatorType">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="name">
             <text/>
@@ -315,7 +325,7 @@
             <text/>
           </element>
           <attribute name="indicatorType">
-            <data type="IDREF"/>
+            <ref name="dxfIDRef"/>
           </attribute>
           <element name="numerator">
             <text/>
@@ -338,8 +348,8 @@
           <element name="dataDictionaries">
             <zeroOrMore>
               <element name="datadictionary">
-                <attribute name="id">
-                  <data type="IDREF"/>
+                <attribute name="ref">
+                  <ref name="dxfIDRef"/>
                 </attribute>
               </element>
             </zeroOrMore>
@@ -372,7 +382,7 @@
       <zeroOrMore>
         <element name="dataDictionary">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="name">
             <text/>
@@ -401,7 +411,7 @@
       <zeroOrMore>
         <element name="dataSet">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="name">
             <text/>
@@ -418,8 +428,8 @@
           <element name="dataelements">
             <zeroOrMore>
               <element name="dataelement">
-                <attribute name="id">
-                  <data type="ID"/>
+                <attribute name="ref">
+                  <ref name="dxfIDRef"/>
                 </attribute>
               </element>
             </zeroOrMore>
@@ -436,7 +446,7 @@
       <zeroOrMore>
         <element name="groupSet">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="name">
             <text/>
@@ -466,7 +476,7 @@
       <zeroOrMore>
         <element name="organisationUnitGroup">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="uuid">
             <text/>
@@ -479,7 +489,7 @@
             <zeroOrMore>
               <element name="groupSet">
                 <attribute name="id">
-                  <data type="ID"/>
+                  <ref name="dxfID"/>
                 </attribute>
               </element>
             </zeroOrMore>
@@ -546,7 +556,7 @@
       <zeroOrMore>
         <element name="organisationUnitLevel">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="level">
             <data type="integer"/>
@@ -565,7 +575,7 @@
       <zeroOrMore>
         <element name="period">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="periodType">
             <text/>
@@ -587,7 +597,7 @@
       <zeroOrMore>
         <element name="reportTable">
           <attribute name="id">
-            <data type="ID"/>
+            <ref name="dxfID"/>
           </attribute>
           <element name="name">
             <text/>
@@ -732,7 +742,7 @@
             <zeroOrMore>
               <element name="dataelement">
                 <attribute name="id">
-                  <data type="ID"/>
+                  <ref name="dxfID"/>
                 </attribute>
               </element>
             </zeroOrMore>
@@ -749,10 +759,10 @@
       <!-- TODO: check for proper children -->
       <element name="reportTableDataElement">
         <attribute name="reportTable">
-          <data type="IDREF"/>
+          <ref name="dxfIDRef"/>
         </attribute>
         <attribute name="dataElement">
-          <data type="IDREF"/>
+          <ref name="dxfIDRef"/>
         </attribute>
         <attribute name="sortOrder">
           <data type="integer"/>
@@ -815,7 +825,7 @@
       <!-- TODO: check for proper children -->
       <zeroOrMore>
       <element name="ReportTablePeriod">
-        <attribute name="id"><data type="IDREF"></data></attribute>
+        <attribute name="period"><ref name="dxfIDRef"/></attribute>
         <attribute name="sortOrder"><data type="integer"></data></attribute>
       </element>
       </zeroOrMore>
@@ -847,7 +857,7 @@
       <!-- TODO: check completeDataSetRegistrations -->
       <zeroOrMore>
         <element name="completeDataSetRegistrationPeriod">
-          <attribute name="id"><data type="IDREF"></data></attribute>
+          <attribute name="period"><ref name="dxfIDRef"/></attribute>
           <attribute name="sortOrder"><data type="integer"></data></attribute>
         </element>
       </zeroOrMore>
@@ -859,20 +869,20 @@
       <zeroOrMore>
         <element name="dataValue" ns="http://dhis2.org/ns/schema/dxf2";>
           <attribute name="dataElement">
-            <data type="IDREF"/>
+            <ref name="dxfIDRef"/>
           </attribute>
           <attribute name="period">
-            <data type="IDREF"/>
+            <ref name="dxfIDRef"/>
           </attribute>
           <attribute name="source">
-            <data type="IDREF"/>
+            <ref name="dxfIDRef"/>
           </attribute>
           <attribute name="value">
             <text/>
           </attribute>
           <optional>
             <attribute name="storedBy">
-              <data type="IDREF"/>
+              <text/>
             </attribute>
           </optional>
           <optional>
@@ -886,7 +896,7 @@
             </attribute>
           </optional>
           <attribute name="categoryOptionCombo">
-            <data type="IDREF"/>
+            <ref name="dxfIDRef"/>
           </attribute>
         </element>
       </zeroOrMore>

=== modified file 'src/schemas/dxf_v2_schema/sample_dxf2.xml'
--- src/schemas/dxf_v2_schema/sample_dxf2.xml	2009-12-05 15:49:20 +0000
+++ src/schemas/dxf_v2_schema/sample_dxf2.xml	2009-12-14 14:36:53 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?oxygen RNGSchema="dxf2_1.rng" type="xml"?>
+<?oxygen RNGSchema="dxf2.rng" type="xml"?>
 
 <dxf xmlns="http://dhis2.org/ns/schema/dxf2"; >
 
@@ -9,7 +9,7 @@
             <groupSets/>
             <organisationUnitGroups/>
             <organisationUnits>
-                <organisationUnit id="ou1">
+                <organisationUnit id="1">
                     <uuid/>
                     <name>Bob's District</name>
                     <alternativename>Bob's District</alternativename>
@@ -24,7 +24,7 @@
                     <dataSets/>
                     <organisationGroups/>
                     <children>
-                        <organisationUnit id="ou2">
+                        <organisationUnit id="2">
                             <uuid></uuid>
                             <name>Bob's Clinic</name>
                             <alternativename>Bob's Clinic</alternativename>
@@ -40,7 +40,7 @@
                             <organisationGroups></organisationGroups>
                             <children></children>
                         </organisationUnit>
-                        <organisationUnit id="ou3">
+                        <organisationUnit id="3">
                             <uuid></uuid>
                             <name></name>
                             <alternativename></alternativename>
@@ -55,7 +55,7 @@
                             <dataSets></dataSets>
                             <organisationGroups></organisationGroups>
                             <children>
-                                <organisationUnit id="ou4">
+                                <organisationUnit id="4">
                                     <uuid></uuid>
                                     <name></name>
                                     <alternativename></alternativename>
@@ -82,14 +82,14 @@
         </orgUnitStructure>
         
         <categories>
-            <category id="cat1">
+            <category id="1">
                 <uuid/>
                 <name>Gender</name>
                 <alternativename/>
                 <shortname>Gender</shortname>
                 <code>CL_GENDER</code>
                 <description/>
-                <categoryOption id="catopt1">
+                <categoryOption id="1">
                     <uuid/>
                     <name>Male</name>
                     <alternativename/>
@@ -97,7 +97,7 @@
                     <code>MALE</code>
                     <description/>
                 </categoryOption>
-                <categoryOption id="catopt2">
+                <categoryOption id="2">
                     <uuid/>
                     <name>Female</name>
                     <alternativename/>
@@ -106,14 +106,14 @@
                     <description/>
                 </categoryOption>
             </category>
-            <category id="cat2">
+            <category id="2">
                 <uuid/>
                 <name>Age</name>
                 <alternativename/>
                 <shortname>Age</shortname>
                 <code>CL_AGE</code>
                 <description/>
-                <categoryOption id="catopt3">
+                <categoryOption id="3">
                     <uuid/>
                     <name>Under 5</name>
                     <alternativename/>
@@ -121,7 +121,7 @@
                     <code>UNDER_5</code>
                     <description/>
                 </categoryOption>
-                <categoryOption id="catopt4">
+                <categoryOption id="4">
                     <uuid/>
                     <name>5 to 10</name>
                     <alternativename/>
@@ -135,12 +135,12 @@
         <categoryCombos>
 
             <!--        The default categoryCombo has no categories-->
-            <categoryCombo id="categoryCombo1">
+            <categoryCombo id="1">
                 <name>default</name>
                 <categories/>
             </categoryCombo>
 
-            <categoryCombo id="categoryCombo2">
+            <categoryCombo id="2">
                 <name>Age - Sex combination</name>
                 <categories>
                     <categoryId>1</categoryId>
@@ -152,7 +152,7 @@
         <categoryOptionCombos>
 
             <!--        default has no values-->
-            <categoryOptionCombo id="categoryOptionCombo1" categoryComboId="categoryCombo1" >
+            <categoryOptionCombo id="1" categoryComboRef="1" >
                 <uuid/>
                 <name>default</name>
                 <alternativename/>
@@ -162,50 +162,44 @@
             </categoryOptionCombo>
 
 
-            <categoryOptionCombo id="categoryOptionCombo1" categoryComboId="categoryCombo1">
+            <categoryOptionCombo id="2" categoryComboRef="2">
                 <uuid/>
                 <name>Male under 5</name>
                 <alternativename/>
                 <shortname>Male under 5</shortname>
                 <code/>
                 <description/>
-                <categoryoptionID id="catopt1"/>
-                <categoryoptionID id="catopt3"/>
+                <categoryoption ref="1"/>
+                <categoryoption ref="3"/>
             </categoryOptionCombo>
-            <categoryOptionCombo id="categoryOptionCombo2" categoryComboId="categoryCombo1">
-                <id>3</id>
+            <categoryOptionCombo id="2" categoryComboRef="1">
                 <uuid/>
                 <name>Female under 5</name>
                 <alternativename/>
                 <shortname>Female under 5</shortname>
                 <code/>
                 <description/>
-                <categoryComboId>2</categoryComboId>
-                <categoryOptionId>3</categoryOptionId>
+                <categoryoption ref="3"/>
             </categoryOptionCombo>
-            <categoryOptionCombo>
-                <id>4</id>
+            <categoryOptionCombo id="3" categoryComboRef="1">
                 <uuid/>
                 <name>Male between 5 and 10</name>
                 <alternativename/>
                 <shortname>Male between 5 and 10</shortname>
                 <code/>
                 <description/>
-                <categoryComboId>2</categoryComboId>
-                <categoryOptionId>1</categoryOptionId>
-                <categoryOptionId>4</categoryOptionId>
+                <categoryoption ref="1"/>
+                <categoryoption ref="4"/>
             </categoryOptionCombo>
-            <categoryOptionCombo>
-                <id>5</id>
+            <categoryOptionCombo id="5" categoryComboRef="2">
                 <uuid/>
                 <name>Female between 5 and 10</name>
                 <alternativename/>
                 <shortname>Female between 5 and 10</shortname>
                 <code/>
                 <description/>
-                <categoryComboId>2</categoryComboId>
-                <categoryOptionId>2</categoryOptionId>
-                <categoryOptionId>4</categoryOptionId>
+                <categoryoption ref="2"/>
+                <categoryoption ref="4"/>
             </categoryOptionCombo>
 
         </categoryOptionCombos>
@@ -213,8 +207,7 @@
         <dataElements>
 
             <!--        this one is multidimensional-->
-            <dataElement>
-                <id>1</id>
+            <dataElement id="1" categoryComboRef="2">
                 <uuid/>
                 <name>Malaria diagnosed</name>
                 <alternativename/>
@@ -224,12 +217,10 @@
                 <active>true</active>
                 <type>int</type>
                 <aggregationOperator/>
-                <categoryCombo>2</categoryCombo>
             </dataElement>
 
             <!--        the following 4 are uni-dimensional -->
-            <dataElement>
-                <id>2</id>
+            <dataElement id="2" categoryComboRef="1">
                 <uuid/>
                 <name>Malaria diagnosed Male under 5</name>
                 <alternativename/>
@@ -239,11 +230,9 @@
                 <active>true</active>
                 <type>int</type>
                 <aggregationOperator/>
-                <categoryCombo>1</categoryCombo>
             </dataElement>
 
-            <dataElement>
-                <id>3</id>
+            <dataElement id="3" categoryComboRef="1">
                 <uuid/>
                 <name>Malaria diagnosed Female under 5</name>
                 <alternativename/>
@@ -253,11 +242,9 @@
                 <active>true</active>
                 <type>int</type>
                 <aggregationOperator/>
-                <categoryCombo>1</categoryCombo>
             </dataElement>
 
-            <dataElement>
-                <id>4</id>
+            <dataElement id="4" categoryComboRef="1">
                 <uuid/>
                 <name>Malaria diagnosed Female over 5</name>
                 <alternativename/>
@@ -267,11 +254,9 @@
                 <active>true</active>
                 <type>int</type>
                 <aggregationOperator/>
-                <categoryCombo>1</categoryCombo>
             </dataElement>
 
-            <dataElement>
-                <id>5</id>
+            <dataElement id="5" categoryComboRef="1">
                 <uuid/>
                 <name>Malaria diagnosed Male over 5</name>
                 <alternativename/>
@@ -281,7 +266,6 @@
                 <active>true</active>
                 <type>int</type>
                 <aggregationOperator/>
-                <categoryCombo>1</categoryCombo>
             </dataElement>
 
         </dataElements>
@@ -291,8 +275,7 @@
         <indicators/>
 
         <dataElementGroupSets>
-            <dataElementGroupSet>
-                <id>1</id>
+            <dataElementGroupSet id="1">
                 <uuid/>
                 <name>Age</name>
                 <alternativename/>
@@ -300,32 +283,29 @@
                 <code>AGE</code>
                 <description/>
                 <Groups>
-                    <dataElementGroup>
-                        <id>1</id>
+                    <dataElementGroup id="1">
                         <uuid/>
                         <name>Under 5</name>
                         <alternativename/>
                         <shortname>Under 5</shortname>
                         <code/>
                         <description/>
-                        <dataElementID>2</dataElementID>
-                        <dataElementID>3</dataElementID>
+                        <dataElement ref="2"/>
+                        <dataElement ref="3"/>
                     </dataElementGroup>
-                    <dataElementGroup>
-                        <id>2</id>
+                    <dataElementGroup id="2">
                         <uuid/>
                         <name>Over 5</name>
                         <alternativename/>
                         <shortname>Over 5</shortname>
                         <code/>
                         <description/>
-                        <dataElementID>4</dataElementID>
-                        <dataElementID>5</dataElementID>
+                        <dataElement ref="4"/>
+                        <dataElement ref="5"/>
                     </dataElementGroup>
                 </Groups>
             </dataElementGroupSet>
-            <dataElementGroupSet>
-                <id>2</id>
+            <dataElementGroupSet id="2">
                 <uuid/>
                 <name>Sex</name>
                 <alternativename/>
@@ -333,16 +313,15 @@
                 <code/>
                 <description/>
                 <Groups>
-                    <dataElementGroup>
-                        <id>3</id>
+                    <dataElementGroup id="3">
                         <uuid/>
                         <name>Male</name>
                         <alternativename/>
                         <shortname>Male</shortname>
                         <code/>
                         <description/>
-                        <dataElementID>2</dataElementID>
-                        <dataElementID>5</dataElementID>
+                        <dataElement ref="2"/>
+                        <dataElement ref="5"/>
                     </dataElementGroup>
                 </Groups>
             </dataElementGroupSet>
@@ -352,23 +331,21 @@
         <indicatorGroupSets/>
         
         <dataSets>
-            <dataSet>
-                <id>1</id>
+            <dataSet id="1">
                 <name>Ante-Natal monthly</name>
                 <shortName>Ante-Natal monthly</shortName>
                 <code></code>
                 <periodType>Monthly</periodType>
                 <dataelements>
-                    <id>2</id>
-                    <id>3</id>
+                    <dataelement ref="2"/>
+                    <dataelement ref="3"/>
                 </dataelements>
             </dataSet>
         </dataSets>
         <dataDictionaries/> 
         
         <periods>
-            <period>
-                <id>1</id>
+            <period id="1">
                 <periodType>Monthly</periodType>
                 <startDate>2009-06-01</startDate>
                 <endDate>2009-06-30</endDate>