class WriteNamespacesDirective implements TemplateDirectiveModel {
public void execute(Environment environment, Map params, TemplateModel[] templateModels, TemplateDirectiveBody templateDirectiveBody) throws TemplateException, IOException {
Writer writer = environment.getOut();
BeanModel modelBeanModel = (BeanModel) environment.getDataModel().get(FreeMarkerBeanWriter.MODEL_CTX_KEY);
Model model = (Model) modelBeanModel.getWrappedObject();
Map<String, String> namespaces = model.getNamespacePrefixMappings();
Set<Map.Entry<String, String>> nsEntries = namespaces.entrySet();
boolean addNewline = false;
SimpleScalar indentScalar = (SimpleScalar) params.get("indent");
int indent = 12;