[DDI-users] DDI 3.0 xsd question

Joachim Wackerow joachim.wackerow at gesis.org
Thu Feb 5 11:40:20 EST 2009


Hello Alerk,

It looks like a bug. It doesn't seem to make sense to allow two URN's or 
two ID's etc.

We will discuss this at the next TIC meeting and will give you feedback.

Thank you for pointing this out.

Achim

Alerk Amin wrote:
> Hello,
> 
>    I have a question about a DDI 3.0 document that I am trying to 
> validate.  I hope this is the right mailing list for this question: if 
> it is not, please let me know where I should mail this question.
>    The following snippet of XML validates properly, but it seems to me 
> like it should not:
> 
> <l:ConceptReference>
> 	<r:ID>C_1</r:ID>
> 	<r:ID>C_2</r:ID>
> </l:ConceptReference>
> 
>    Based on the documentation of the ReferenceType in reusable.xsd, the 
> Reference should have a URN, an ID, or both.  2 IDs (or 2 URNs) should 
> not be allowed.
>    In reusable.xsd, the schema for the ReferenceType contains:
> 
>        <xs:choice maxOccurs="2">
>          <xs:element ref="URN">
>            ...
>          </xs:element>
>          <xs:sequence>
>            <xs:element ref="ID">
>              ...
>            </xs:element>
>            ...
>          </xs:sequence>
>        </xs:choice>
> 
> In order to validate the way the documentation describes, it seems like 
> the scheme should instead contain:
> 
>      <xs:choice>
>        <xs:sequence>
>          <xs:element ref="URN">
>            ...
>          </xs:element>
>          <xs:sequence minOccurs="0">
>            <xs:element ref="ID">
>              ...
>            </xs:element>
>            ...
>          </xs:sequence>
>        </xs:sequence>
>        <xs:sequence>
>          <xs:sequence>
>            <xs:element ref="ID">
>              ...
>            </xs:element>
>            ...
>          </xs:sequence>
>          <xs:element ref="URN" minOccurs="0">
>            ...
>          </xs:element>
>        </xs:sequence>
>      </xs:choice>
> 
> I would appreciate any help or explanation anyone can provide about 
> this.  If my interpretation of the ReferenceType is incorrect, please 
> let me know.
>    Thank you for your help.
> 
> Best,
> Alerk
> 


-- 
GESIS - Leibniz Institute for the Social Sciences
Postal address: P.O. Box 122155, 68072 Mannheim, Germany
Visiting address: B2 1, 68159 Mannheim, Germany
Phone: +49 (0)621 1246 262
Fax: +49 (0)621 1246 100
E-mail: joachim.wackerow at gesis.org
www.gesis.org/en/institute/


More information about the DDI-users mailing list