Fix bug in subsurface XML to DivelogsDE XML export parsing. by vigge93 · Pull Request #4747 · subsurface/subsurface

Good find.

There are other places in this template where we are returning fractional numbers, that may or may not cause errors when importing in DivelogsDE.

I think it will be a better approach to set the global format for fractional numbers at the top of the file with

<xsl:decimal-format decimal-separator="."/>

From what I've found, the <xsl:decimal-format ... /> is only used in the format-number() function, and is only useful if the specified format follows a different format from the default for format-number(). Since we want the default (.), <xsl:decimal-format /> is not useful.

Also, I think this is the only place in the template where the value is actually converted to a number, the other values are substrings, and are treated as string throughout the transformation.