// apply the filters
for (int i = 0, size = node.getFilters().size(); i < size
&& output != null; ++i)
{
Pair<String, String> nextFilter = filterStack.getLast();
Filter filter = context.getFilterMap().getFilter(
nextFilter.getFirst());
// TODO decide on what we should do if a bad filter was given
if (filter == null)
// if a bad filter, nothing gets written
output = null;
else
{
output = filter.filter(output, nextFilter.getSecond());
}
}
if (output != null)
finishString(output.toString());