xslt - Passing a param for a apply-template select in xlst, .net -


i have following in xslt file:

<xsl:param name="predicate" select="//event" /> <xsl:apply-templates select="$predicate" /> 

and works fine, i'd change param .net code.

var args = new xsltargumentlist(); args.addparam("predicate", "", "//event[@valid]"); xmlviewer.transformargumentlist = args; 

but no matter pass in predicate, error "expression must evaluate node set."

is there way pass xpath selector transform?

args.addparam("predicate", "", "//event[@valid]"); 

you passing string stylesheet, stylesheet using predicate parameter node-set -- performs <xsl:apply-templates> on it.

the solution

evaluate xpath expression passing string. example, use select() method of xpathnavigator. pass parameter transformation resulting xpathnodeiterator.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -