<div dir="ltr">In cases where an XML:lang is optional to determine the 'implied language" it cascades up the XML tree until it finds a valid ancestor element. Its actually defined in the reverse to that, "<span style="color:rgb(0,0,0);font-family:'Times New Roman';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." - </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 'en:us', so in your example those strings would be "America English".</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"><<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="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 <r:String> 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>
"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, [...]"<br>
<br>
However, the XML Schema for DDI-Lifecycle 3.2 allows<br>
the elements of r:InternationalStringType to have multiple <r:String><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<---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>
><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>
<r:URN>urn:ddi:acme.org:another_ddi_instance:1</r:URN><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>
<!-- Use of @xml:lang is optional --><br>
<r:String>voisi olla suomeksi</r:String><br>
<r:String>could be in english too</r:String><br>
</r:Title><br>
</r:Citation><br>
<br>
</s:StudyUnit><br>
</ddi:DDIInstance><br>
---8<---8<---8<---<br>
<br>
In the document above, the <r:Title> has two <r:String> 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 <r:String> 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 <r:String> 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 "lang" instead "xml:lang" 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>