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

Re: RE: need to show spaces

Subject: Re: RE: need to show spaces
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Thu, 14 Mar 2002 21:31:02 +0100
html show spaces
Don't look at the HTML with a browser, look at the HTML source and you will
see everything is OK. If you want to see more than 1 space even with the
browser, replace the spaces with non-breaking spaces:

<xsl.value-of select="translate(@val,' ', '&#160;')"/>

Regards,

Joerg

> Hi everyone,
>          I am facing a problem with XSL.
>
> I have in my XML
> <a>
>   <b val="11      22      33     44    55"></b>
>   <b val="aa      bb      cc     dd    ee"></b>
>   <b val="12      12      12     12    12"></b>
>   <b val="44      55      66     77    88"></b>
> </a>
>
> in my XSL i have
>    <table>
>       <xsl:for-each select="a/b">
>       <tr>
>         <td><xsl:value-of select="@val"/></td>
>       </tr>
>       </xsl:for-each>
>     </table>
>
> the output does not shows the spaces as they are. It just shows one space
> gap between them. I want the string to appear as it is without any
> formatting(trimming).
>
> I have put
> <xsl:preserve-space elements="a"/> in the XSL but doesnt make a diff.
>
> whats the way to overcome this problem?
>
> all help is appreciated
> thanks in advance
>
> regards,
> Anurag


 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.