// here we use a namespaceTable to consider if the root element has any namespace information
//
NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
List list = NamespaceTable.getElementLineage(element);
Element rootElement = (Element)list.get(0);
namespaceTable.addElement(rootElement);
if (namespaceTable.isNamespaceEncountered())
{
// we assume that this is an XMLSchema style namespace aware document
result = getCMElementDeclaration(element, list, namespaceTable);