开发者

Assigning Value to XSLT variable is not working

开发者 https://www.devze.com 2023-03-21 11:57 出处:网络
A little strange issue I am facing, When assigning in one line it is working but when in multiple lines it is not working

A little strange issue I am facing, When assigning in one line it is working but when in multiple lines it is not working

Working code


<xsl:variable name="detail" select="utils:DecodeCDATA($addNode2Detail)" />

N开发者_如何学Pythononworking code


<xsl:variable name="detail">

<xsl:valueof select="utils:DecodeCDATA($addNode2Detail)">

</xsl:variable>

Please Suggest what can be the reason!!


Without knowing more, it's very hard to tell. The two variable declarations are NOT equivalent: one binds the variable to a result tree fragment (that is, a document node), while the other binds it to whatever your function utils:DecodeCDATA returns (a string, perhaps?)

You need to tell us more about what the function is doing, more about how you are using the variable, and more about what exactly you mean when you say it doesn't work.


There are a couple of typos in the line:

<xsl:valueof select="utils:DecodeCDATA($addNode2Detail)">

try updating it to:

<xsl:value-of select="utils:DecodeCDATA($addNode2Detail)"/>
0

精彩评论

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

关注公众号