RE: [xsl] How do i put whitespace character in xsl file

Subject: RE: [xsl] How do i put whitespace character in xsl file
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 31 May 2005 22:40:53 +0100
The term "whitespace" in XML generally means one of the four characters x9,
xA, xD, and x20. The term doesn't include other invisible characters such as
non-breaking-space (xA0) or zero-width-space. 

To include a non-breaking-space in your stylesheet (and therefore in the
output) use &#xa0; You can use &nbsp; if you like, but it's not a predefined
entity in XML, so you have to declare it in your DTD.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Frequent Fliers [mailto:frequent_fliers@xxxxxxxxxxx] 
> Sent: 31 May 2005 21:08
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] How do i put whitespace character in xsl file
> 
> hi all, i have the following snippet of code:
> <xsl:if test="attribute::*">(
>                   <xsl:for-each select="@*">
>                     <xsl:value-of select="name()" />:
>                     <xsl:value-of select="." />
>                   </xsl:for-each> )
>                 </xsl:if>
> Now, if i want to put a whitespace after the <xsl:value-of 
> select="." />, i 
> try &nbsp; but this just throws a syntax error.how can i 
> insert a white 
> space?
> thank you very much!
> 
> _________________________________________________________________
> Winks & nudges are here - download MSN Messenger 7.0 today! 
> http://messenger.msn.co.uk

Current Thread