SelectorName replacement = rewrittenSelectors.get(operation.getSelectorName());
if (replacement == null) return operand;
return new LowerCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
}
if (operand instanceof UpperCase) {
UpperCase operation = (UpperCase)operand;
SelectorName replacement = rewrittenSelectors.get(operation.getSelectorName());
if (replacement == null) return operand;
return new UpperCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
}
if (operand instanceof NodeName) {
NodeName name = (NodeName)operand;
SelectorName replacement = rewrittenSelectors.get(name.getSelectorName());
if (replacement == null) return name;