language

iati-activities/iati-activity/document-link/language

This is the reference page for the XML element language. See also the relevant overview page: Related Documents

Definition

The ISO 639-1 language code in which target document is written, e.g. “en”. Can be repeated to describe multi-lingual documents.

Rules

This element may occur any number of times.

The time between budget/period-start/@iso-date and budget/period-end/@iso-date must not be over a year

If count(@lang) = 0 evaluates to true, then count(narrative/@lang) > 0 and (count(narrative) = count(narrative/@lang)) must evaluate to true.

If count(transaction/provider-org/@ref) = 0 evaluates to true, then count(transaction/provider-org/narrative) > 0 must evaluate to true.

If count(@default-currency) = 0 evaluates to true, then count(crs-add/loan-status/@currency) > 0 must evaluate to true.

If count(@default-currency) = 0 evaluates to true, then count(fss/forecast/@currency) > 0 must evaluate to true.

If count(transaction/receiver-org/@ref) = 0 evaluates to true, then count(transaction/provider-org/narrative) > 0 must evaluate to true.

If count(other-identifier/owner-org/@ref) = 0 evaluates to true, then count(other-identifier/owner-org/narrative) > 0 must evaluate to true.

If count(sector[@vocabulary=98 or @vocabulary=99]) > 0 evaluates to true, then count(sector/narrative) > 0 must evaluate to true.

@xml-lang must exist, otherwise all lang must exist.

sector must exist, otherwise all sector must exist.

@default-currency must exist, otherwise all currency must exist.

@last-updated-datetime must not be more recent than the current date

Each expression defined in number(recipient-country/@percentage) >= 0.0 must resolve to true.

Each expression defined in number(recipient-region/@percentage) >= 0.0 must resolve to true.

Each expression defined in number(sector/@percentage) >= 0.0 must resolve to true.

Each expression defined in number(capital-spend/@percentage) >= 0.0 must resolve to true.

All elements in sector[@vocabulary != '1']/@vocabulary are evaluated under the rules inside {u'strict_sum': {u'cases': [{u'paths': [u"sector[@vocabulary = '$1']/@percentage"], u'sum': 100}]}}.

Attributes

Example Usage

Example usage of language of a document-link in an iati-activity.
The @language attribute declares a valid code (en) from the Language codelist.
Note: This specifies the language of the document being linked to.
  <document-link format="application/vnd.oasis.opendocument.text" url="http:www.example.org/docs/report_en.odt">
   <title>
    <narrative>Project Report 2013</narrative>	   
    <narrative xml:lang="fr">Rapport de projet 2013</narrative>
   </title>
   <category code="A01" />
   <language code="en" />
  </document-link>
In some cases, a document-link may be in multiple languages. This is expressed by repeating the language element.
<document-link format="application/vnd.oasis.opendocument.text" url="http:www.example.org/docs/report.odt">
        <title>
                <narrative>Project Report 2013</narrative>
                <narrative xml:lang="fr">Rapport de projet 2013</narrative>
        </title>
        <category code="A01" />
        <language code="en" />
        <language code="fr" />
</document-link>

Changelog

2.01

Freetext is no longer allowed within this element.

In 2.01 this element usage rules were changed, to allow it to be repeated.

1.02

Addition of a @language element as a child of the document-link element: document-link/language/text() (0..1) - The ISO 639 code for the language of the document

Developer tools

Find the source of this documentation on github: