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

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -