From c0226380d929ca26d7aeb0fb60010570c217558d Mon Sep 17 00:00:00 2001 From: allthatilk Date: Fri, 1 Dec 2017 12:25:44 +0000 Subject: [PATCH 1/7] Update aid-type comment, add test data for optional vocabulary attribute --- .../aid-type/_vocabulary/attribute-exists.xml | 23 +++++++++++++++++++ .../aid-type/element-present-once.xml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tests/should-pass/iati-activities/iati-activity/transaction/aid-type/_vocabulary/attribute-exists.xml diff --git a/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/_vocabulary/attribute-exists.xml b/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/_vocabulary/attribute-exists.xml new file mode 100644 index 00000000..a2a10e6c --- /dev/null +++ b/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/_vocabulary/attribute-exists.xml @@ -0,0 +1,23 @@ + + + + + + Organisation name + + <narrative>Xxxxxxx</narrative> + + + Xxxxxxx + + + + + + + + 100 + + + + diff --git a/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/element-present-once.xml b/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/element-present-once.xml index f788f4f6..8458979a 100644 --- a/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/element-present-once.xml +++ b/tests/should-pass/iati-activities/iati-activity/transaction/aid-type/element-present-once.xml @@ -17,7 +17,7 @@ 100 - + From 95dbd9b26c9cd23234532f8a502320797775965d Mon Sep 17 00:00:00 2001 From: allthatilk Date: Fri, 1 Dec 2017 12:47:42 +0000 Subject: [PATCH 2/7] Add vocabulary attribute to transation aid-type --- iati-activities-schema.xsd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/iati-activities-schema.xsd b/iati-activities-schema.xsd index a8880dfd..1af1a16c 100644 --- a/iati-activities-schema.xsd +++ b/iati-activities-schema.xsd @@ -1397,6 +1397,7 @@ + @@ -2804,5 +2805,13 @@ + + + + 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. + + + + From eaba278034b0ed39b204a1a9ef9584c648907f9e Mon Sep 17 00:00:00 2001 From: allthatilk Date: Fri, 1 Dec 2017 12:50:44 +0000 Subject: [PATCH 3/7] Add test data for default-aid-type vocabulary attribute --- .../_vocabulary/attribute-exists.xml | 21 +++++++++++++++++++ ...-exists-with-required-subelements-only.xml | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/should-pass/iati-activities/iati-activity/default-aid-type/_vocabulary/attribute-exists.xml create mode 100644 tests/should-pass/iati-activities/iati-activity/default-aid-type/element-exists-with-required-subelements-only.xml diff --git a/tests/should-pass/iati-activities/iati-activity/default-aid-type/_vocabulary/attribute-exists.xml b/tests/should-pass/iati-activities/iati-activity/default-aid-type/_vocabulary/attribute-exists.xml new file mode 100644 index 00000000..80b94f9b --- /dev/null +++ b/tests/should-pass/iati-activities/iati-activity/default-aid-type/_vocabulary/attribute-exists.xml @@ -0,0 +1,21 @@ + + + + + + Organisation name + + <narrative>Xxxxxxx</narrative> + + + Xxxxxxx + + + + + + Some stuff ere + + + + diff --git a/tests/should-pass/iati-activities/iati-activity/default-aid-type/element-exists-with-required-subelements-only.xml b/tests/should-pass/iati-activities/iati-activity/default-aid-type/element-exists-with-required-subelements-only.xml new file mode 100644 index 00000000..b7779f3f --- /dev/null +++ b/tests/should-pass/iati-activities/iati-activity/default-aid-type/element-exists-with-required-subelements-only.xml @@ -0,0 +1,21 @@ + + + + + + Organisation name + + <narrative>Xxxxxxx</narrative> + + + Xxxxxxx + + + + + + Some stuff ere + + + + From d65fbc9266a2645bb381e0bb62579f3467e59c36 Mon Sep 17 00:00:00 2001 From: allthatilk Date: Fri, 1 Dec 2017 12:51:07 +0000 Subject: [PATCH 4/7] Add vocabulary attribute to default aid-type --- iati-activities-schema.xsd | 1 + 1 file changed, 1 insertion(+) diff --git a/iati-activities-schema.xsd b/iati-activities-schema.xsd index 1af1a16c..a0212e7d 100644 --- a/iati-activities-schema.xsd +++ b/iati-activities-schema.xsd @@ -512,6 +512,7 @@ + From 887a71ad3137a4f30c05eee9c5b45719028ee424 Mon Sep 17 00:00:00 2001 From: allthatilk Date: Wed, 6 Dec 2017 14:45:19 +0000 Subject: [PATCH 5/7] Extract aid-type-base for aid-types of activity schema --- iati-activities-schema.xsd | 60 ++++++++++++++------------------------ 1 file changed, 22 insertions(+), 38 deletions(-) diff --git a/iati-activities-schema.xsd b/iati-activities-schema.xsd index a0212e7d..aacd4496 100644 --- a/iati-activities-schema.xsd +++ b/iati-activities-schema.xsd @@ -492,7 +492,7 @@ - + The type of aid being supplied (project-type intervention, @@ -501,20 +501,6 @@ be overridden at the individual transaction level. - - - - - - - - A code from the OECD DAC CRS "Type of aid" codelist - - - - - - @@ -1379,7 +1365,7 @@ - + Optional element to override the top-level @@ -1387,20 +1373,6 @@ transaction-by-transaction basis if needed. - - - - - - - - A code from the OECD DAC CRS "Type of aid" codelist - - - - - - @@ -2806,13 +2778,25 @@ - - - - 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. - - - - + + + + + + + + A code from the OECD DAC CRS "Type of aid" codelist + + + + + + + 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. + + + + + From c0a2d84c5ff41fb84fbb9bfca3d7c25baa0e2750 Mon Sep 17 00:00:00 2001 From: allthatilk Date: Wed, 6 Dec 2017 14:53:11 +0000 Subject: [PATCH 6/7] Update code definition for aid-type-base --- iati-activities-schema.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iati-activities-schema.xsd b/iati-activities-schema.xsd index aacd4496..bacbf6d4 100644 --- a/iati-activities-schema.xsd +++ b/iati-activities-schema.xsd @@ -2785,7 +2785,7 @@ - A code from the OECD DAC CRS "Type of aid" codelist + A code from the specified vocabulary. From 511c664274b5f4b7c6893661d07109b8bc0f17d6 Mon Sep 17 00:00:00 2001 From: allthatilk Date: Wed, 6 Dec 2017 16:08:22 +0000 Subject: [PATCH 7/7] Make aid-type-base xsd:complexType name camel case for consistency --- iati-activities-schema.xsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iati-activities-schema.xsd b/iati-activities-schema.xsd index 84125397..ae07f0fc 100644 --- a/iati-activities-schema.xsd +++ b/iati-activities-schema.xsd @@ -488,7 +488,7 @@ - + The type of aid being supplied (project-type intervention, @@ -1348,7 +1348,7 @@ - + Optional element to override the top-level @@ -2761,7 +2761,7 @@ - +