uri = "##any"; //$NON-NLS-1$
}
if (uri.equals("##targetNamespace")) //$NON-NLS-1$
{
CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
result.add(cmDocument);
}
}
else if (uri.equals("##any") || uri.equals("##other")) //$NON-NLS-1$ //$NON-NLS-2$
{
String excludedURI = null;
if (uri.equals("##other")) //$NON-NLS-1$
{
CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
}
}
// in this case we should consider all of the schema related to this document
//
NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
namespaceTable.addElementLineage(element);
List list = namespaceTable.getNamespaceInfoList();
for (Iterator i = list.iterator(); i.hasNext();)
{
NamespaceInfo info = (NamespaceInfo)i.next();
if (info.uri != null && !info.uri.equals(excludedURI))
{
CMDocument document = xmlAssociationProvider.getCMDocument(info.uri, info.locationHint, "XSD"); //$NON-NLS-1$
if (document != null)
{
result.add(document);
}
}
}
}
else
{
CMDocument document = xmlAssociationProvider.getCMDocument(element, uri);
if (document != null)
{
result.add(document);
}
}