Project

Profile

Help

Support #6501

closed

Unexpected space at the beginning of each line (except the first) when exporting as csv

Added by Johan Gheys about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2024-08-09
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

When we export data as csv and declare the return type of a template or function, we believe an extra space is mistakenly added at the beginning of each line (except the first). The template without return type is the following:

   <xsl:template mode="export-ok" match="*">
      <xsl:value-of select="@*" separator=";"/>
      <xsl:value-of select="$EOL"/>
   </xsl:template>

and generates the correct output:

10;2024-08-09;season
11;2024-08-09;daily
12;2024-08-09;season

The template with return type is the following:

   <xsl:template mode="export-nok" match="*" as="xs:string*">
      <xsl:value-of select="@*" separator=";"/>
      <xsl:value-of select="$EOL"/>
   </xsl:template>

and generates the wrong output:

10;2024-08-09;season 
 11;2024-08-09;daily 
 12;2024-08-09;season

Attached you will find this simple test scenario.


Files

extra-space-character.zip (918 Bytes) extra-space-character.zip Johan Gheys, 2024-08-09 21:09

Please register to edit this issue

Also available in: Atom PDF