*
* @param session
* @return
*/
private static String createXMLNS(JcrSession session) {
JcrNamespaceRegistry registry = session.getWorkspace().getNamespaceRegistry();
String prefixes[] = registry.getPrefixes();
StringBuilder result = new StringBuilder();
for (String prefix : prefixes) {
if (prefix != null && prefix.length() > 0) {
if (result.length() > 0) {
result.append("\n");
}
result.append("xmlns:");
result.append(prefix);
result.append("=\"");
result.append(registry.getURI(prefix));
result.append("\"");
}
}
return result.toString();
}