[DDI-users] DDI 3.2: optional xml:lang attribute in StringType
Jani Hautamäki
Jani.Hautamaki at staff.uta.fi
Tue Dec 9 17:16:50 EST 2014
In DDI-Lifecycle 3.2 all elements which are instances of
{ddi:reusable:3_2}InternationalStringType
must have one or more <r:String> elements.
The field-level specification for InternationalStringType
http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/FieldLevelDocumentation/schemas/reusable_xsd/complexTypes/StringType.html
states that
"Allows for non-formatted strings that may be translations
from other languages, or that may be translatable into
other languages. Only one string per language/location type
is allowed. String contains the following attributes,
xml:lang to designate the language, [...]"
However, the XML Schema for DDI-Lifecycle 3.2 allows
the elements of r:InternationalStringType to have multiple <r:String>
children without any xml:lang attributes designating language/country/etc.
For instance, the following XML document is VALID
with respect to DDI-Lifecycle 3.2 XML Schema,
---8<---8<---8<---
<?xml version="1.0" encoding="utf-8"?>
<ddi:DDIInstance
xmlns:ddi="ddi:instance:3_2"
xmlns:r="ddi:reusable:3_2"
xmlns:s="ddi:studyunit:3_2"
>
<r:Agency>acme.org</r:Agency>
<r:ID>ddi_instance</r:ID>
<r:Version>1</r:Version>
<r:URN>urn:ddi:acme.org:another_ddi_instance:1</r:URN>
<s:StudyUnit>
<r:Agency>acme.org</r:Agency>
<r:ID>study_unit</r:ID>
<r:Version>1</r:Version>
<r:Citation>
<r:Title>
<!-- Use of @xml:lang is optional -->
<r:String>voisi olla suomeksi</r:String>
<r:String>could be in english too</r:String>
</r:Title>
</r:Citation>
</s:StudyUnit>
</ddi:DDIInstance>
---8<---8<---8<---
In the document above, the <r:Title> has two <r:String> elements,
both in different language, but without any xml:lang attributes,
sinsce the XML Schema does not require it.
My question is then:
Is it a bug in the XML Schema of r:InternationalStringType
that it allows instances of <r:String> without xml:lang attribute?
If not, which language/country should be assumed for such an element?
Futhermore, when there are two or more <r:String> elements
without the xml:lang attribute, which one of them should be used?
It is possible to force xml:lang attribute for r:StringType.
However, in my opinion, it might be more desirable to simply
use attribute "lang" instead "xml:lang" for that purpose...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.icpsr.umich.edu/pipermail/ddi-users/attachments/20141209/125eabf9/attachment.html
More information about the DDI-users
mailing list