IATI / D-Portal

http://d-portal.org/
Other
30 stars 23 forks source link

Use document-link with application/iati-organisations+xml #678

Open xriss opened 4 weeks ago

xriss commented 4 weeks ago

It is possible that we could use the document-link element in an organisation file to link to other organisation files or activities flagged by the following mime types in the format attribute, which I believe are the correct mime types.

application/iati-organisations+xml
application/iati-activities+xml

NB: I picked the pluralised tag as that is the root element of these files.

This would not require any change to the Standard and the Registry API can be replaced by a single static root organisation file (presumably for the IATI organisation).

Initially this root file would contain document-links to all the published files (generated directly from registry data) but over time, it can slowly be reduced to only link to each publishers organisation file which is then responsible for linking to its own activities.

Publishers that do not update to this new use of organisation files can remain as links in the root organisation file until they do.

Not only would this be a zero API way of replacing the current Registry API but it can be slowly rolled out as people update their own organisation files to contain valid activity data links.

Anyone wanting to download IATI data would start with the root organisation file to find all the links to all the available files by scanning every organisation file linked from the root. These organisation files could link to more organisation files and so on and on for big publishers. This way, organisation files are discovered as a tree of links allowing for some hierarchy of publishers.

xriss commented 4 weeks ago

@stevieflow @robredpath

xriss commented 4 weeks ago

FYI list of all mimetypes currently used in top document links of activity or organisation

https://d-portal.org/dquery/#%0ASELECT%0A%0Axson-%3E'@format'%20as%20format%0A%0AFROM%20xson%20WHERE%20root='/iati-activities/iati-activity/document-link'%20OR%20root='/iati-organisations/iati-organisation/document-link'%0A%0AGROUP%20BY%201%20ORDER%20BY%201%0A%0A

In case you are worried about clashing with already published data or think it would be out of place

stevieflow commented 3 weeks ago

as people update their own organisation files to contain valid activity data links.

I think this could be a useful tactic, additionally if we also want to see the organisations.xml be a canonical source of organisation references (both of the "publisher" but also, potentially, the organisations cited in the activities)