T5.0.18 空格有问题 这是怎么一回事?谢谢帮忙

tapestry2009 2009-01-21
2009-01-21 10:50:07,390 ERROR [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler] - Processing of request failed with uncaught exception: Failure parsing template context:ReBorn.tml: The entity "nbsp" was referenced, but not declared.
org.apache.tapestry5.ioc.internal.util.TapestryException: Failure parsing template context:ReBorn.tml: The entity "nbsp" was referenced, but not declared. [at context:ReBorn.tml, line 122, column 47]

我看了tml的122行 它是这样的
<div id="msgContainer">   &nbsp;&nbsp;   
......
</div>

t5.0.18 空格??莫名其妙  怎么回事 什么问题??
tapestry 2009-01-21
换一下DOCTYPE声明,具体哪个我不记得了,你试试。
tapestry2009 2009-01-21
哦 是哦 解决了 谢谢
lean1252 2009-02-28
  加上具体解释
Template Doctypes
if you want to use any HTML entities (such as &amp; &nbsp; &lt; &gt; or &copy;), you must use an HTML or XHTML doctype in your template. If you choose to use (X)HTML doctypes in your templates, they will be passed on to the client in the resultant (X)HTML. Note that if your pages are composed of multiple components, each with a template, and each template contains a doctype declaration, only the first doctype encountered by the template parser will be passed on to the client.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Global site tag (gtag.js) - Google Analytics