IATI / CSV2IATI

[DEPRECATED ] - A tool to convert CSVs to IATI XML
Other
5 stars 4 forks source link

Empty rows add empty fields to the XML file #201

Closed rolfkleef closed 2 years ago

rolfkleef commented 10 years ago

If an uploaded CSV file has "empty rows" (only comma's), with model options "Multiple sector rows per activity" and "Multiple participating-org rows per activity" enabled, the resulting XML files has additional empty fields for each empty row:

<participating-org role="Funding"/>
<participating-org role="Implementing"/>
<sector vocabulary="DAC"/>

These empty fields do not show up in the preview and don't lead to validation errors, so unless you look at the XML itself, you won't notice.

Bjwebb commented 10 years ago

Thanks, this is a known issue https://github.com/IATI/CSV2IATI/issues/135

There's no quick fix for this, because the CSV2ITAI backend doesn't keep track of what data is supplied by the model, and what data is from the CSV. Fixing this bug would require the code to preserve this information until the XML generation step, and use it to avoid outputting the fixed values.

Closing as duplicate.

rolfkleef commented 10 years ago

Ok, are you sure it's a duplicate? In this case, the "empty rows" don't even have an IATI identifier, in fact no data at all. Might be easier to implement discarding such rows?

The resulting XML validates just fine, so it's a minor nuisance and maybe not worth the trouble. Maybe a bit harder on data consumers. Your call :-)

Bjwebb commented 10 years ago

@rolfkleef You're right it's not quite a duplicate, so I've reopened. I think this issue should be fixed if https://github.com/IATI/CSV2IATI/issues/135 is solved though (but not vice versa).