问题描述
在我用于使用磁贴的 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>
然而,♦和 ®
给出了它们被引用但未声明的错误.请帮忙.
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
这篇关于实体被引用但未声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!