<div dir="ltr"><div>Thanks, we'll add this to our documentation edits.</div><div><br></div><div>Wendy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 10, 2014 at 9:32 AM, Jani Hautamäki <span dir="ltr"><<a href="mailto:Jani.Hautamaki@staff.uta.fi" target="_blank">Jani.Hautamaki@staff.uta.fi</a>></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="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;background-color:rgb(255,255,255)">
<p></p>
Thanks for clarifying this.<br>
<br>
It might be a good idea to amend the field-level specification<br>
for InternationalStringType with something like this:<br>
<br>
The value for the attribute xml:lang must always be defined<br>
either implicitly or explicitly. <br>
If the attribute is not explicitly set, <br>
its value is inherited from the parent. <br>
Consequently, there can be only one <r:String> child <br>
without xml:lang set explicitly within an InternationalStringType element.<br>
<br>
--<br>
<br>
The inheritance of information (eg. xml:lang) from parent creates <br>
some issues with respect to the XML linearisation process <br>
(the process of converting the hierarchical DDIInstances into <br>
flat list of Fragments). These issues are solvable though.<br>
<br>
An example follows.<br>
<br>
First, there is the minimalistic ddi:DDIInstance with <br>
id "ddi_instance". The @xml:lang is defined in the root element.<br>
<br>
ddi_instance.xml<br>
------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>
xmlns:s="ddi:studyunit:3_2"<br>
xml:lang="fi"<br>
><br>
<br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>ddi_instance</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<s:StudyUnit><br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>study_unit</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:Citation><br>
<r:Title><br>
<r:String>otsikko suomeksi</r:String><br>
</r:Title><br>
</r:Citation><br>
<br>
</s:StudyUnit><br>
</ddi:DDIInstance><br>
------8<------8<------<br>
<br>
The <r:String> element does not have the attribute @xml:lang explicitly<br>
set. However, the root element has @xml:lang explicitly set to "en",<br>
and therefore the <s:StudyUnit>'s title has the @xml:lang implicitly<br>
set to "en" too.<br>
<br>
Because the <s:StudyUnit> is inherited from r:AbstractMaintainableType,<br>
it is possible to maintain it as an independent object.<br>
<br>
As an independent object the <s:StudyUnit> does not have @xml:lang<br>
defined for any of its children. Moreover, assuming a default @xml:lang<br>
value "en_us" for the <s:StudyUnit> would lead to a contradiction.<br>
<br>
This problem becames more apparent, when the above ddi:DDIInstance<br>
is linearised into flat list of ddi:Fragments, and then the StudyUnit's<br>
Fragment is reused in another DDIInstance.<br>
<br>
Here's the linearised version of the above document,<br>
<br>
fragments1.xml<br>
------8<------8<------<br>
<?xml version="1.0" encoding="utf-8"?><br>
<ddi:FragmentInstance<br>
xmlns:ddi="ddi:instance:3_2"<br>
xmlns:r="ddi:reusable:3_2"<br>
xmlns:s="ddi:studyunit:3_2"<br>
><br>
<br>
<ddi:Fragment><br>
<ddi:DDIInstance xml:lang="fi"><br>
<br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>ddi_instance</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:StudyUnitReference><br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>study_unit</r:ID><br>
<r:Version>1</r:Version><br>
<r:TypeOfObject>StudyUnit</r:TypeOfObject><br>
</r:StudyUnitReference><br>
</ddi:DDIInstance><br>
</ddi:Fragment><br>
<br>
<ddi:Fragment><br>
<s:StudyUnit><br>
<br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>study_unit</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:Citation><br>
<r:Title><br>
<r:String>otsikko suomeksi</r:String><br>
</r:Title><br>
</r:Citation><br>
</s:StudyUnit><br>
</ddi:Fragment><br>
<br>
</ddi:FragmentInstance><br>
------8<------8<------<br>
<br>
Now, consider another FragmentInstance, which reuses the StudyUnit<br>
from the previous FragmentInstance<br>
<br>
fragments2.xml<br>
------8<------8<------<br>
<?xml version="1.0" encoding="utf-8"?><br>
<ddi:FragmentInstance<br>
xmlns:ddi="ddi:instance:3_2"<br>
xmlns:r="ddi:reusable:3_2"<br>
xmlns:s="ddi:studyunit:3_2"<br>
><br>
<br>
<ddi:Fragment><br>
<ddi:DDIInstance xml:lang="en"><br>
<br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>another_ddi_instance</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:StudyUnitReference><br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>study_unit</r:ID><br>
<r:Version>1</r:Version><br>
<r:TypeOfObject>StudyUnit</r:TypeOfObject><br>
</r:StudyUnitReference><br>
</ddi:DDIInstance><br>
</ddi:Fragment><br>
<br>
</ddi:FragmentInstance><br>
------8<------8<------<br>
<br>
This DDIInstance is identified as "another_ddi_instance",<br>
and it differs from the previous "ddi_instance" only by setting<br>
a different value for the xml:lang.<br>
<br>
Given these two FragmentInstances, "fragments1.xml" and "fragments2.xml", <br>
is is possible to reconstruct (or "delinearise") two different DDIInstances.<br>
One is equal to the first XML document, "ddi_instance.xml", <br>
and the other DDIInstance is shown below,<br>
<br>
another_ddi_instance.xml<br>
------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>
xmlns:s="ddi:studyunit:3_2"<br>
xml:lang="en"<br>
><br>
<br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>another_ddi_instance</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<s:StudyUnit><br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>study_unit</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:Citation><br>
<r:Title><br>
<r:String>otsikko suomeksi</r:String><br>
</r:Title><br>
</r:Citation><br>
<br>
</s:StudyUnit><br>
</ddi:DDIInstance><br>
------8<------8<------<br>
<br>
When "ddi_instance.xml" and "another_ddi_instance.xml" are compared,<br>
they both contain literally identical manifestation of the StudyUnit<br>
identified as "acme.org:study_unit:1". <br>
<br>
However, the StudyUnit's @xml:lang is implicitly set, and its<br>
value depends on which DDIInstance is being used. This leads<br>
to an ambiguous definition of the Maintainable in question.<br>
<br>
Obviously, this is undesirable.<br>
<br>
The Title of the StudyUnit "acme.org:study_unit:1" should have <br>
the language defined independently of the containing DDIInstance.<br>
<br>
The resolution to this problem is obvious though, but has a notable<br>
impact on the linearisation/delinearisation process. <br>
<br>
When doing a linearisation (DDIInstance->FragmentInstance) each inherited <br>
attribute must be explicitly set on each Maintainable before <br>
the Maintainables are dismantled into Fragments. <br>
<br>
Conversely, after a Maintainable has been delinearised <br>
(FragmentInstance->DDIInstance), the redundant xml:lang attributes <br>
should be cleaned up to reduce noise.<br>
<br>
This approach implies that an XML document must be considered <br>
equivalent to itself when the inherited values are explictly set.<br>
<br>
The question is then:<br>
Is the following document equivalent to the first one with<br>
respect to the DDI-Lifecycle 3.2 specification, <br>
as required by my approach? <br>
<br>
The original document "ddi_instance.xml" is transformed so<br>
that each xml:lang attribute has its value explicitly set,<br>
and the XML document should no longer rely on inheritance in any place.<br>
<br>
ddi_intance.noinheritance.xml<br>
------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>
xmlns:s="ddi:studyunit:3_2"<br>
xml:lang="fi"<br>
><br>
<br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>ddi_instance</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<s:StudyUnit xml:lang="fi"><br>
<r:Agency><a href="http://acme.org" target="_blank">acme.org</a></r:Agency><br>
<r:ID>study_unit</r:ID><br>
<r:Version>1</r:Version><br>
<br>
<r:Citation><br>
<r:Title><br>
<r:String xml:lang="fi">otsikko suomeksi</r:String><br>
</r:Title><br>
</r:Citation><br>
<br>
</s:StudyUnit><br>
</ddi:DDIInstance><br>
------8<------8<------<br>
<br>
</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"><br>-- <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>