开发者

xslt unterminated string constant error

开发者 https://www.devze.com 2023-03-01 16:07 出处:网络
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 . Ho

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

精彩评论

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