Subject: Re: XSL and White Space help PLEASE
From: "Michael Beddow" <mbnospam@xxxxxxxxxxx>
Date: Sat, 2 Jun 2001 21:45:34 +0100
|
This "roundabout" way is only necessary if your output is using (or your
browser assuming/enforcing) an encoding where 0x0A isn't a non-breaking
space. The real solution is to fix that encoding problem, then the
disable-output-escaping kludge isn't needed.
But what does belong in the FAQ over this white-space issue is a basic
point of technique. People who are outputting to html and having white
space preservation problems should mock up the output they are aiming
for *in html first* and try the result in a browser. You can tweak your
xml and your xslt till you're blue in the face, but if the resulting
html puts the white space you're hoping to see in places where a
browser is allowed or required to ignore or mimise it, your efforts will
be wasted.
Michael
-------------------------------------------------
Michael Beddow
http://www.mbeddow.net/
----- Original Message -----
From: "Piers Haken" <piersh@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, June 02, 2001 10:19 AM
Subject: RE: XSL and White Space help PLEASE
> Use:
>
> <xsl:text disable-output-escaping="yes"> </xsl:text>
>
> It seems a really round-about way of doing a simple, common task,
> doesn't it?
>
> Piers.
>
> -----Original Message-----
> From: Gutti, Sridhara [mailto:sgutti@xxxxxxxx]
> Sent: Friday, June 01, 2001 7:49 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: tweather@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: XSL and White Space help PLEASE
>
>
> This seems to work but it's outputting this character instead of a
white
> space.. A
> Am i missing some, thanks for your help..
> ~sri
>
> -----Original Message-----
> From: Theodore Weatherly [mailto:tweather@xxxxxxxxxxxxxxxxxxxx]
> Sent: Friday, June 01, 2001 9:35 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: XSL and White Space help PLEASE
>
>
> Space (using disable-output-escaping) should work, even in a table.
You
> can try using nsbp (#160) chars:
>
> <xsl:choose>
> <xsl:when test="@AISLE">
> <font size="3" color="#000000">
> <i><xsl:text> Aisle: </xsl:text></i><xsl:value-of
> select="@AISLE"/>
> </font>
> </xsl:when>
> </xsl:choose>
>
> Hope that helps
>
> -----Original Message-----
> From: Gutti, Sridhara [mailto:sgutti@xxxxxxxx]
> Sent: Friday, June 01, 2001 7:27 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: XSL and White Space help PLEASE
>
>
> I tried but it is not working, does it matter if I'm putting this in a
> table?
>
> -----Original Message-----
> From: Theodore Weatherly [mailto:tweather@xxxxxxxxxxxxxxxxxxxx]
> Sent: Friday, June 01, 2001 9:13 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: XSL and White Space help PLEASE
>
>
> Shridhar,
>
> Try:
>
> <xsl:text disable-output-escaping="yes"> </xsl:text>
>
> This seems like something that should be in the XSL FAQ.
>
> -----Original Message-----
> From: Gutti, Sridhara [mailto:sgutti@xxxxxxxx]
> Sent: Friday, June 01, 2001 7:07 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: XSL and White Space help PLEASE
>
>
>
> Folks,
>
> I'm trying to insert a white space using XSL, but I don't seem to get
it
> working, I'm using msxml3.0 and
> I Tried the following..
>
> <xsl:text> </xsl:text> and also
> <xsl:text> </xsl:text>
>
>
> Niether of those is working, can you guys help me please.. I just want
> to insert a space in the following example...
>
> thanks, sridhar.
>
>
>
> <xsl:choose>
> <xsl:when test="@AISLE">
> <xsl:text> </xsl:text>
> <font size="3" color="#000000">
> <i><xsl:text> Aisle: </xsl:text></i><xsl:value-of
> select="@AISLE"/>
> </font>
> </xsl:when>
> </xsl:choose>
>
> <xsl:choose>
> <xsl:when test="@BAY_NUM">
> <xsl:text> </xsl:text>
> <font size="3" color="#000000">
> <i><xsl:text> BayNum: </xsl:text></i><xsl:value-of
> select="@BAY_NUM"/>
> </font>
> </xsl:when>
> </xsl:choose>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- RE: XSL and White Space help PLEASE, (continued)
- Gutti, Sridhara - Fri, 1 Jun 2001 22:46:53 -0400 (EDT)
- Dimitre Novatchev - Sat, 2 Jun 2001 00:53:31 -0400 (EDT)
- Dimitre Novatchev - Sat, 2 Jun 2001 04:42:36 -0400 (EDT)
- Piers Haken - Sat, 2 Jun 2001 05:08:51 -0400 (EDT)
- Michael Beddow - Sat, 2 Jun 2001 16:41:27 -0400 (EDT) <=
- David Carlisle - Sun, 3 Jun 2001 14:42:47 -0400 (EDT)
- Clapham, Paul - Sat, 2 Jun 2001 16:25:35 -0400 (EDT)
- Gutti, Sridhara - Sat, 2 Jun 2001 16:37:47 -0400 (EDT)
- Piers Haken - Mon, 4 Jun 2001 06:32:55 -0400 (EDT)
|
|