/** * Test if this element has an attribute. <b>Case insensitive</b> * @param attributeKey The attribute key to check. * @return true if the attribute exists, false if not. */ public boolean hasAttr(String attributeKey) { Validate.notNull(attributeKey); if (attributeKey.startsWith("abs:")) { String key = attributeKey.substring("abs:".length()); if (attributes().hasKeyIgnoreCase(key) && !absUrl(key).equals("")) return true; } return attributes().hasKeyIgnoreCase(attributeKey); }
Attributes expect = getEnforcedAttributes(tagName); String attrKey = attr.getKey(); if (expect.hasKeyIgnoreCase(attrKey)) { return expect.getIgnoreCase(attrKey).equals(attr.getValue());