How to convert to XSLT
I have the following xslt:
<span><xsl:text disable-output-escaping="yes"><![CDATA[ Some text]]></xsl:text></span>
After the conversion, I get:
<span>&nbsp;Some text</span>
which displays as: and nbsp; Some text
I want to do and nbsp; like a cosmic character. I also tried changing disable-output-escaping to no, but that didn't help.
thanks for the help.
I think you should use  it because the object will most likely not be defined. And no CDATA.
Another possibility is to define an object nbspfor your xsl file:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet version="1.0" …
The other two answers are correct, but I decided to take a little look at this topic.
What Everyone Should Know About CDATA Partitions
CDATA - XML. , <span><![CDATA[ a & b < 2 ]]></span> <span> a & b < 2 </span>. XML- , XML- .
: CDATA .
<span><xsl:text disable-output-escaping="yes"><![CDATA[ Some text]]></xsl:text></span>
<span><xsl:text disable-output-escaping="yes">&nbsp;Some text</xsl:text></span>
, & & .
, disable-output-escaping
disable-output-escaping - , .. XML, XSLT- & < (, , ), . & <. , XML . XSLT <xsl:value-of> <xsl:text> disable-output-escaping, . :
- XSLT- , . escaping , XSLT- .
disable-output-escapingXSLT-. ( ), .- XSLT , , .
disable-output-escaping, . - XML, , XML.
disable-output-escaping, , .<xsl:element>.
<span><xsl:text disable-output-escaping="yes"><![CDATA[ Some text]]></xsl:text></span>
<span> Some text</span>
& , , , .
XML- , , , . XML 5 . :
&&<<>>""''
DTD , DTD, ( ). XML . (X) HTML DOCTYPE (, ), DTD XHTML DTD, . DTD: http://www.w3.org/TR/html4/HTMLlat1.ent, http://www.w3.org/TR/html4/HTMLsymbol.ent http://www.w3.org/TR/html4/HTMLspecial.ent.
. , , DTD. , . , , "". , , XML - . , . : - .
  ( ,   ). , , , @phihag. , , @Michael Krelin, DTD. XSLT-.
, XSLT- ,  . XSLT 1.0 disable-output-escaping, , .