SAXElementWriterUtil.writeEndElement(element, fragmentWriter);
}
}
private void addRootNamespaces(SAXElement element, ExecutionContext executionContext) {
NamespaceDeclarationStack nsDeclStack = NamespaceMappings.getNamespaceDeclarationStack(executionContext);
Map<String, String> rootNamespaces = nsDeclStack.getActiveNamespaces();
if (!rootNamespaces.isEmpty()) {
Set<Map.Entry<String,String>> namespaces = rootNamespaces.entrySet();
for (Map.Entry<String,String> namespace : namespaces) {
addNamespace(namespace.getKey(), namespace.getValue(), element);