IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

white space at the end of generated line Options · View
grossd
Posted: Friday, June 16, 2017 10:27:12 AM
Rank: Newbie

Joined: 6/16/2017
Posts: 4
Hi,

I am new to XSLT and created a transformation sheet that translates from xml to another format.

All works well, however i noticed that at the end of each emitted line there are a number of white spaces -- which could also be some hidden characters.

These generate an error when i input the generated file into another tool i am using.

I visualized in XML Spy editor all white spaces and EOL markers and there are no white spaces at the end of lines.

Also the strings i am emitting have no white spaces preprended. Yet, i get the same number of white spaces at the end of each line --


any thoughts what this might be and how i can get rid of them would be great.

thank you,

Daniel
grossd
Posted: Friday, June 16, 2017 11:14:44 AM
Rank: Newbie

Joined: 6/16/2017
Posts: 4
looks like its my on doing ...

I added this:  

it seems to create line feeds ..

is there a "softer" way to create new lines

thank you,

Daniel
K101
Posted: Friday, June 16, 2017 12:39:08 PM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 564
What, exactly, is your output format? Perhaps it specifies a method to specify a line break
grossd
Posted: Friday, June 16, 2017 12:42:54 PM
Rank: Newbie

Joined: 6/16/2017
Posts: 4
thank you.

I am using a complete clean slate as output format -- generating a text file.

The issues was indeed the hardcoded   which generated a "hard" LF. And ontop of that i noticed that i had two spaces infront of this code.

Instead i now use"
<xsl:text>
</xsl:text>

which resolved the problem.

thank you,

Daniel
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.