[DDI-users] Adding tags to the DDI

I-Lin Kuo ikuo at icpsr.umich.edu
Mon Jan 19 17:17:29 EST 2004


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


More information about the DDI-users mailing list