<div dir="ltr">Yes we know about this but have been unable in XML to allow only one of each but require at least one or the other. We have had the bug filed since version 3.0. The best we could do was document what was supposed to be done. <div><br></div><div>URL OR sequence OR both is the intention and so documented.</div><div><br></div><div>However 2 URLs or 2 sequences will validate in the XML</div><div><br></div><div>Wendy</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 3, 2014 at 4:16 PM, Jani Hautamäki <span dir="ltr">&lt;<a href="mailto:Jani.Hautamaki@staff.uta.fi" target="_blank">Jani.Hautamaki@staff.uta.fi</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>In DDI-Lifecycle 3.2 the narrative documentation <br>
<br>
<a href="http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/FieldLevelDocumentation/schemas/reusable_xsd/complexTypes/AbstractIdentifiableType.html" target="_blank">http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/FieldLevelDocumentation/schemas/reusable_xsd/complexTypes/AbstractIdentifiableType.html</a><br>
<br>
for the type<br>
<br>
{ddi:reusable:3_2}AbstractIdentifiableType<br>
<br>
states that<br>
<br>
&quot;An entity can either be identified either by a URN and/or an identification <br>
sequence. At a minimum, one or the other is required. &quot;<br>
<br>
However, according to the XML Schema, the following XML document is valid.<br>
<br>
---8&lt;---8&lt;---8&lt;---<br>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>
&lt;ddi:DDIInstance <br>
    xmlns:ddi=&quot;ddi:instance:3_2&quot; <br>
    xmlns:r=&quot;ddi:reusable:3_2&quot; <br>
    &gt;<br>
    <br>
  &lt;r:Agency&gt;<a href="http://acme.org" target="_blank">acme.org</a>&lt;/r:Agency&gt;<br>
  &lt;r:ID&gt;ddi_instance&lt;/r:ID&gt;<br>
  &lt;r:Version&gt;1&lt;/r:Version&gt;<br>
  <br>
  &lt;r:Agency&gt;<a href="http://acme.org" target="_blank">acme.org</a>&lt;/r:Agency&gt;<br>
  &lt;r:ID&gt;another_ddi_instance&lt;/r:ID&gt;<br>
  &lt;r:Version&gt;2&lt;/r:Version&gt;<br>
  <br>
&lt;/ddi:DDIInstance&gt;<br>
---8&lt;---8&lt;---8&lt;---<br>
<br>
This is invalid according to specification, but the restriction<br>
is not expressed formally with XML Schema.<br>
<br>
My question is then:<br>
<br>
Is this a mistake/bug in the XML Schema? (If not, please explain why<br>
it is better to formally allow such invalid documents?)<br>
<br>
The XML Schema language allows one to express formally the restriction <br>
&quot;either one or both&quot;. The details are laid down, for instance, in the answer<br>
<a href="http://stackoverflow.com/questions/9863056/xsd-schema-either-one-or-both" target="_blank">http://stackoverflow.com/questions/9863056/xsd-schema-either-one-or-both</a><br>
<br>
Here&#39;s a patch for the file &quot;reusable.xsd&quot; that is included in the current<br>
distribution package of the DDI-Lifecycle 3.2:</p>
<p><br>
</p>
<p><a href="http://www.pastebucket.com/72481" target="_blank">http://www.pastebucket.com/72481</a></p>
<p><br>
</p>
<p><br>
</p>
</div>
</div>

<br>_______________________________________________<br>
DDI-users mailing list<br>
<a href="mailto:DDI-users@icpsr.umich.edu">DDI-users@icpsr.umich.edu</a><br>
<a href="http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users" target="_blank">http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Wendy L. Thomas                              Phone: +1 612.624.4389</div><div>Data Access Core Director                 Fax:   +1 612.626.8375</div><div>Minnesota Population Center             Email: <a href="mailto:wlt@umn.edu" target="_blank">wlt@umn.edu</a></div><div>University of Minnesota</div><div>50 Willey Hall</div><div>225 19th Avenue South</div><div>Minneapolis, MN 55455</div></div>
</div>