throw new BuildException(MessageFormat.format(
Messages.getString("MarkupToDocbookTask.11"), docbookOutputFile, //$NON-NLS-1$
e.getMessage()), e);
}
try {
DocBookDocumentBuilder builder = new DocBookDocumentBuilder(writer) {
@Override
protected XmlStreamWriter createXmlStreamWriter(Writer out) {
return super.createFormattingXmlStreamWriter(out);
}
};
MarkupParser parser = new MarkupParser();
parser.setMarkupLanguage(markupLanguage);
parser.setBuilder(builder);
builder.setBookTitle(bookTitle == null ? name : bookTitle);
if (doctype != null) {
builder.setDoctype(doctype);
}
parser.parse(markupContent);
} finally {
try {
writer.close();