aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
AgeCommit message (Collapse)Author
2014-12-26Preconfigured import of Subsurface CSV log fileGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Include tags on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Export total weight on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Store more cylinder information on manual CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Save info only from first cylinder on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Support quoting strings with "" on manual CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Include some empty fields if they are not availableGravatar Miika Turkia
If specific value is not available, we need to have an empty value instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Include empty location and gps if non is givenGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Take pressure info from first DC on CSV exportGravatar Miika Turkia
Try to grab pressure information from first DC if it is not manually entered. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Take depths from first DC on CSV exportGravatar Miika Turkia
We need to limit the DCs from which we grab the depths. Otherwise, we end up with too many depth values. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Grab divecomputer/temperature on CSV exportGravatar Miika Turkia
If temperature is recorded by a DC it must be taken from under the divecomputer tag. However, this will prefer the manually written value if such exists. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-21Add second CSV export with dive detailsGravatar Dirk Hohndel
This is intended to export all the details that someone might copy from a paper logbook. We need a matching import template to make this simple. This hasn't been well tested, I'm sure it will break when elements and attributes are missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20Add cylinder support to manual2xml XSLTGravatar Miika Turkia
This adds support for importing cylinder information from manually kept dive logs. However, this cannot be used before GUI counterpart is added. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20Add temperature support to manual2xml XSLTGravatar Miika Turkia
This adds support for importing temperatures from manually kept dive logs. However, this cannot be used before GUI counterpart is added. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20Fix a bug that added 0, 0 as location on manual CSV importGravatar Miika Turkia
The existence of location information was tested incorrectly resulting in erroneously adding these fields if they were not present. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-19Describe cylinder as unknown instead of mix nameGravatar Miika Turkia
Having the mix name like EANX34 as cylinder description was apparently confusing, so switching to 'unknown' instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-17Support cylinder information from Xdeep and Diving LogGravatar Miika Turkia
This adds support for importing cylinder information from at least Xdeep and Diving Log v 5.0. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-16Move the samples inside divecomputer tag on UDDF importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-14Fix event/alarm types in UDDF export.Gravatar Martin Long
UDDF only supports a specific set of alarms. Some events also don't map to alarms but map to other types of elements in UDDF. This patch adds a map of the accepted types. Where a map doesn't exist the type will not be mapped to an alarm, the option then remains to map it to another kind of element, in the same way that happened with headings and gas switches. This removes the need for the specific exclusion of heading and gas switch, as they are now simply not included in the map. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-14Count the weights properly on UDDF exportGravatar Miika Turkia
Using node() along with the node-set seems to grab the weights properly for me. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include weight system on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include dive buddies on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include dive location on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include notes on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Fix name for temperature sample on UDDF importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13UDDF import: check following event timeGravatar Miika Turkia
Seems that our UDDF export is adding time after the event name. Thus we need to add reading the following time as well. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include temperatures properly on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification and use proper tag name for air temperature. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include rating and visibility on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Grab manually added air temperature on UDDF exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include dive duration on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include dive number on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Fix switchmix references on UDDF exportGravatar Miika Turkia
The switchmix values must be concatenated properly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Fix mix reference on UDDF exportGravatar Miika Turkia
The mix value must be concatenated properly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Export leadquantity only when we have weightsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Export only used cylinders to divelogs.deGravatar Miika Turkia
This attempts to export only used cylinders to divelogs.de. The detection is based only on o2 percentage as per our test dives. However, the new cylinder id would be better, but that does not exist on old dives. Fixes #757 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Fix bug in tankpressurebegin in UDDF exportGravatar Martin Long
There was a bug when the first sample doesn't contain pressure info. This fixes that by selecting the first with pressure info. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Lots of minor UDDF export tweaks.Gravatar Martin Long
The XDS schema for UDDF is very sensitive to ordering of elements so I've rearranged many of them to match. Elements in: - informationbeforedive - waypoint Adjusted namespace of export to correct UDDF namespace. Updated remaining references to mixes it include prefix 'mix' Moved equipment from informationbeforedive to informationafterdive * Change trip ids to generated IDs and updated tripmembership to use the trip id instead of the name * * These constitutes a difference in XSD and the documentation. I will raise these issues with the author. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Various minor fixes to UDDF exportGravatar Martin Long
Removed underscore from buddy name elements Added 'mix' prefix to gas ids. Ids must not start with a number. Added mandatory profile data with empty tags. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Fix divecomputer part of UDDF exportGravatar Martin Long
XPath was incorrect for parsing divecomputers into the equipment section, meaning they dont get inserted. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Use generated Ids for site lookup in UDDF export.Gravatar Martin Long
As with buddies, sites could contain characters which are not valid in Ids. Also, it is very possible to have duplicate site names. This uses an XSL generated id to prevent any issues. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Use generated ids for buddies in UDDF export.Gravatar Martin Long
This is instead of using their names, which may contain illegal characters. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Update UDDF export <generator> header to include madatory tags.Gravatar Martin Long
Add name at <generator> level, and add additional <homepage> in contact tag. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Add 'trip' support to UDDF exportGravatar Martin Long
Currently repetition groups are used to group dives into trips. This is not really correct. Repetition groups should really represent a group of dives where tissue loading needs to be preserved between dives (typically the same day). UDDF has support for trips, using the <divetrip> tags. This is a bidirectional link between the dives and the trips. This patch adds support for these trips. However, it leaves in the repetition groups. Repetition groups may need further consideration. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Aggregate multiple weights into UDDF export.Gravatar Martin Long
Sum together all of the weights recored on a dive to use in the <leadquantity> tag in UDDF export. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Support buddies with only a first name, no surname.Gravatar Martin Long
The previous patch would not fill the first name field if there was no second name. This rectifies that. Signed-Off-By: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Allow more flexible GPS coordinates for CSV importGravatar Miika Turkia
This theoretically allows one to use format like 1°36'11.711"N 124°46'00.368"E for GPS coordinates. However, in practice this is not allowed without properly parsing this format in C/C++ side. This patch changes the export format to UTF8 and improves the location import by allowing either gps or location attributes to be imported. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Fixed airtemperature in UDDF export.Gravatar Martin Long
The XSLT didn't expect the temperature tag to be within the <divecomputer> element in the source, so the selection wasn't finding it. Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Added <leadquantity> to UDDF export, showing weight used.Gravatar Martin Long
Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Split last_name and first_name for buddies in UDDF exportGravatar Martin Long
Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Fix gasdefinitons in UDDF exportGravatar Martin Long
Selection of <cylinder> elements wasn't working where dives are part of a trip. Change the selection so that it will select all cylinders whether or not the dive is part of a trip. Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>