This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: regarding newline
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 11 Jul 2002 11:47:52 +0100
- Subject: Re: [xsl] regarding newline
- References: <9723092BA4DBD111816D0000F6B093610C27E9E5@imsuklndsx1.lnd.uk.imshealth.com> <00ba01c21dc1$c4e01a70$1802893e@ROSEBUD> <1026382480.3d2d5a9085797@www.boltblue.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
] <!ENTITY space " "> <!-- space -->
160 is not space (32 is) 160 is no breaking space (nbsp in html)
> I did this so that i may just refer to them in my XSL like
> <xsl:value-of select = "@id"/> &space; <xsl:value-of select = "."/>
^^^^^^^^^^
That will produce three characters in the output.
a space a non-break space and a second space.
You would get exactly the same result with
<xsl:value-of select = "@id"/>   <xsl:value-of select = "."/>
> and try to do things like
> <xsl:value-of select = "@id"/> &newline;<xsl:value-of select = "."/>
^^^^^^^^^^^
> nothin seems to happen..
there the text node has two characters, a space and a newline character
so it is just as if you had done
<xsl:value-of select = "@id"/>
<xsl:value-of select = "."/>
and being a white space text node it is removed from the stylesheet.
Note that #160 is _not_ white space. You need to use xsl:text here.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list