如何使用xsl属性传递两个或多个参数? [英] How to pass two or more parameters using xsl attribute?
本文介绍了如何使用xsl属性传递两个或多个参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将XML转换为XSL文件,而需要调用Javascript函数。
Javascript函数如下:
函数切换(ID)
{
------ -
}
我这称之为:
I m transforming a XML into a XSL File, while there is a need to call a Javascript Function.
Javascript function is as follows:
function Toggle(ID)
{
-------
}
and I m calling this as follows:
<xsl:attribute name="onclick">
<xsl:text>Toggle(</xsl:text>
<xsl:value-of select="$i"/>
<xsl:text>)</xsl:text>
</xsl:attribute>
what if I have to pass two parameters instead??
viz. how can I call
function Toggle(ID1, ID2)
{
-----
}???
Currently i m doing this
<xsl:attribute name="onclick" xmlns:xsl="#unknown">
<xsl:text>Toggle(</xsl:text>
<xsl:value-of select="$i" />
<xsl:text>,ID)</xsl:text>
</xsl:attribute>
Is this right???
推荐答案
i / >
< xsl:text > )< / xsl:text >
< / xsl:attribute >
如果我必须传递两个参数呢?
即。如何调用
函数切换(ID1,ID2)
{
-----
} ???
目前正在执行此操作
< xsl:attribute < span class =code-attribute> name = onclick xmlns:xsl = #unknown >
< xsl:text > 切换(< / xsl:text >
< span class =code-keyword>< xsl:value-of 选择 =
i"/> <xsl:text>)</xsl:text> </xsl:attribute> what if I have to pass two parameters instead?? viz. how can I call function Toggle(ID1, ID2) { ----- }??? Currently i m doing this <xsl:attribute name="onclick" xmlns:xsl="#unknown"> <xsl:text>Toggle(</xsl:text> <xsl:value-of select="
i / < span class =code-keyword>>
< xsl :text > ,ID)< / xsl:text >
< / xsl:attribute >
这是对吗???
i" /> <xsl:text>,ID)</xsl:text> </xsl:attribute> Is this right???
这篇关于如何使用xsl属性传递两个或多个参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文