我的XSL中为什么不能使用“&”字符
Aon 2003-10-15 11:01:37 我查看了这个论坛的XSL,有如下的代码。
<xsl:attribute name="src">
http://www.csdn.net/adv/expert_ad2.asp?id=
<xsl:value-of select="Topic/Issue/TopicId" />
&roomid=
<xsl:value-of select="Topic/Issue/RoomId" />
</xsl:attribute
这个论坛能正常运行,但我的XSL中出现类似的代码时却报错,代码如下:
<xsl:attribute name="href">
userinfo.asp?id=<xsl:value-of select="response/user/id"/>&pagenumber=1
</xsl:attribute>
在IE中显示的错误为:“缺少分号”,在VS.net中检验XML架构,提示为:
"引用未声明的实体“pagenumber”"
在pagenumber后出现一个绿色的下划线,显然IE把"&"引导的pagenumber当成了HTML标记的转义字符了,但为什么这个论坛的XSL能这样使用,我的却不能使用呢?