Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: dynamic evaluate() function dynamic evaluate() functionTo: NULL Date: 1/6/2005 9:44:00 AM I found a sample suggested as a solution for doing dynamic xPath expressions in MSXML 3 - however, I'm having some trouble getting this to work in an XSLT with .NET version 1.1 The function is: function evaluate(context, expression) { return context.nextNode().selectNodes(expression); } I'm calling this via the following: <xsl:for-each select="dyn:evaluate($Loan, @xPath)"> <xsl:value-of select="_PrintPositionType">_/xsl:value-of> </xsl:for-each> Where $Loan is a global variable that defines the context of the item I want to search ("//LOAN"), and @xPath is the xPath I want to search on ("_APPLICATION/BORROWER"). This works fine if I hard it code with the following: <xsl:for-each select="$Loan/_APPLICATION/BORROWER"> However, the dynamic version throws this error: at System.Xml.XPath.XPathSelectionIterator..ctor(XPathNavigator nav, XPathExpression expr) at System.Xml.XPath.XPathNavigator.Select(XPathExpression expr) at System.Xml.Xsl.Processor.StartQuery(XPathNavigator context, Int32 key) at System.Xml.Xsl.ForEachAction.Execute(Processor processor, ActionFrame frame) at System.Xml.Xsl.ActionFrame.Execute(Processor processor) Any thoughts? Has the syntax for selecting nodes changed? Sincerely, Bryan Ax Software Developer Guardian Mortgage Documents | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
