xsl-defined functions (there is a miscellany and no Dayong)

1.增加命名空间
xmlns:msxsl=“urn:schemas-microsoft-com:xslt” xmlns:user=“MyScripts”>
2.编写函数
<msxsl:script language = “javascript” implements-prefix=“user”>
<![CDATA[
function sumNum(list)
{
if(!list || !list.length){
return 0.00;
}
var t = 0;
for(var i=0;i<list.length;++i){

}
   return list;
}

]]>
</msxsl:script>

3. Use function

4. Problems
result of unclear parameters passed (NodeSet) can not be used

Published 21 original articles · won praise 6 · views 30000 +

Guess you like

Origin blog.csdn.net/soulonlyhlh/article/details/103128387