实体已被引用但未声明 [英] Entity was referenced but not declared
问题描述
在我使用tile的Spring MVC应用程序的xml文件中,我写了以下内容 -
In my xml file of Spring MVC application for using tiles, I have written the following -
<definition name="dashboard" extends="base.definition">
<put-attribute name="title" value="Dashboard - CMS ♦ ® Galactic NetOne" />
<put-attribute name="body" value="/WEB-INF/views/dashboard.jsp" />
</definition>
然而,& diams;和& reg;
给出它们被引用但未声明的错误。请帮忙。
However, ♦ and ®
give the error that they are referenced but not declared. Please help.
推荐答案
您需要声明这些实体,或者用十六进制或十进制等效替换它们。我假设字符应该是 diams
和 reg
;你可能需要改变它们。
You either need to declare those entities, or replace them with a hex or decimal equivalent. I'm assuming what the characters are supposed to be for diams
and reg
; you may need to change them.
声明实体的示例:
<!DOCTYPE definition [
<!ENTITY reg "®">
<!ENTITY diams "♦">
]>
<definition name="dashboard" extends="base.definition">
<put-attribute name="title" value="Dashboard - CMS ♦ ® Galactic NetOne" />
<put-attribute name="body" value="/WEB-INF/views/dashboard.jsp" />
</definition>
更换实体的示例:
<definition name="dashboard" extends="base.definition">
<put-attribute name="title" value="Dashboard - CMS ♦ ® Galactic NetOne" />
<put-attribute name="body" value="/WEB-INF/views/dashboard.jsp" />
</definition>
您可以使用XHTML DTD作为实体的参考:http://www.w3.org/TR/xhtml1/dtds.html#h-A2
You can use the XHTML DTDs as a reference for entities: http://www.w3.org/TR/xhtml1/dtds.html#h-A2
这篇关于实体已被引用但未声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!