From 4c193d7bdfbcb1ca755250df1873131d9709a9df Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Sun, 21 May 2023 23:43:15 +1200 Subject: [PATCH] Desktop: Rework the Summary CSV Export XSLT. Rework of the XSLT used to generate the Summary CSV export: - fixed a bug causing invalid CSV to be generated for double quotes (`""`); - changed quoting and escaping to be compliant with RFC 4180; - changed output to contain information for all cylinders for all dives (instead of limiting the number of cylinders to howevermany are used for the last dive); - added an index to the cylinder data headings; - changed unit designators to use `[]` instead of `()`; - some minor improvements to the XSLT. Signed-off-by: Michael Keller --- CHANGELOG.md | 1 + xslt/xml2manualcsv.xslt | 876 ++++++++++++++++++++-------------------- 2 files changed, 429 insertions(+), 448 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d10839f9..fad83cd27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +export: fix bug resulting in invalid CSV for '""' in 'CSV summary dive details' desktop: add support for multiple tanks to the profile ruler export: change format produced by 'CSV summary dive details' from TSV (tab separated) to CSV desktop: add function to merge dive site into site selected in list diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt index 8dbe04703..00d5779e4 100644 --- a/xslt/xml2manualcsv.xslt +++ b/xslt/xml2manualcsv.xslt @@ -6,197 +6,146 @@ - , - - + + + - - - - + + - - - - - - - - - - - - + + + + + - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - " - - " + + + - " - - " + + + - " - - " + + + - " - - " + + + + + + + + + + + + + + + + - " - - - - - - - - - " - "" - - "" + - - " - + + + - " + @@ -210,12 +159,8 @@ - - - - "" - + @@ -229,24 +174,14 @@ - - - - "" - + - - - - - - - - - " + + + @@ -255,59 +190,91 @@ - " - - " + + + + + - + - - + + - + - - - - " - - " - - - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + - " - - " - - " - - " - - " - - - + + + + + + + + + + + + - + @@ -318,61 +285,58 @@ - "" - - "" + + + + + + + + + + - " - - - - - - - " - - " - - - - - - - " + + + + + + + + + + - - - - "" - - - - - "" - - - - - "" - - " - - " + + + + + + + + + + + + + + + + + + + + + + + - " - - " - - - - "" - @@ -381,224 +345,240 @@ - - " - - - - - - - - + + + + + + + + + + + + - " - - " - - - - + + + - " - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - " - - - - - - - - - " - - " - - - - - - - - - " + + + + + + + + + + + + - - " - - - - - - - - - - - " - - - - - " - - - - - - - - - " - - " - - - - - - - - - " - - " - - - - - - - - - " - - " - - " - - " - - " - - - - - " - - " - - " - - " - - - - " - - - - + + + + + + + + + + + + + - " - - - - " - - - - - - " - - - - " - - - - - - " - - - - " - - - - - - " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - " - " - " - " - " - " - " - " - " - " - + + + + + + + + + + + +