Namespace xlink = Namespace.getNamespace("xlink", "http://www.w3.org/1999/xlink");
this.invcat = Namespace.getNamespace("",
"http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0");
Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
Element el = new Element("catalog", invcat);
el.addNamespaceDeclaration(invcat);
el.addNamespaceDeclaration(xlink);
el.addNamespaceDeclaration(xsi);
String location = "http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0 "
+ "http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.1.0.2.xsd";
org.jdom.Attribute attr = new org.jdom.Attribute("schemaLocation", location, xsi);