createSelectorWithSomePartReplaced(ancestor,
toBeReplacedSelectorName, candidateSelector),
createSimpleSelectorWithSomePartReplaced(simpleSelector,
toBeReplacedSelectorName, candidateSelector));
} else if (selector instanceof DirectAdjacentSelectorImpl) {
SiblingSelector siblingSelector = (SiblingSelector) selector;
Selector ancestor = siblingSelector.getSelector();
SimpleSelector simpleSelector = siblingSelector
.getSiblingSelector();
return factory.createDirectAdjacentSelector(
Selector.SAC_DIRECT_ADJACENT_SELECTOR, ancestor,
simpleSelector);
} else if (selector instanceof CompositeSelector) {