This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re:   vs  
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl]   vs  
- From: tcn at melvaig dot co dot uk (Trevor Nash)
- Date: Fri, 03 Aug 2001 19:16:46 GMT
- Organization: Melvaig Software Engineering Limited
- References: <20010803182749.7782.qmail@web14906.mail.yahoo.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
>Hi all,
>
>I am using   in my sheets to insert a whitespace-
>however, in Michael Kay's excellent book, I came
>across  . They look like they do the same thing,
>but which is a more standard way of inserting an
> in the resulting HTML?
>
They are exactly the same thing, i.e. the non-breaking space
character. I get the impression   is used more often, but I
would not lose sleep over it.
>Also, do you think doing the following approach is
>better than the previous ones?
>
><xsl:variable name="space">
><xsl:value-of select=" ' ' " />
></xsl:variable>
>
>Now use $space to insert up to one space character in
>the resulting HTML.
>
I hope you don't mean $space as an alternative to   or &#A0;. A
space (written ' ' or   or  ) is not the same character as a
non-breaking space (written   or &#A0;).
The other problem is you can't just say $space (or $nbsp) anywhere you
like. You may end up having to put <xsl:value-of select="$space"/>.
What you can do is put a DOCTYPE declaration at the top of your
stylesheet, and define in it. Then just write instead
of  . I'm sure this is in the FAQ somewhere - I'm not going to
write it from the top of my head as I'm bound to ge it wrong.
>I know this is not a very serious issue (meaning my
>implementation does not depend very heavily on the
>resolution of this issue) but any guidance will be
>greatly appreciated.
>
>Thanks,
>Cheers,
>Alan.
>
--
Traditional training & distance learning,
Consultancy by email
Melvaig Software Engineering Limited
voice: +44 (0) 1445 771 271
email: tcn@melvaig.co.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list