开发者

xslt unterminated string constant error

for the expression

<h1 title="{title}:开发者_StackOverflow中文版 {short-description}">

if the title contains a single quote in the value, this throws unterminated string constant error . How can i fix this error?

Thanks in advance Alex.


You probably need to have that as

<h1 title="{title}: {short-description}">
    ... some value here for the h1 to display ...
</h1>

Alternatively you could do the following:

<xsl:element name="h1">
    <xsl:attribute name="title">
        {title}: {short-description}
    </xsl:attribute>
    ... some value here for the h1 to display ...
</xsl:element>

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜