datacite/schema — pull request #27 by pietsch (2012-06-30 23:43:15+00:00)
Title: 9 of 28 examples were invalid: they used 3-digit language codes

Surprisingly to me, XML Schema validation tools (I tried xmlstarlet and xmllint which are based on libxml2) complained about those example XML instances which used 3-digit language codes for the ```` element, e.g.:
```bash
[schema/www/meta/kernel-2.2]$ xmlstarlet val --err --xsd metadata.xsd example/datacite-metadata-sample-article-v2.2.xml
example/datacite-metadata-sample-article-v2.2.xml:20: element language: Schemas validity error : Element '{http://datacite.org/schema/kernel-2.2}language': 'eng' is not a valid value of the atomic type 'xs:language'.
example/datacite-metadata-sample-article-v2.2.xml - invalid
```
Of course, validators can be wrong, so I checked the relevant standards and technical recommendations. The current [XML Schema TR] (http://www.w3.org/TR/xmlschema-2/#language) refers to [RFC 3066](https://www.ietf.org/rfc/rfc3066.txt) which states:
```
2. When a language has both an ISO 639-1 2-character code and an ISO
639-2 3-character code, you MUST use the tag derived from the ISO
639-1 2-character code.
```
So I made the necessary changes to the example XML files that were reported as invalid. Unfortunately I cannot update the PDF documentation because their sources are not included (and you seem to use M$ Word).