xsl-list
[Top] [All Lists]

Re: Using   in XSL HTML Output

2005-02-22 09:39:30
   But if you want an
  entity or character reference in your output:

    or  

  <![CDATA[&nbsp;]]> or <![CDATA[&#160;]]>


No!

They are equivalent input to
 &amp;&nbsp; ans &amp;#160;
respectively, and that's how they would be output in the xml and html
output methods (they would be output as &nbsp; and &#160; in the text
output method. (You could stop the ampersand being output as amp by using
disable-output-escaping if your system suppors thta, but taht is never
a good idea and almost always a sign that something is wrong with teh
stylesheet design)

The way to get an nbsp in html output is to get that character into the
result tree eg by going &#160; and using the html output method.
Most XSLT systems will output this character using the nbsp entity no
matter how it was input.

The way to get (say) &#160; output in the XML output method is to input
teh character as usual but output in an encoding (eg US-ASCII) that does
not have this character.

the faq for this list goes into this in more detail

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>