[eml-dev] xml:lang attribute for title in EML 2.1.0
ben leinfelder
leinfelder at nceas.ucsb.edu
Thu Sep 16 09:56:05 PDT 2010
Hi Markus,
I'm afraid your findings are accurate with respect to the xml:lang attribute in the <title> element (or any "NonEmptyStringType" element).
In the course of my experimentation with allowing backwards-compatible internationalization with a new EML version (2.1.1) I did have to include the "http://www.w3.org/XML/1998/namespace" namespace just as you did and also declare the xml:lang attribute in elements where I wanted to employ it.
While certain EML elements are repeatable, it's not always clear what the presence of multiple elements represent (are they translations in different languages or are they alternate titles?). In order to clarify this confusion and also allow multiple translations for non-repeatable elements I proposed a solution for allowing mixed element content for fields that should be internationalized. There's a fairly comprehensive discussion of this approach in our eml-dev archives: http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/eml-dev/2010-July/001828.html
I didn't get a lot of decisive feedback and so have not moved forward with releasing an updated EML version. Hopefully this thread will again set the ball rolling.
-ben
On Sep 16, 2010, at 5:34 AM, Markus Döring (GBIF) wrote:
> Hi,
> Ive been validating various eml documents with multiple, multilingual titles to the eml 2.1.0 schemas recently.
> With Xerces (java5/6 on mac), some unknown php processor and your own validation service at http://knb.ecoinformatics.org/emlparser/ I am getting the following validation errors:
>
> cvc-type.3.1.1: [attributes] of element 'title' must be empty, excepting those whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is one of type, nil, schemaLocation or noNamespaceSchemaLocation.
>
> Im using the sample document here:
> http://rs.gbif.org/schema/eml/sample.xml
>
>
> I always thought one can use the xml:lang attribute (actually any of the 4 xml namespace attributes) on any xml element. But looking at the latest xml namespace schema from 2009 it seems this is wrong and any schema that allows the use of xml:lang must properly declare the attribute:
> http://www.w3.org/2001/xml.xsd#ann_3
>
>
> I took the liberty to copy your schemas to our servers and modified the eml-resource.xsd, adding an xml namespace import and the lang attribute to the title element:
> http://rs.gbif.org/schema/eml/eml-2.1.0/eml-resource.xsd
> With this modified schema set the document validates.
>
> Have anyone of you used multilingual titles in eml before?
> I am assuming multiple titles with an xml:lang attribute should be supported in eml, at least it says so in the docs:
> http://knb.ecoinformatics.org/software/eml/eml-2.1.0/eml-resource.html#title
>
> If its a true bug, is there a chance to release an official new version or better a patch for the 2.1.0 namespace?
>
>
> Best wishes,
> Markus
>
>
>
> --
> Markus Döring
> Senior Developer ECAT
> GBIF Secretariat
> mdoering at gbif.org
>
> _______________________________________________
> Eml-dev mailing list
> Eml-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/eml-dev
More information about the Eml-dev
mailing list