[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL and White Space help PLEASE

Subject: Re: XSL and White Space help PLEASE
From: "Michael Beddow" <mbnospam@xxxxxxxxxxx>
Date: Sat, 2 Jun 2001 21:45:34 +0100
insert space using xslt
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">&nbsp;</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>&#160;Aisle:&#160;</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>&#32</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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.