<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" 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 id="lnk103594" href="http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/FieldLevelDocumentation/schemas/reusable_xsd/complexTypes/AbstractIdentifiableType.html">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>
"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. "<br>
<br>
However, according to the XML Schema, the following XML document is valid.<br>
<br>
---8<---8<---8<---<br>
<?xml version="1.0" encoding="utf-8"?><br>
<ddi:DDIInstance <br>
xmlns:ddi="ddi:instance:3_2" <br>
xmlns:r="ddi:reusable:3_2" <br>
><br>
<br>
<r:Agency>acme.org</r:Agency><br>
<r:ID>ddi_instance</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:Agency>acme.org</r:Agency><br>
<r:ID>another_ddi_instance</r:ID><br>
<r:Version>2</r:Version><br>
<br>
</ddi:DDIInstance><br>
---8<---8<---8<---<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>
"either one or both". The details are laid down, for instance, in the answer<br>
http://stackoverflow.com/questions/9863056/xsd-schema-either-one-or-both<br>
<br>
Here's a patch for the file "reusable.xsd" that is included in the current<br>
distribution package of the DDI-Lifecycle 3.2:</p>
<p><br>
</p>
<p><a id="lnk541388" href="http://www.pastebucket.com/72481">http://www.pastebucket.com/72481</a></p>
<p><br>
</p>
<p><br>
</p>
</div>
</body>
</html>