// isReferenced flag if this entry exists in the immediate WSDL file.
Node node = entry.getNode();
if (addImports || node == null || node.getOwnerDocument() == doc) {
entry.setIsReferenced(true);
if (entry instanceof DefinedElement) {
BooleanHolder forElement = new BooleanHolder();
QName referentName = Utils.getTypeQName(node, forElement, false);
if (referentName != null) {
TypeEntry referent = getTypeEntry(referentName, forElement.value);
if (referent != null) {
setTypeReferences(referent, doc, literal);