[英]XSLT element in HTML element leads to errors
how can i realize something like this: 我如何实现这样的目标:
<img alt="logo" src="/Content/Images/Logos/<xsl:value-of select="/customer/country"/>.png" />
The XSLT processor throws an error because of the "<" - sign here... XSLT处理器由于“ <”而引发错误-在此处签名...
You can use: 您可以使用:
<img alt="logo" >
<xsl:attribute name="src">
/Content/Images/Logos/<xsl:value-of select="/customer/country"/>.png
</xsl:attribute>
</img>
Elements cannot be nested within attribute values. 元素不能嵌套在属性值内。 You can use {...} to embed XPath as follows:
您可以使用{...}嵌入XPath,如下所示:
<img alt="logo" src="/Content/Images/Logos/{/customer/country}.png" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.