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

RE: XT, HTML, and &nsbp;

Subject: RE: XT, HTML, and &nsbp;
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Fri, 21 May 1999 11:14:05 -0600
html space nsbp
> If you input 
>           &amp;nbsp;
> then you are putting four characters into the text node of 
> the result tree
> but you just want one.
>          &#160;

Perhaps a more helpful explanation:

&#160; will put the literal non-breaking space character in the
result tree, like if you had a key on your keyboard where you 
could type a non-breaking space. The HTML output document that
is *derived from* the result tree will (or should, rather) have
this single character replaced with the full "&nbsp;" (5 chars).

This was the source of much confusion for me at first. You are
transforming a source tree into a result tree, and then telling
the XSLT processor that you'd like for a certain kind of output
to be derived from the result tree. The stylesheet is defining
the tree transformation, not the literal, formatted contents of
the result tree as they're intended to be output.

Your declaration of the HTML 4.0 URI for the result namespace is
telling the XSLT processor that you would *like* the result tree
to be output as an HTML 4.0 document, which means, more or less,
that the result tree that you've defined in terms of well-formed
HTML (i.e., XML) should be output as serialized text after the
- emits a <!DOCTYPE> prolog
- entifies certain characters like your non-breaking space,
- removes extraneous slashes from empty elements (like <br/>)
- removes unnecessary closing tags (like </li>)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.