[DDI-users] How to code repeated elements? (Graham Stark)

Graham Stark grahams at web-ideas.com
Mon Feb 16 11:01:29 EST 2004


Dear all,

Thanks for all these replies; this is all very useful.

It strikes me that a lot of this repetition could be avoided if there was a 
DataType element, so you could describe the labels, ranges etc. of  a type 
once, and then declare lots of vars of that type. Is there no way of doing 
that?

Graham



>Hello, again.
>I just thought of another way to do this markup.
>It's more economical, but probably a lot harder to automate. The links 
>will work, though.
>
><var ID="V1" name="">
><qstn><preQTxt ID="P1">
>I am going to read out some words and phrases that have been used about
>the political parties. Regardless of which party you would vote for, please
>say in each case whether you think the word or phrase is true or not true
>of Party A/Party B/Party C<Link refs="L1 L2 L3"/></preQTxt><qstnLit 
>ID="L1"> <Link refs="P1"/>Understands the problems ordinary people face in 
>today's world</qstnLit></qstn>
></var>
><var ID="V2" name="">
><qstn ><qstnLit ID="L2"><Link refs="P1"/> Shares my values</qstnLit></qstn>
></var>
><var ID="V3" name="">
><qstn ><qstnLit ID="L3"> <Link refs="P1"/>Is honest and 
>principled</qstnLit></qstn>
></var>
>
>
>variable groups could also be created, as shown in my previous example.
>Sanda.
>
>Sanda Ionescu,
>Research Associate
>Inter-university Consortium for Political and Social Research (ICPSR)
>The University of Michigan
>P.O. Box 1248
>Ann Arbor, MI 48106
>
>Phone: (734) 615-7890
>Fax: (734) 647-8200
>
>
>Today's Topics:
>
>>    1. How to code repeated elements? (Graham Stark)
>>
>>
>>----------------------------------------------------------------------
>>
>>Message: 1
>>Date: Fri, 13 Feb 2004 15:12:22 +0000
>>From: Graham Stark <grahams at web-ideas.com>
>>Subject: [DDI-users] How to code repeated elements?
>>To: ddi-users at icpsr.umich.edu
>>Message-ID:
>>         <6.0.1.1.0.20040213150308.01b3b008 at pop3.officemail.easynet.co.uk>
>>Content-Type: text/plain; charset="us-ascii"; format=flowed
>>
>>Hi,
>>       could someone give me some guidance?
>>
>>I'm trying to work out how to code a repeated set of questions like:
>>
>>"I am going to read out some words and phrases that have been used about
>>the political parties. Regardless of which party you would vote for, please
>>say in each case whether you think the word or phrase is true or not true
>>of  Party A/Party B/Party C
>>
>>i)    Understands the problems ordinary people face in today's world
>>ii)   Shares my values
>>iii)  Is honest and principled
>>[ etc ]
>>
>>What's the DDI idiom for this? It seems to me that some combination of
>>vargrps and moving the qstn elements outside the variables should do it,
>>but it's not clear to me exactly what I should be writing. Can anyone point
>>me to an example? Or is it simpler to just write vars that repeat everything?
>>
>>thanks,
>>
>>Graham
>>
>>
>>
>>
>>------------------------------
>>
>>_______________________________________________
>>DDI-users mailing list
>>DDI-users at icpsr.umich.edu
>>http://www.icpsr.umich.edu/mailman/listinfo/ddi-users
>>
>>
>>End of DDI-users Digest, Vol 2, Issue 2
>>***************************************
>
>
>
>_______________________________________________
>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