[DDI-users] How to copy XML elements?

Fredy Kuhn fredy.kuhn at sidos.unine.ch
Mon Aug 8 07:33:06 EDT 2005


Hi all,

I have a technical question about XML file handling for DDI codebooks: We are currently indexing questions by adding Thesaurus keywords to DDI element 'concept' (within VAR, currently #4.3.2 in DTD V2). Example below.

It happens now that we have two codebooks with identical variables (one codebook for german, one for french [the neverending language handling problems]), which should have both the same concept assignments per VAR section.

For one codebook, the 'concept' additions have been completed. But how can I copy now the concept branches from one codebook to another, based on matching variable name attribute? I'd be happy to have some tips, templates or procedures. 

The quickest way would probably be to copy for each VAR the 'concept' branches with Notepad from one file to the other, even for these 1200 variables! But this would be annoying and errorprone, and we lack anyway of good tools + knowledge for managing/manipulating XML files in general. Thus I'm curious to have your opinion how to proceed.

Background: the Madiera project. For current indexing, we used Nesstar's Publisher V3. As XML 'editors', we have Stylus or XMLspy.

Tell me if you need further information.

-- An example --
<var ID="V4" name="f10000" files="F1" dcml="0" intrvl="contin">
  ...
  <concept vocab="ELLST" vocabURI="..."> Elections </concept>
  <concept vocab="ELLST" vocabURI="..."> Election data </concept>
  <concept vocab="ELLST" vocabURI="..."> Geographical areas and countries </concept>
-- An example --


Best regards
Freddy



More information about the DDI-users mailing list