<div dir="ltr">In cases where an XML:lang is optional to determine the &#39;implied language&quot; it cascades up the XML tree until it finds a valid ancestor element. Its actually defined in the reverse to that, &quot;<span style="color:rgb(0,0,0);font-family:&#39;Times New Roman&#39;;font-size:medium">The intent declared with xml:lang is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of xml:lang on another element within that content.&quot; - </span>- <a href="http://docs.oasis-open.org/dita/v1.1/OS/archspec/xmllang.html">http://docs.oasis-open.org/dita/v1.1/OS/archspec/xmllang.html</a><div><br></div><div>I believe that if an XML:lang value is expected, and no valid xml:lang attribute is set on a parent is set a default value is assumed, and I believe this is &#39;en:us&#39;, so in your example those strings would be &quot;America English&quot;.</div><div><br></div><div>Quite a while ago Olof and I put together some XPath/XSLT and XQuery gists that address this: <a href="http://bit.ly/Nx5oDb">http://bit.ly/Nx5oDb</a></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">--- Specificity is the soul of all good communication ---<br>--- When the game is over, the king and the pawn go into the same box ---<br>Find out more about me: <a href="http://about.me/legostormtroopr" target="_blank">http://about.me/legostormtroopr</a></div></div>
<br><div class="gmail_quote">On 10 December 2014 at 09:16, 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 all elements which are instances of<br>
<br>
{ddi:reusable:3_2}InternationalStringType<br>
<br>
must have one or more &lt;r:String&gt; elements. <br>
The field-level specification for InternationalStringType<br>
<br>
<a href="http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/FieldLevelDocumentation/schemas/reusable_xsd/complexTypes/StringType.html" target="_blank">http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/FieldLevelDocumentation/schemas/reusable_xsd/complexTypes/StringType.html</a><br>
<br>
states that<br>
<br>
&quot;Allows for non-formatted strings that may be translations <br>
from other languages, or that may be translatable into <br>
other languages. Only one string per language/location type <br>
is allowed. String contains the following attributes, <br>
xml:lang to designate the language, [...]&quot;<br>
<br>
However, the XML Schema for DDI-Lifecycle 3.2 allows<br>
the elements of r:InternationalStringType to have multiple &lt;r:String&gt;<br>
children without any xml:lang attributes designating language/country/etc.<br>
<br>
For instance, the following XML document is VALID<br>
with respect to DDI-Lifecycle 3.2 XML Schema,<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>
    xmlns:s=&quot;ddi:studyunit: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>
  &lt;r:URN&gt;urn:ddi:acme.org:another_ddi_instance:1&lt;/r:URN&gt;<br>
<br>
  &lt;s:StudyUnit&gt;<br>
    &lt;r:Agency&gt;<a href="http://acme.org" target="_blank">acme.org</a>&lt;/r:Agency&gt;<br>
    &lt;r:ID&gt;study_unit&lt;/r:ID&gt;<br>
    &lt;r:Version&gt;1&lt;/r:Version&gt;<br>
    <br>
    &lt;r:Citation&gt;<br>
      &lt;r:Title&gt;<br>
        &lt;!-- Use of @xml:lang is optional --&gt;<br>
        &lt;r:String&gt;voisi olla suomeksi&lt;/r:String&gt;<br>
        &lt;r:String&gt;could be in english too&lt;/r:String&gt;<br>
      &lt;/r:Title&gt;<br>
    &lt;/r:Citation&gt;<br>
    <br>
  &lt;/s:StudyUnit&gt;<br>
&lt;/ddi:DDIInstance&gt;<br>
---8&lt;---8&lt;---8&lt;---<br>
<br>
In the document above, the &lt;r:Title&gt; has two &lt;r:String&gt; elements,<br>
both in different language, but without any xml:lang attributes,<br>
sinsce the XML Schema does not require it.<br>
<br>
My question is then:<br>
<br>
Is it a bug in the XML Schema of r:InternationalStringType<br>
that it allows instances of &lt;r:String&gt; without xml:lang attribute?<br>
<br>
If not, which language/country should be assumed for such an element?<br>
Futhermore, when there are two or more &lt;r:String&gt; elements<br>
without the xml:lang attribute, which one of them should be used?<br>
<br>
It is possible to force xml:lang attribute for r:StringType.<br>
However, in my opinion, it might be more desirable to simply </p>
<p>use attribute &quot;lang&quot;  instead &quot;xml:lang&quot; for that purpose...<br>
<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></div>