'Default aid type' for Activity (v. 2.03)

Hey guys,

I have a question. I’m looking into the 2.03 documentation page for default-aid-type element for Activity and I can not understand the relationship between the “vocabulary” and “code” elements for this “default-aid-type” element.

If I understand everything correctly, for “default-aid-type” element, you have to specify a vocabulary code from the Aid Type Vocabulary codelist (it’s either 1 (OECD DAC), 2 (Earmarking Category) or 3 (Earmarking Modality)) and the the “code” attribute for this same “default-aid-type” is “A code from the specified vocabulary.”. So the ‘code’ attribute for this “default-aid-type” element has to come either from http://www.oecd.org/dac/stats/dacandcrscodelists.htm, from http://reference.iatistandard.org/202/codelists/EarmarkingCategory/ or from https://reliefweb.int/sites/reliefweb.int/files/resources/Grand_Bargain_final_22_May_FINAL-2.pdf.

My questions are:

  1. Am I right ?
  2. If yes, why the docs say that “the ‘code’ attribute for default-aid-type must be on the AidType codelist” ? I don’t understand this.
  3. Could someone give me a single proper XML example of Activity which has multiple ‘default-aid-type’ elements which would be according to the standard? I’m really surprised that this is so (over)complex and there is none in the documentation.

cheers,

1 Like

No, you don’t. If you don’t specify a vocabulary, OECD DAC is assumed. Or rather: the replicated version of the OECD DAC aid type codelist is assumed.

That’s right (but with the caveat above that the first one is actually the IATI replicated codelist and not the DAC source).

Basically yes!

Oh, good point. That’s an error. It’s a result of a mapping that should have been amended at v2.03. Specifically, this one should look more like this one, in that it should include a condition element that looks like this:

<condition>@vocabulary = '1' or not(@vocabulary)</condition>

I guess the @IATI-techteam should fix this as a bug.

So, something like this:

<iati-activity>
    …
    <default-aid-type code="A01" />
    <default-aid-type code="1" vocabulary="2" />
    …
</iati-activity>

This sets the default DAC aid type to A01 (General budget support) and the default earmarking category to 1 (Unearmarked).

1 Like

I’ve added a github issue that explains my above post a bit more succinctly.

1 Like

A big thanks for your help Andy, it’s much more clear now. I’m surprised though that this needs such a separate detailed explanation. In my humble opinion, all these things (or at least your example) should appear in the official documentation page for this element.

1 Like

There’s another bug here. You should only be allowed one <default-aid-type>. Otherwise it’s not a default

It’s marked as this on the IATI Summary Table: http://reference.iatistandard.org/202/activity-standard/summary-table/

This would be why the documentation only shows one example of having the <default-aid-type> image

It looks like these errors were introduced at 2.03 and when we added the other aid type vocabularies.

1 Like

Apologies, I forgot that this discussion took place: Add vocabularies to aid-type (included 2.03)

1 Like

Yes, exactly.

So to clarify: At v2.03, an activity is now allowed multiple default-aid-types. That’s in order to accommodate one default per vocabulary.

Max one default per vocabulary could be enforced with a ruleset rule, but it’s not enforceable at schema level.

The change was made here: https://github.com/IATI/IATI-Schemas/issues/350

In fact, @amys I’d suggest removing this post, because it’s potentially confusing.