}
}
// add the namespace declarations to current element
writer.pushExtensionNamespaces((String[])uris.toArray(new String[uris.size()]));
writer.openNamespaces(indexes.toArray(), prefs.toArray());
for (int i = 0; i < prefs.size(); i++) {
String prefix = prefs.get(i);
String name = prefix.length() > 0 ? "xmlns:" + prefix : "xmlns";
writer.addAttribute(0, name, writer.getNamespaceUri(indexes.get(i)));
}