[DDI-users] Re:Adding tags to the DDI (Andrew L Arnott)

Mark R. Diggory mdiggory at latte.harvard.edu
Tue Jan 20 13:29:11 EST 2004


I understand now, I was thinking he was trying to markup "non-data 
related" processing rules that would possibly be used downstream in 
processing the xml.

This does make sense now that you've described it and I see it in the 
taglibrary.

-Mark

Sanda Ionescu wrote:

> Correct me if I'm wrong, but I think that Andrew is basically asking for 
> a way to mark up in DDI skip patterns (if response to Vx is code "1" 
> then go to Vxx; or, Vxx was aked of people who answered "1" to Vx).
> 
> I have repeatedly asked for a modification to the DDI which would allow 
> an accurate rendition of these patterns.
> 
> Right now, there are two ways in which we can mark-up such patterns: 1) 
> by using the <forward> and <backward> elements within <qstn>; 
> technically, these are meant to back- or forward-reference other 
> questions, but they can contain PCDATA, so an explanatory text can be 
> inserted too (I am personally not too fond of this option).
> 2) by using the internal link element (<Link>)  one can actually 
> cross-reference between the value "1" in variable Vx (category level) 
> and the entire variable Vxx (variable level). Category, and, 
> respectively, variable IDs would be used  in the Link's "refs" attribute.
> 
> I hope this helps.
> 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
> 
> 
> At 11:39 AM 1/20/2004 -0500, you wrote:
> 
>> Send DDI-users mailing list submissions to
>>         ddi-users at icpsr.umich.edu
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://www.icpsr.umich.edu/mailman/listinfo/ddi-users
>> or, via email, send a message with subject or body 'help' to
>>         ddi-users-request at icpsr.umich.edu
>>
>> You can reach the person managing the list at
>>         ddi-users-owner at icpsr.umich.edu
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of DDI-users digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Adding tags to the DDI (Andrew L Arnott)
>>    2. Re: Adding tags to the DDI (I-Lin Kuo)
>>    3. Re: Adding tags to the DDI (Mark R. Diggory)
>>    4. RE: Adding tags to the DDI (Andrew L Arnott)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 19 Jan 2004 14:10:18 -0700
>> From: Andrew L Arnott <Relate_Webmaster at byu.edu>
>> Subject: [DDI-users] Adding tags to the DDI
>> To: ddi-users at icpsr.umich.edu
>> Message-ID: <01L5L3O2MI5Q960FZT at EMAIL1.BYU.EDU>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> I'm fairly new to DDI, and moderately new to XML schemas.  I am using the
>> DDI 2.0 schema (XSD) file to validate incoming DDI files on the web.  My
>> problem is that DDI (apparently) does not have tags to make some 
>> variables
>> conditional on the values of other variables.  I have tried to write 
>> another
>> schema and do something like this:
>>
>> <ddi:var ID="V1" .>
>>
>>             <myExt:if var="v5" equals="1"/>
>>
>>             <labl>.</labl>
>>
>> </ddi:var>
>>
>>
>>
>> But the DDI schema doesn't allow for unknown elements, I guess.  Can 
>> anyone
>> suggest how I can get around this problem?  If you know a different 
>> approach
>> to my problem, I'd be very open to it.
>>
>>
>>
>> Thanks,
>>
>> Andrew Arnott
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: 
>> http://lion.icpsr.umich.edu/pipermail/ddi-users/attachments/20040119/6c0fd432/attachment-0001.htm 
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Mon, 19 Jan 2004 17:17:29 -0500
>> From: I-Lin Kuo <ikuo at icpsr.umich.edu>
>> Subject: Re: [DDI-users] Adding tags to the DDI
>> To: Data Documentation Iniative Users Group
>>         <ddi-users at icpsr.umich.edu>,    Andrew L Arnott
>>         <Relate_Webmaster at byu.edu>
>> Cc: ddi-users at icpsr.umich.edu
>> Message-ID: <1074550649.400c5779ca3ce at icpsr.mail.umich.edu>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Technically, you can do the following:
>> 1) When you receive an incoming DDI document, store it.
>> 2) Make a copy of the DDI and use an xslt style sheet to strip out the 
>> custom
>> extensions if they lie in different namespaces.
>> 3) Validate the stripped DDI against the schema.
>> 4) if the stripped version validates, then use the original.
>>
>> Note: your example appears rather ad hoc. If you could please explain 
>> what
>> you're trying to do, and what actual extensions you've done, that 
>> would be
>> useful to all of us. It's quite likely that someone else has tried to 
>> do what
>> you're doing (in which case you don't have to reinvent the wheel). It 
>> might
>> also be possible that your extension solves a problem in a way that 
>> could be
>> incorporated into the next version of the DDI.
>>
>>
>> Quoting Andrew L Arnott <Relate_Webmaster at byu.edu>:
>>
>> > I'm fairly new to DDI, and moderately new to XML schemas.  I am 
>> using the
>> > DDI 2.0 schema (XSD) file to validate incoming DDI files on the 
>> web.  My
>> > problem is that DDI (apparently) does not have tags to make some 
>> variables
>> > conditional on the values of other variables.  I have tried to write 
>> another
>> > schema and do something like this:
>> >
>> > <ddi:var ID="V1" .>
>> >
>> >             <myExt:if var="v5" equals="1"/>
>> >
>> >             <labl>.</labl>
>> >
>> > </ddi:var>
>> >
>> >
>> >
>> > But the DDI schema doesn't allow for unknown elements, I guess.  Can 
>> anyone
>> > suggest how I can get around this problem?  If you know a different 
>> approach
>> > to my problem, I'd be very open to it.
>> >
>> >
>> >
>> > Thanks,
>> >
>> > Andrew Arnott
>> >
>> >
>>
>>
>> -- 
>> I-Lin Kuo
>> Programmer/Analyst II
>> ICPSR
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Tue, 20 Jan 2004 10:10:27 -0500
>> From: "Mark R. Diggory" <mdiggory at latte.harvard.edu>
>> Subject: Re: [DDI-users] Adding tags to the DDI
>> To: Data Documentation Iniative Users Group
>>         <ddi-users at icpsr.umich.edu>
>> Cc: Andrew L Arnott <Relate_Webmaster at byu.edu>
>> Message-ID: <400D44E3.6020105 at latte.harvard.edu>
>> Content-Type: text/plain; charset=us-ascii; format=flowed
>>
>> Andrew,
>>
>> We are currently in the process of developing extensibility into the
>> schema. But I expect this will be very controlled initially.
>>
>> I'd like to here more about what your attempting to do as well.
>>
>> One point, your example appears to be more tied to "conditional
>> processing", xsl templating language is a very powerful tool for this.
>> If there is a way you can avoid conditional processing within the xml
>> file itself and focus it into the application. You may get more bang for
>> your buck from the tools your using with lets design headaches.
>>
>> -Mark
>>
>> I-Lin Kuo wrote:
>> > Technically, you can do the following:
>> > 1) When you receive an incoming DDI document, store it.
>> > 2) Make a copy of the DDI and use an xslt style sheet to strip out 
>> the custom
>> > extensions if they lie in different namespaces.
>> > 3) Validate the stripped DDI against the schema.
>> > 4) if the stripped version validates, then use the original.
>> >
>> > Note: your example appears rather ad hoc. If you could please 
>> explain what
>> > you're trying to do, and what actual extensions you've done, that 
>> would be
>> > useful to all of us. It's quite likely that someone else has tried 
>> to do what
>> > you're doing (in which case you don't have to reinvent the wheel). 
>> It might
>> > also be possible that your extension solves a problem in a way that 
>> could be
>> > incorporated into the next version of the DDI.
>> >
>> >
>> > Quoting Andrew L Arnott <Relate_Webmaster at byu.edu>:
>> >
>> >
>> >>I'm fairly new to DDI, and moderately new to XML schemas.  I am 
>> using the
>> >>DDI 2.0 schema (XSD) file to validate incoming DDI files on the 
>> web.  My
>> >>problem is that DDI (apparently) does not have tags to make some 
>> variables
>> >>conditional on the values of other variables.  I have tried to write 
>> another
>> >>schema and do something like this:
>> >>
>> >><ddi:var ID="V1" .>
>> >>
>> >>            <myExt:if var="v5" equals="1"/>
>> >>
>> >>            <labl>.</labl>
>> >>
>> >></ddi:var>
>> >>
>> >>
>> >>
>> >>But the DDI schema doesn't allow for unknown elements, I guess.  Can 
>> anyone
>> >>suggest how I can get around this problem?  If you know a different 
>> approach
>> >>to my problem, I'd be very open to it.
>> >>
>> >>
>> >>
>> >>Thanks,
>> >>
>> >>Andrew Arnott
>> >>
>> >>
>> >
>> >
>> >
>>
>> -- 
>> Mark Diggory
>> Software Developer
>> Harvard MIT Data Center
>> http://www.hmdc.harvard.edu
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Tue, 20 Jan 2004 09:36:32 -0700
>> From: Andrew L Arnott <Relate_Webmaster at byu.edu>
>> Subject: [DDI-users] RE: Adding tags to the DDI
>> To: ddi-users at icpsr.umich.edu
>> Message-ID: <01L5M8EZLVJK960NDH at EMAIL1.BYU.EDU>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Yes, thank you Richard.  That is exactly what I am looking for.  Although
>> the simple skip pattern support currently in the DDI is not 
>> sufficient.  My
>> ideas?  I'll include a few. Below them I will include how I am working
>> around the problem for now (for the interest of others trying to do 
>> what I
>> am doing also in the meantime).  I am pleased to know that the DDI 
>> committee
>> is working on this.
>>
>>
>>
>> A schema that supports something like this would be nice:
>>
>> <varGrp ID="VG8F1" type="subject" var="V5 V6 V7">
>>
>>   <labl>Kindness</labl>
>>
>>   <conditional>
>>
>>     <!-- The following conditionals would specify that this
>>
>>       -- varGrp is to be displayed and asked of the user
>>
>>       -- IF (V1 == 5) OR (V2 >=3 AND V3 == 2) -->
>>
>>     <if var="V1" equals="5"/>
>>
>>     <if var="V2" greaterOrEqualTo="3">
>>
>>        <if var="V3" equals="2"/>
>>
>>     </if>
>>
>>   </conditional>
>>
>> </varGrp>
>>
>>
>>
>> It is a simple schema that allows complex AND/OR structures, and various
>> ways to compare values (such as =, >, >=, etc.)  Specifically, I 
>> prefer this
>> model of the varGrp specifying what it is dependent on, rather than
>> individual var's specifying what varGrps depend on them.  All varGrp's,
>> whether they contain other varGrp's or var's directly, should support 
>> this
>> syntax.
>>
>>
>>
>> Now, what am I doing in the meantime?  Well, I'm misusing a tag to 
>> store the
>> question skipping information.  Here is a code snippet of what I'm doing:
>>
>> <varGrp ID="VG8F1" type="subject" var="V5 V6 V7">
>>
>>   <labl>
>>
>>     Kindness
>>
>>   </labl>
>>
>>   <defntn>
>>
>>     v1 >= 4
>>
>>   </defntn>
>>
>> </varGrp>
>>
>> That's right.  I'm using straight text in a "defntn" tag to store the 
>> code,
>> and my application code interprets this syntax and produces the desired
>> result.  Much less than desirable, but it gets the job done, and we don't
>> use the defntn tag for anything else right now.
>>
>>
>>
>> Those are my thoughts so far.  I have it working as is.  But if anyone 
>> has
>> better ideas for implementing this, please let me know.  As soon as DDI
>> comes up with a standard on this, I'll jump on the wagon. I really 
>> like the
>> DDI spec.
>>
>>
>>
>> Andrew L Arnott
>>
>> Web Programmer
>>
>> The RELATE Institute
>>
>> School of Family Life
>>
>> Brigham Young University
>>
>>   _____
>>
>> From: Richard C. Rockwell [mailto:richard at ropercenter.uconn.edu]
>> Sent: Tuesday, January 20, 2004 9:24 AM
>> To: Andrew L Arnott; Data Documentation Initiative Users
>> Subject: Re: Adding tags to the DDI
>>
>>
>>
>> Andrew, as I read your message, it seems to me that you are asking a
>> question entirely different from the two answers that have (so far) been
>> posted.  Your question seems to me to arise from survey research 
>> rather than
>> from information science or even from the details of the DDI and XML.
>>
>> I think that you are asking about what survey researchers know as "skip
>> patterns," in which some characteristic of a question (which is almost 
>> but
>> not entirely equivalent to a "variable") is contingent upon the 
>> response to
>> another question.  The most common characteristic concerns whether the
>> question is asked or not.
>>
>> An example is found in a specific GSS series of questions.  The first
>> element in the series is the question "Are you a citizen of [the United
>> States]?".  If the answer is "Yes," the interview then proceeds to 
>> "Were you
>> born in [the United States]?".  If the answer to the question is "No" 
>> then
>> and only then is this question asked "What citizenship do you hold?".  
>> Then
>> "No" respondents are also asked about their country of birth, 
>> returning to
>> the normal flow of the questionnaire.
>>
>> Skip patterns can be considerably more complicated than this, including
>> contingency on the values of two or more variables.  Even the question 
>> text
>> can be contingent on the answer to a preceding question, although so 
>> far we
>> don't see that frequently.
>>
>> At the moment the DDI handles only the simplest of skip patterns, with 
>> "come
>> from" and "go to" elements.  This might suffice, Andrew, to meet your 
>> needs
>> of the moment.
>>
>> The Expert and Steering Committtes are aware that much more is needed in
>> order for the DDI to be capable of documenting the increasingly complex
>> instruments used in various forms of Computer Assisted Interviewing.  
>> Your
>> ideas concerning what a future release of the DDI should be capable of
>> documenting would be most welcome.
>>
>> ("At 02:10 PM 1/19/2004 -0700, Andrew L Arnott wrote:
>>
>> I m fairly new to DDI, and moderately new to XML schemas.  I am using the
>> DDI 2.0 schema (XSD) file to validate incoming DDI files on the web.  My
>> problem is that DDI (apparently) does not have tags to make some 
>> variables
>> conditional on the values of other variables.  I have tried to write 
>> another
>> schema and do something like this:
>>
>> <ddi:var ID= V1 &>
>>
>>             <myExt:if var= v5 equals= 1 />
>>
>>             <labl>&</labl>
>>
>> </ddi:var>
>>
>>
>>
>> But the DDI schema doesn t allow for unknown elements, I guess.  Can 
>> anyone
>> suggest how I can get around this problem?  If you know a different 
>> approach
>> to my problem, I d be very open to it.
>>
>>
>>
>> Thanks,
>>
>> Andrew Arnott
>> _______________________________________________
>> DDI-users mailing list
>> DDI-users at icpsr.umich.edu
>> http://www.icpsr.umich.edu/mailman/listinfo/ddi-users
>>
>> --------------------------------------
>> Richard C. ROCKWELL
>> Executive Director, The Roper Center &
>> Institute for Social Inquiry
>> Professor of Sociology
>> University of Connecticut
>> 341 Mansfield Road, U-164
>> Storrs, CT 06269-1164  USA
>> V +1 860 486-4440
>> F +1 860 486-6308
>> Richard.Rockwell at uconn.edu
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: 
>> http://lion.icpsr.umich.edu/pipermail/ddi-users/attachments/20040120/926d3755/attachment.htm 
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> 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 1, Issue 82
>> ****************************************
> 
> 
> _______________________________________________
> DDI-users mailing list
> DDI-users at icpsr.umich.edu
> http://www.icpsr.umich.edu/mailman/listinfo/ddi-users

-- 
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu


More information about the DDI-users mailing list