Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Convert 'xml:lang' attribute to use namespace when performing Codelist checks #226

Merged
merged 3 commits into from
Nov 9, 2017

Conversation

hayfield
Copy link
Contributor

@hayfield hayfield commented Nov 8, 2017

This is a fix to the bug identified by @andylolz in #45 (comment) - Codelist validation would raise a key error for any dataset with an xml:lang attribute.

This is a specific fix to the xml:lang problem. It does not address the issues that the current code does not support custom namespaces (though this is a larger problem).

This causes a key error.

Originally noted in:
  #45 (comment)
The 'xml' namespace needs converting into the relevant URI.
This has been implemented as a single fix. A more general fix needs adding if mapping files are to support custom namespaces.
@hayfield hayfield added bug This issue identifies and details a bug. codelists Relating to IATI Codelists. validation Changes to validation functionality. labels Nov 8, 2017
@hayfield hayfield requested a review from a team November 8, 2017 09:08
This was referenced Nov 8, 2017
@hayfield hayfield added the complete A PR that is in a state that is ready for review. label Nov 8, 2017
@andylolz
Copy link
Contributor

andylolz commented Nov 8, 2017

Nice – this looks good to me (when I comment out the fix, the new test fails in the expected way – so looks like both test and fix are doing their jobs!)

Copy link
Contributor

@allthatilk allthatilk left a comment

Choose a reason for hiding this comment

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

Looks good!

@hayfield hayfield merged commit 1361bc4 into dev Nov 9, 2017
@hayfield hayfield deleted the xml-lang-tests branch November 9, 2017 10:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue identifies and details a bug. codelists Relating to IATI Codelists. complete A PR that is in a state that is ready for review. validation Changes to validation functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants