'@param node: An xml node to be resolved.
@type node: L{sax.element.Element}
@param resolved: A flag indicating that the fully resolved type should be
returned.
@type resolved: boolean
@param push: Indicates that the resolved type should be
pushed onto the stack.
@type push: boolean
@return: The found schema I{type}
@rtype: L{xsd.sxbase.SchemaObject}'

def find(self, node, resolved=False, push=True):

    name = node.name
    parent = self.top().resolved
    if (parent is None):
        (result, ancestry) = self.query(name, node)
    else:
        (result, ancestry) = self.getchild(name, parent)
    known = self.known(node)
    if (result is None):
        return result
    if push:
        frame = Frame(result, resolved=known, ancestry=ancestry)
        pushed = self.push(frame)
    if resolved:
        result = result.resolve()
    return result
