The entity “nbsp” was referenced, but not declared

♀尐吖头ヾ 提交于 2019-12-08 04:09:24

You need to have the input declare the entities it uses, as done in http://xsltransform.net/gVhD8QR with e.g.

<!DOCTYPE test [
  <!ENTITY nbsp "&#160;">
]>
<test>The Spanish word for "Spain" is "Espa&nbsp;a" Dagon his Name, Sea Monster</test>

Note that the Spanish word for "Spain" is "España" however, so the example entity used there does not make sense there anyway.

You can escape the nbsp like this:

UPDATE try this:

<xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;

So you final code will look like:

<test>The Spanish word for "Spain" is "Espa<xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;a" Dagon his Name, Sea Monster</test>

If all else fails use this which is sure to work:

&#160;

Cheers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!