if (JaWEManager.getInstance().getXPDLHandler().getXPDLRepositoryHandler().isXPDLPrefixEnabled()) {
List l = pkg.getNamespaces().toElements();
boolean hasxpdlns = false;
for (int i = 0; i < l.size(); i++) {
Namespace ns = (Namespace) l.get(i);
String nsn = ns.getName();
if (nsn.equals("xpdl")) {
hasxpdlns = true;
break;
}
}
if (!hasxpdlns) {
Namespaces nss = pkg.getNamespaces();
XPDLObjectFactory xpdlof = JaWEManager.getInstance().getXPDLObjectFactory();
Namespace ns = xpdlof.createXPDLObject(nss, "", false);
ns.setName("xpdl");
ns.setLocation("http://www.wfmc.org/2002/XPDL1.0");
nss.add(ns);
xpdlof.adjustXPDLObject(pkg, null);
changed = true;
}
}