filename = JaWEXMLUtil.dialog(getJaWEFrame(), message, 0, 0, null);
XPDLHandler xpdlh = null;
if (filename != null && filename.length() > 0) {
try {
xpdlh = JaWEManager.getInstance().createXPDLHandler(xpdlhmain.getXPDLRepositoryHandler());
Package pkg = xpdlh.openPackage(filename, true);
// do not allow insertion if package has the same Id as the main one,
// or as some of its external packages
Set mainPkgExtPkgIds = new HashSet(mainPkg.getExternalPackageIds());
boolean canInsert = true;
if (mainPkgExtPkgIds.contains(pkg.getId())) {