XSLT变量 [英] XSLT variable
问题描述
大家好.
我在Sharepoint Designer中使用了Dataview Webpart.
< xsl:variable name ="Rows" select ="/dsQuer yResponse/Rows/Row"/>
上面是默认创建的xsl:variable,它在变量"$ Rows"中具有查询.
现在,我在相同的表单上有几个文本框.
有没有办法根据文本框中的值动态创建xsl:variable.
我将基于在文本框中输入的文本来过滤dataview Webpart,因此我需要相应地创建xsl:variable.
如果存在解决方案,请提出建议.
行".
现在,我在相同的表单上有几个文本框.
有没有办法根据文本框中的值动态创建xsl:variable.
我将基于在文本框中输入的文本来过滤dataview Webpart,因此我需要相应地创建xsl:variable.
如果任何机构有解决方案,请提出建议.
取决于动态创建xsl:variable"的含义.您可以根据在文本框中输入的内容来更改节点选择路径.例如,在此选择:
/dsQueryResponse/Rows/Row
您可以使用文本框中的值动态选择其中的一部分:
/* [local-name()=
valueFromTextBox]/行/行
无论如何,都会发生类似的事情(不确定语法是否100%准确).关键是您可以使用local-name()
根据名称选择节点,然后可以将其与另一个变量进行比较.
>
Hi All.
I used Dataview Webpart in Sharepoint Designer.
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
The above is xsl:variable that is created by default which has query in the variable "$Rows".
Now i have couple of textboxes on the same form.
Is there way to create xsl:variable dynamically depending on the value in the textbox.
I am going to filter the dataview webpart based on the text entered in the textbox, so i need to create the xsl:variable accordingly.
Please sugget if any body has solution.
Rows".
Now i have couple of textboxes on the same form.
Is there way to create xsl:variable dynamically depending on the value in the textbox.
I am going to filter the dataview webpart based on the text entered in the textbox, so i need to create the xsl:variable accordingly.
Please sugget if any body has solution.
Depends on what you mean by "create xsl:variable dynamically". You can change the node selection path based on what is entered into a textbox. For example, in this select:
/dsQueryResponse/Rows/Row
You could dynamically choose part of that with the value from a textbox:
/*[local-name() =
valueFromTextBox]/Rows/Row
It would go something like that anyway (not sure if the syntax is 100% accurate). The key is that you uselocal-name()
to choose the node based on the name, which you can compare against another variable.
这篇关于XSLT变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!