def GetSchema(component):
 parent = component
 while (not isinstance(parent, XMLSchema)):
  parent = parent._parent()
 return parent

def GetSchema ( component ) : parent = component while ( not isinstance ( parent , XMLSchema ) ) : parent = parent . _parent ( ) return parent
convience function for finding the parent xmlschema instance .