Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

white space problem

 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have a problem while my data which is shown in csv format on the browser when it is saved in text format.

The functionality data is shown on the browser in csv format which
comes properly. but there is a Save button the page ,when i do save i use a javascript method to call the windows save dialog box i.e.(execomma..) and save in text format.

But when the csv data which s shown properly on the screen while getting saved does not get in the same format as displayed on the screen.

eg.
felx thomas,123,50.60,34,56.89

the above the example is displayed on the browser after saving in text format it becomes

felix
thomas,123,50.60,34,56.89

the display goes to second line in txt file becuase there is a space between felix and thomas , it happens in those names only where there is a space between names.

I tried using xsl utput method="text" indent="yes"/>
but since i have a save button to be displayed it does not get displayed.
<xsl:text> works fine if hard core values inside it. but u cannot use another syntax inside xsl:text so it does not work out.

cann anyone help me out please.









 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try <xsl:text disable-output-escaping="yes"> ?
 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried that too

here is the xsl code below

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:include href = "FormatDate.xsl"/>
<xsl:include href = "selection.xsl"/>
<xsl:variable name="vargrouping" select="//Filters/grouping"/>
<xsl utput method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="MainPage">
<html>
<head>
</head>

<table>
<
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I am not quite sure if a space there can trigger a newline in fact. It may be a "disguised" newline :-). You also can try to put inside "" the strings where you think you can have blanks.
 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any way to make the browser understand that space is not a new line character and hard cord it if wanted when the browser should consider it a new line

please its urgent

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic