Determine whether an attribute is of type Ref. In case we
          have DTD(s) then this is simple, otherwise we use an
           heuristic: name Ref (upper or lowercase).
554419
def isRef(self, elem, attr):
        
        if elem is None: elem__o = None
        else: elem__o = elem._o
        if attr is None: attr__o = None
        else: attr__o = attr._o
        ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
        return ret
1063488
def has(self, name):
        
        for attr in self.attributes:
            if attr.name == name.strip():
                return True
        return False
359
def is_multiple_of(ref):
    
    def is_multiple_of_ref(x):
        if x % ref == 0:
            return True
        else:
            raise IsNotMultipleOf(wrong_value=x, ref=ref)
            # raise Failure('x % {ref} == 0 does not hold for x={val}'.format(ref=ref, val=x))

    is_multiple_of_ref.__name__ = 'is_multiple_of_{}'.format(ref)
    return is_multiple_of_ref
441462
static boolean isNameReferenced(Node node, String name) {
    return isNameReferenced(node, name, Predicates.alwaysTrue());
  }
1239341
def is_creation_model(instance, attribute, value):
    """"""

    creation_name = value.get('name')
    if not isinstance(creation_name, str):
        instance_name = instance.__class__.__name__
        err_str = ("'name' must be given as a string in the '{attr}' "
                   "parameter of a '{cls}'. Given "
                   "'{value}'").format(attr=attribute.name,
                                       cls=instance_name,
                                       value=creation_name)
        raise ModelDataError(err_str)
870090
def p_attr(self,t):
    
    # careful: sqex.infer_columns relies on AttrX not containing anything but a name
    t[0] = AttrX(NameX(t[1]), AsterX() if t[3]=='*' else NameX(t[3]))
749763
def get_attribute_references(instring):
    
    parsed = ConditionGrammar().conditions.parseString(instring)
    result = parsed if isinstance(parsed[0], str) else parsed[0]
    return result.attribute_reference.asList() if result.attribute_reference else []
1324780
def is_builtin_type(tp):
    
    return hasattr(__builtins__, tp.__name__) and tp is getattr(__builtins__, tp.__name__)
626009
public boolean definitelyMatchesAttributeName(String attributeName) {
    return getChild(0) instanceof RawTextNode
        && Ascii.equalsIgnoreCase(attributeName, ((RawTextNode) getChild(0)).getRawText());
  }
764072
private boolean isSetAttribute(PluralAttribute<? super X, ?, ?> attribute)
    {
        return attribute != null && attribute.getCollectionType().equals(CollectionType.SET);
    }
1220399
def from_format(self, attr):
        
        if attr.name_format:
            if self.name_format == attr.name_format:
                try:
                    return self._fro[attr.name.lower()]
                except KeyError:
                    pass
        else:  # don't know the name format so try all I have
            try:
                return self._fro[attr.name.lower()]
            except KeyError:
                pass

        return ""
97802
def hasAttribute(self, attrName):
        '''
            
        '''
        attrName = attrName.lower()

        # Check if requested attribute is present on this node
        return bool(attrName in self._attributes)
583604
def getAttributeQName(self, attribute):
        
        qname = self.getAttribute(attribute)
        if isinstance(qname, TypeDescriptionComponent) is True:
            return qname
        if qname is None:
            return None

        prefix,ncname = SplitQName(qname)
        namespace = self.getXMLNS(prefix)
        return TypeDescriptionComponent((namespace,ncname))
1000877
def match_ref(self, ref):
        
        if ref in self.refs:
            self._matched_ref = ref
            return True
        return False
987509
def isRef(self, doc, attr):
        
        if doc is None: doc__o = None
        else: doc__o = doc._o
        if attr is None: attr__o = None
        else: attr__o = attr._o
        ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
        return ret
34597
def convert_attrs_to_uppercase(obj: Any, attrs: Iterable[str]) -> None:
    
    for a in attrs:
        value = getattr(obj, a)
        if value is None:
            continue
        setattr(obj, a, value.upper())
1225062
public boolean isType(final String t) {
        final String dt = decode(t);
        if (dt.equals(getType())) {
            return true;
        }
        return "attribute".equals(getType())
                && dt.equalsIgnoreCase(getString());
    }