[DDI-SRG] Referencing codes and dimensions

Joachim Wackerow joachim.wackerow at gesis.org
Thu Jan 17 09:38:32 EST 2008


Arofan,

Looking at the inline ncube stuff and discussing these issues with Wendy 
I realized the following:

Codes in coding schemes and dimensions in NCubeLogicalProduct are 
referenced not in the usual way. They have no identification but they 
need to be referenced. The reference is indeed made by a combination of 
the identification of an upper level container and a content value at 
the specific element.

I know these are not really new findings. Now I'm wondering if this 
solution is really desirable, to have different methods of referencing. 
At least there seems to be an inconsistency between code and dimension 
(usage of element/attribute). Do we have similar references at other places?

Code

<l:CodeScheme>
   <l:Identifier>
     <r:ID>CodeS_2</r:ID>
   </l:Identifier>
   <l:CategorySchemeReference>
     <r:ID>CATS_1</r:ID>
   </l:CategorySchemeReference>
   <l:Code>
     <l:CategoryReference>
       <r:ID>C_1</r:ID>
     </l:CategoryReference>
     <l:Value>1</l:Value>
   </l:Code>

The steps to find the code 1 would be:
1. generate the URN for all Identifier (normalization)
2. find CodeScheme with matching URN
3. apply XPath expression l:Code[ l:Value = '1' ]

Step 1 and 2 are the common steps to find an Identifier. Step 1 is done 
probably only once for all Identifier, then an index should be provided 
in the application.
Step 3 is an expensive test on content of an element. This should be 
also done only once to provide an index.


Dimension

<l:NCube dimensionCount="3" cellCount="40">
   <l:Identifier>
     <r:ID>NCube</r:ID>
   </l:Identifier>
   <!-- - - - - - -->
   <l:Dimension rank="1">
     <l:VariableReference>
       <r:ID>V1</r:ID>
     </l:VariableReference>
   </l:Dimension>

The steps to find the dimension with rank 1 would be (required by ncube 
modules):
1. generate the URN for all Identifier (normalization)
2. find NCube with matching URN
3. apply XPath expression l:Dimension[ @rank = '1' ]

This is similar as at code but the test is done on the value of an 
attribute.


Would it be possible to construct an Identifier for Code and Dimension 
where the ID part is the critical value (Value or @rank) and the rest of 
the URN is inherited by the upper level container (CodeScheme or Ncube). 
This way step 3 would be probably unnecessary and a more consistent way 
of referencing over all would exist.

Achim


More information about the DDI-SRG mailing list