internal bool Matches(XPathNavigator context, int key) {
// We don't use XPathNavigator.Matches() to avoid cloning of Query on each call
Query query = this.GetValueQuery(key, GetMatchesContext());
try {
bool result = query.MatchNode(context) != null;
RecycleMatchesContext();
return result;
} catch(XPathException) {
throw XsltException.Create(Res.Xslt_InvalidPattern, this.GetQueryExpression(key));
}
}