}
}
private static String displayContainer(/*@NotNull*/ Container container) {
if (container instanceof Procedure) {
StructuredQName name = ((Procedure)container).getObjectName();
String objectName = (name==null ? "" : name.getDisplayName());
if (container instanceof Template) {
if (name == null) {
//NamePool pool = container.getExecutable().getConfiguration().getNamePool();
return "template match=\"" + ((Template)container).getMatchPattern().toString() + "\"";
} else {
return "template name=\"" + objectName + "\"";
}
} else if (container instanceof UserFunction) {
return "function " + objectName + "()";
} else if (container instanceof AttributeSet) {
return "attribute-set " + objectName;
} else if (container instanceof KeyDefinition) {
return "key " + objectName;
}
} else if (container instanceof GlobalVariable) {
StructuredQName qName = ((GlobalVariable)container).getVariableQName();
if (NamespaceConstant.SAXON_GENERATED_GLOBAL.equals(qName.getNamespaceURI())) {
return "optimizer-created global variable";
} else {
return "variable " + qName.getDisplayName();
}
} else {
return "";
}
return "";