[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 73: Changed element name, arguably to a better name, to avoid same name elements

revision-diff.txt (573 Bytes)

Hi Jo

I like your simple naming solution. And there is the more general case throughout dxf where we have somewhere an element with an id, say

And somewhere else a reference to it. Currently we have something like:

... etc

The use of such “homonymns” is generally an evil which should be strongly discouraged. So I agree to name the element dataElementRef is better. Though I think the attribute should remain ref rather than id - id has a different connotation. Also I want to easily find elements which have references to others without doing a regex on the element name :slight_smile: So we will have:

...

etc

Beyond the naming issue, the particular case you have fixed is another example of the reversed associations you picked up earlier - I have an indication of the dataSets the dataElement belongs to rather than the other way round. I’ll quickly reverse this. Hope you are not editing now …

Regards
Bob

···

2009/12/15 noreply@launchpad.net


revno: 73

committer: Jo Størset storset@gmail.com

branch nick: dhis2-docbook-docs

timestamp: Tue 2009-12-15 13:47:37 +0100

message:

Changed element name, arguably to a better name, to avoid same name elements

(and generated java classes, especially on stupid ignore case file systems).

modified:

src/schemas/dxf_v2_schema/dxf2.rng

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-15 00:49:17 +0000

+++ src/schemas/dxf_v2_schema/dxf2.rng 2009-12-15 12:47:37 +0000

@@ -349,8 +349,8 @@

       </element>

       <element name="dataDictionaries">

         <zeroOrMore>
  •          <element name="datadictionary">
    
  •            <attribute name="ref">
    
  •          <element name="dataDictionaryRef">
    
  •            <attribute name="id">
    
                 <ref name="dxfIDRef"/>
    
               </attribute>
    
             </element>
    

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

The use of such "homonymns" is generally an evil which should be strongly discouraged. So I agree to name the element dataElementRef is better. Though I think the attribute should remain ref rather than id - id has a different connotation. Also I want to easily find elements which have references to others without doing a regex on the element name :slight_smile: So we will have:

<dataSet>
   <dataElementRef ref="1"/>
   ...

Agree, even tho the ref-ref is a little annoying.

Beyond the naming issue, the particular case you have fixed is another example of the reversed associations you picked up earlier - I have an indication of the dataSets the dataElement belongs to rather than the other way round. I'll quickly reverse this. Hope you are not editing now ...

See you made it, any merging will have to be on my side :slight_smile:

Jo

···

Den 16. des. 2009 kl. 12.59 skrev Bob Jolliffe: