protected XMLStreamReader createTransformReaderIfNeeded(XMLStreamReader reader, InputStream is) {
if (inDropElements != null) {
Set<QName> dropElements = convertToSetOfQNames(inDropElements);
reader = StaxUtils.createFilteredReader(createNewReaderIfNeeded(reader, is),
new StaxStreamFilter(dropElements.toArray(new QName[]{})));
}
if (inElementsMap != null || inAppendMap != null) {
reader = new InTransformReader(createNewReaderIfNeeded(reader, is),
inElementsMap, inAppendMap);
}