Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new @vocabulary and @vocabulary-uri attributes for elements relating to aid-type #402

Merged
merged 9 commits into from
Dec 6, 2017
51 changes: 23 additions & 28 deletions iati-activities-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
</xsd:complexType>
</xsd:element>

<xsd:element name="default-aid-type">
<xsd:element name="default-aid-type" type="aidTypeBase">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The type of aid being supplied (project-type intervention,
Expand All @@ -477,19 +477,6 @@
be overridden at the individual transaction level.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A code from the specified vocabulary.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>

<xsd:element name="default-finance-type">
Expand Down Expand Up @@ -1309,27 +1296,14 @@
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="aid-type" minOccurs="0" maxOccurs="unbounded">
<xsd:element name="aid-type" type="aidTypeBase" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Optional element to override the top-level
default-aid-type element (debt relief, etc.) on a
transaction-by-transaction basis if needed.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A code from the OECD DAC CRS "Type of aid" codelist
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="tied-status" minOccurs="0" maxOccurs="1">
<xsd:annotation>
Expand Down Expand Up @@ -2683,6 +2657,27 @@
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>

<xsd:complexType name="aidTypeBase">
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A code from the specified vocabulary.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="vocabulary" type="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A code for the vocabulary aid-type classifications. If omitted the AidType (OECD DAC) codelist is assumed. The code must be a valid value in the AidTypeVocabulary codelist.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>

<xsd:complexType name="currencyType">
<xsd:annotation>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>

<iati-activities version="xx">
<iati-activity>
<iati-identifier></iati-identifier>
<reporting-org type="xx" ref="xx"><narrative>Organisation name</narrative></reporting-org>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For info, I've added an issue to fix the formatting of this line en masse before release: #403

<title>
<narrative>Xxxxxxx</narrative>
</title>
<description>
<narrative>Xxxxxxx</narrative>
</description>
<participating-org role="xx"></participating-org>
<activity-status code="xx"/>
<activity-date type="xx" iso-date="2013-11-27"/>
<activity-date type="xx" iso-date="2013-11-27">
<narrative>Some stuff ere</narrative>
</activity-date>
<default-aid-type code="xx" vocabulary="xx"/><!-- PASS: Optional attribute present -->
</iati-activity>
</iati-activities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>

<iati-activities version="xx">
<iati-activity>
<iati-identifier></iati-identifier>
<reporting-org type="xx" ref="xx"><narrative>Organisation name</narrative></reporting-org>
<title>
<narrative>Xxxxxxx</narrative>
</title>
<description>
<narrative>Xxxxxxx</narrative>
</description>
<participating-org role="xx"></participating-org>
<activity-status code="xx"/>
<activity-date type="xx" iso-date="2013-11-27"/>
<activity-date type="xx" iso-date="2013-11-27">
<narrative>Some stuff ere</narrative>
</activity-date>
<default-aid-type code="xx"/><!-- PASS: Optional element present with only required attributes -->
</iati-activity>
</iati-activities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>

<iati-activities version="xx">
<iati-activity>
<iati-identifier></iati-identifier>
<reporting-org type="xx" ref="xx"><narrative>Organisation name</narrative></reporting-org>
<title>
<narrative>Xxxxxxx</narrative>
</title>
<description>
<narrative>Xxxxxxx</narrative>
</description>
<participating-org role="xx"></participating-org>
<activity-status code="xx"/>
<activity-date type="xx" iso-date="2013-11-27"/>
<transaction>
<transaction-type code="xx"/>
<transaction-date iso-date="2010-07-07"/>
<value value-date="2010-07-07">100</value>
<aid-type code="xx" vocabulary="xx"/><!--PASS: Optional attribute present -->
</transaction>
</iati-activity>
</iati-activities>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<transaction-type code="xx"/>
<transaction-date iso-date="2010-07-07"/>
<value value-date="2010-07-07">100</value>
<aid-type code="xx"/><!--PASS: Optional element present once -->
<aid-type code="xx"/><!--PASS: Optional element present once with only required attributes -->
</transaction>
</iati-activity>
</iati-activities>