[DDI-users] How to copy XML elements?

Mark R. Diggory mdiggory at latte.harvard.edu
Mon Aug 8 09:11:34 EDT 2005


A little more info on the subject:

http://www.dpawson.co.uk/xsl/sect2/merge.html

from the XSLT FAQ

http://www.dpawson.co.uk/xsl/sect2/sect21.html

-Mark

Mark R. Diggory wrote:
> I'd recommend using XSLT to do the merge job. You can get the Home 
> edition of XMLSpy for free and author/execute the XSLT within it.
> 
> www.xmlspy.com
> 
> Post further emails to me and I'll give you a hand creating the xslt.
> 
> -Mark Diggory
> 
> 
> Andrew Arnott wrote:
> 
>> I would definitely recommend a script/program to handle the job.  I've 
>> done similar work by writing a program that copied <preQTxt> tags from 
>> one file to another.  Unfortunately, I just threw away the program 
>> after not using it for years.  It's not that hard though.
>> On 8/8/05, *Fredy Kuhn* <fredy.kuhn at sidos.unine.ch 
>> <mailto:fredy.kuhn at sidos.unine.ch>> wrote:
>>
>>     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
>>
>>     _______________________________________________
>>     DDI-users mailing list
>>     DDI-users at icpsr.umich.edu <mailto:DDI-users at icpsr.umich.edu>
>>     http://www.icpsr.umich.edu/mailman/listinfo/ddi-users
>>
>>
>>
>>
>> -- 
>> Andrew Arnott
>> Web Developer
>> Brigham Young University
>> "Men stumble over the truth from time to time, but most pick 
>> themselves up and hurry off as if nothing happened." -WC
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> DDI-users mailing list
>> DDI-users at icpsr.umich.edu
>> http://www.icpsr.umich.edu/mailman/listinfo/ddi-users
> 
> _______________________________________________
> DDI-users mailing list
> DDI-users at icpsr.umich.edu
> http://www.icpsr.umich.edu/mailman/listinfo/ddi-users


More information about the DDI-users mailing list