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

Re:   vs  

Subject: Re:   vs  
From: tcn@xxxxxxxxxxxxx (Trevor Nash)
Date: Fri, 03 Aug 2001 19:16:46 GMT
160
>Hi all,
>
>I am using   in my sheets to insert a whitespace-
>however, in Michael Kay's excellent book, I came
>across &#xA0. 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 &#160; or &#A0;.  A
space (written ' ' or &#x20; or &#32;) is not the same character as a
non-breaking space (written &#160; 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 &nbsp; in it.  Then just write &nbsp; instead
of &#160;.  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@xxxxxxxxxxxxx

 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.