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

[IATI] Repeated nested elements are flatted with no UID - meaning roundtripping is not possible #1224

Open
stevieflow opened this issue Sep 15, 2019 · 5 comments
Assignees
Labels

Comments

@stevieflow
Copy link
Member

(original discussion in #1219)

For IATI XML to spreadsheet conversions, when we have a instance of multiple uses of the same sub element, these are pushed to their own worksheet. A consequence of this is that it is not then possible to roundtrip this data back to XML - as we are missing any data to relate the sub element to its parent.

@Bjwebb suggests:

I think creating our own IDs that get ignored or namespaced by unflatten is probably the way to deal with this.

The types of instances where this occur would be:

  • a document-link with multiple document-category sub-elements
  • a result with multiple indicator

I think multi lingual instances are also affected by this, which would describe instances where any text has multiple versions (which is legitimate) :

  • a title with multiple narrative
@robredpath
Copy link
Member

@BibianaC BibianaC added the IATI label Sep 11, 2020
@stevieflow
Copy link
Member Author

I created #1310 as that specifically looks at result/indicator data

However, if this logic were applied to all relevant elements, then great

In terms of the namespace , then this would be :

xmlns:cove="https://iati.cove.opendataservices.coop/"

in

<iati-activities generated-datetime="2020-09-16T14:57:49.654Z" version="2.03" xmlns:cove="https://iati.cove.opendataservices.coop/">

and then for each instance:

cove:uid

eg:

<result type="1" cove:uid:"1">

@stevieflow
Copy link
Member Author

@rorads has been looking into this too - finding that inserting a column result/0/iati-identifier into a worksheet then "trick" (?) CoVE into consolidating different rows of results data into the same XML block (with the invalid element being inserted as the last element)

@stevieflow
Copy link
Member Author

When looking at how we can nest on conversion to XML @Bjwebb (link to PR?) has enabled support of a cove:id extension. Sample file (looking at results): https://docs.google.com/spreadsheets/d/1ZO1GgxzpRd0zBGV7iLd_saUIUYd_d7xyPySlv8zwdGQ/edit#gid=119826292

I guess we could look at inserting such an ID into XML, on demand?

Note - this does also alter the structure of spreadsheets, as activity-identifier is replaced by cove:id in various sheets. This will need some testing / thought

@Bjwebb
Copy link
Member

Bjwebb commented Dec 16, 2020

Flatten results with IDs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants