Paramters:
            name -- element tag
            objid -- ID type, unique id
334640
def get_name(self, name, objid):
        '''
        
        '''
        if type(name) is tuple:
            return name

        ns = self.nspname
        n = name or self.pname or ('E' + objid)
        return ns,n
199453
def register_element_cls(tag, cls):
    
    nspfx, tagroot = tag.split(':')
    namespace = element_class_lookup.get_namespace(nsmap[nspfx])
    namespace[tagroot] = cls
509254
def oid(name)
      module_parts = name.to_str.split("::")
      if module_parts.length == 1
        parse_oid(@by_name, name.to_str)
      elsif module_parts.length == 2
        module_name = module_parts[0]
        oid = module_parts[1]
        module_hash = @by_module_by_name[module_name]
        if module_hash
          parse_oid(module_hash, oid)
        else
          raise ModuleNotLoadedError, "module '#{module_name}' not loaded"
        end
      else
        raise ArgumentError, "invalid format: #{name.to_str}"
      end
    end
727885
def name(self):
        
        return self.NAME_SEPARATOR.join([super(TaggedVertex, self).name] + self.get_tags_as_list_of_strings())
844513
def name(self):
        
        if hasattr(self._element, "name"):
            return self._element.name
        else:
            return str(self._element)
1063083
def generate_id(self, element):
        

        if not element.has_attribute('id'):
            element.set_attribute('id', self.prefix_id + str(self.count))
            self.count = self.count + 1
922383
function ( obj, dom ) {
		dom = ( dom === true );
		var id;

		if ( obj !== undefined && ( ( obj.id !== undefined && obj.id !== "" ) || ( obj instanceof Array ) || ( obj instanceof String || typeof obj === "string" ) ) ) {
			return obj;
		}

		if ( dom ) {
			do {
				id = utility.domId( utility.uuid( true) );
			}
			while ( utility.$( "#" + id ) !== undefined );
		}
		else {
			id = utility.domId( utility.uuid( true) );
		}

		if ( typeof obj === "object" ) {
			obj.id = id;

			return obj;
		}
		else {
			return id;
		}
	}
786108
def name(self):
        
        if self.m_name == -1 or (self.m_event != const.START_TAG and self.m_event != const.END_TAG):
            return u''

        return self.sb[self.m_name]
1310315
def getElementById(self, node, id, default=join):
        """"""
        attrget = self.getAttr
        ELEMENT_NODE = node.ELEMENT_NODE
        for child in node.childNodes:
            if child.nodeType == ELEMENT_NODE:
                if attrget(child, 'id') == id:
                    return child
        if default is not join:
            return default
        raise KeyError, name
1258381
def name(oid)
      current_oid = ObjectId.new(oid)
      index = []
      while current_oid.size > 1
        name = @by_oid[current_oid.to_s]
        if name
          return index.empty? ? name : "#{name}.#{index.join('.')}"
        end
        index.unshift current_oid.slice!(-1)
      end
      ObjectId.new(oid).to_s
    end
814154
def dom_id(self):
        """"""
        parameter = 'DOMID'
        if parameter not in self._by:
            self._populate(by=parameter)
        return self._by[parameter]
277479
def getParamsByName(elem, name):
	
	name = StripParamName(name)
	return elem.getElements(lambda e: (e.tagName == ligolw.Param.tagName) and (e.Name == name))
45854
function buildElementIdentifier(element) {
			if (element.id) {
				return `#${element.id}`;
			}
			let identifier = element.tagName.toLowerCase();
			if (!element.parentNode) {
				return identifier;
			}
			const siblings = getSiblings(element);
			const childIndex = siblings.indexOf(element);
			if (!isOnlySiblingOfType(element, siblings) && childIndex !== -1) {
				identifier += `:nth-child(${childIndex + 1})`;
			}
			return identifier;
		}
867943
function Element (tagName, props, children) {
  if (!(this instanceof Element)) {
    if (!_.isArray(children) && children != null) {
      children = _.slice(arguments, 2).filter(_.truthy)
    }
    return new Element(tagName, props, children)
  }

  if (_.isArray(props)) {
    children = props
    props = {}
  }

  this.tagName = tagName
  this.props = props || {}
  this.children = children || []
  this.key = props
    ? props.key
    : void 666

  var count = 0

  _.each(this.children, function (child, i) {
    if (child instanceof Element) {
      count += child.count
    } else {
      children[i] = '' + child
    }
    count++
  })

  this.count = count
}
1138040
def tag_name(cls, tag):
        """"""
        while isinstance(tag, etree._Element):
            tag = tag.tag
        return tag.split('}')[-1]
74282
def _parseTagName(self):
        
        for el in self._element.split():
            el = el.replace("/", "").replace("<", "").replace(">", "")

            if el.strip():
                self._tagname = el.rstrip()
                return
885219
def tag(self):
        
        name_or_id = self.task.tag
        if name_or_id is None:
            return defer.succeed(None)
        if isinstance(name_or_id, StringType):
            return defer.succeed(name_or_id)
        if isinstance(name_or_id, int):
            return self.task.connection.cache.tag_name(name_or_id)
        return defer.fail()