updateParams(filterParams);
try {
filter.open(rawDoc);
String subDocName = "";
while (filter.hasNext()) {
Event event = filter.next();
if (event.getEventType() == EventType.START_SUBDOCUMENT) {
StartSubDocument startSubDoc =
(StartSubDocument) event.getResource();
subDocName = stripPath(startSubDoc.getName());
} else if (event.getEventType() == EventType.TEXT_UNIT) {
TextUnit tu = (TextUnit) event.getResource();
if (!tu.getSource().isEmpty() && tu.isTranslatable()) {
String content = getTranslatableText(tu);
if (!content.isEmpty()) {
TextFlow tf =
new TextFlow(getIdFor(tu, content,