Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xsl:copy-of does not preserve disable-output-escaping

From: "Oleg Tkachenko [MVP]" <some@----.--->
To: NULL
Date: 2/6/2007 11:37:00 AM

shurik wrote:
> Thank you for your reply, 
> 
> It looks like <xsl:text>&_#_0_1_6_0_;</txsl:text> works for me (underscores 
> added to prevent encoding within the forum post)
> 
> But I am not sure I understand why and how it works. 
> What I need is to output the "No-Break Space" character to HTML (in the 
> manner I described anove, a temporary tree is generated first and then copied 
> to ouput). 

"No-Break Space" character code in Unicode is 0xA0 and &nbsp; is named 
entity reference which usually refers to that character. So instead of 
named reference, generating of which is troublesome in XSLT, you can use 
numeric character reference &#x_A_0; or &#0_1_6_0; (the same), that's it.

> Which encoding should I specify in XML declaration\xsl:output directives to 
> be sure it will work everywhere? Are there other possible issues with this 
> solution?

Document encoding doesn't matter, numeric character references refer to 
Unicode character code. It's safe, don't worry, everybody using &#1_6_0; 
instead of &nbsp;.

-- 
Oleg Tkachenko [XML MVP, MCPD]
http://blog.tkachenko.com | http://www.XmlLab.Net | http://www.XLinq.Net


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent