问题描述
我正在尝试创建由 &
符号分隔的变量赋值查询字符串(例如:"var1=x&var2=y&..."
).我打算将此字符串传递到嵌入式 Flash 文件中.
I am trying to create a query string of variable assignments separated by the &
symbol (ex: "var1=x&var2=y&..."
). I plan to pass this string into an embedded flash file.
我无法在 XSLT 中显示 &
符号.如果我只键入 &
而周围没有标记,则呈现 XSLT 文档时会出现问题.如果我输入 &
周围没有标签,那么文档的输出是 &
没有任何变化.如果我输入 <xsl:value-of select="&"/>
或 我也收到一个错误.这可能吗?注意:我也尝试过
&amp;
没有成功.
I am having trouble getting an &
symbol to show up in XSLT. If I just type &
with no tags around it, there is a problem rendering the XSLT document. If I type &
with no tags around it, then the output of the document is &
with no change. If I type <xsl:value-of select="&" />
or <xsl:value-of select="&" />
I also get an error. Is this possible? Note: I have also tried &amp;
with no success.
推荐答案
您可以将 disable-output-escaping
与 CDATA
部分结合起来.试试这个:
You can combine disable-output-escaping
with a CDATA
section. Try this:
<xsl:text disable-output-escaping="yes"><![CDATA[&]]></xsl:text>
这篇关于即使在转义字符后,也无法让 xslt 输出 (&)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!