How to: Evaluate an XPath Expression
You can evaluate XPath expressions with the QuickWatch dialog box. The XPath expression must be valid according to the W3C XPath 1.0 recommendation. The current XSLT context—that is, the
self::node() node in the Locals window—provides the evaluation context for the XPath expression.
The following list describes which functions are supported when evaluating an XPath expression:
Built-in XPath functions are supported.
Built-in XSLT functions are not supported.
User-defined functions are not supported.
|The following procedure uses the belowAvg.xsl and books.xml files from the Walkthrough: Debug an XSLT Style Sheet topic.|
To evaluate an XPath expression
Insert a breakpoint at the
Click the Debug XSL button on the XML Editor toolbar.
The debugger starts and breaks on the
Right-click and select QuickWatch.
The QuickWatch dialog box is displayed.
./price/text()in the Expression field of the QuickWatch dialog box and click Reevaluate.
The price of the current book node appears in the Value box.
Change the XPath expression to
./price/text() < $bookAverageand click Reevaluate.
The Value box shows that the XPath expression evaluates to true.
Other ResourcesDebugging XSLT