Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


dynamic evaluate() function

From: "Bryan Ax" <bax@------------.--->
To: 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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent