From 4867363ec573f15326110f9affea1e7c046efed7 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Sat, 27 Jun 2015 23:38:11 +0200 Subject: Move model tagging to xslt Instead of replacing all the empty model tags after a csv to xml transform with some text, just produce that text in the csv to xml transform instead. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- file.c | 5 ----- xslt/csv2xml.xslt | 13 +++++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/file.c b/file.c index 816002eff..48936e259 100644 --- a/file.c +++ b/file.c @@ -927,11 +927,6 @@ int parse_csv_file(const char *filename, int timef, int depthf, int tempf, int p previous = dive_table.nr; ret = parse_xml_buffer(filename, mem.buffer, mem.size, &dive_table, (const char **)params); - // mark imported dives as imported from CSV - for (int i = previous; i < dive_table.nr; i++) - if (same_string(get_dive(i)->dc.model, "")) - get_dive(i)->dc.model = copy_string("Imported from CSV"); - free(mem.buffer); return ret; } diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 29ebbce24..b3dbc7a8d 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -42,12 +42,13 @@ - - - - - - + + + + + + + -- cgit v1.2.3-70-g09d2