Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - dynamic evaluate() function >Thread Next - Re: dynamic evaluate() function Re: dynamic evaluate() functionTo: NULL Date: 1/6/2005 7:04:00 PM Bryan Ax wrote: > 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)"> > However, the dynamic version throws this error: > > at System.Xml.XPath.XPathSelectionIterator..ctor(XPathNavigator nav, > XPathExpression expr) Using script in XSLT is usable not portable between different XSLT processors, with MSXML you have an object model exposed to script that is quite different from the object model .NET exposes to script so that script function is not going to work in .NET, you will need to reimplement it. See the post <http://groups-beta.google.com/group/microsoft.public.xsl/msg/ed8e64ae58d6ea80> for some hints on the object model .NET exposes to script in XSLT. -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
