This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes white space problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "white space problem" Watch "white space problem" New topic
Author

white space problem

felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
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

Joined: Sep 05, 2003
Posts: 389
Did you try <xsl:text disable-output-escaping="yes"> ?
felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
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

Joined: Jul 12, 2004
Posts: 995
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.


blog - InfoQ.com
felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
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

 
GeeCON Prague 2014
 
subject: white space problem