'@param root: An XML root element.
@type root: L{Element}
@param definitions: A definitions object.
@type definitions: L{Definitions}'

def __init__(self, root, definitions):

    NamedObject.__init__(self, root, definitions)
    pmd = Metadata()
    pmd.wrappers = dict(element=repr, type=repr)
    self.__metadata__.__print__ = pmd
    tns = definitions.tns
    self.element = self.__getref('element', tns)
    self.type = self.__getref('type', tns)
