private bool AllowJoinAndDod(QilNode nd) {
OptimizerPatterns patt = OptimizerPatterns.Read(nd);
// AllowJoinAndDod if this pattern is the descendant, descendant-or-self, content, preceding, following, or
// following-sibling axis, filtered by either an element name or a node kind test.
if (patt.MatchesPattern(OptimizerPatternName.FilterElements) || patt.MatchesPattern(OptimizerPatternName.FilterContentKind)) {
if (IsStepPattern(patt, QilNodeType.DescendantOrSelf) || IsStepPattern(patt, QilNodeType.Descendant) ||
IsStepPattern(patt, QilNodeType.Content) || IsStepPattern(patt, QilNodeType.XPathPreceding) ||
IsStepPattern(patt, QilNodeType.XPathFollowing) || IsStepPattern(patt, QilNodeType.FollowingSibling)) {
return true;
}
}
return false;
}