Utility method for fetching a required TagAttribute

@param localName
name of the attribute
@return TagAttribute if found, otherwise error
@throws TagException
if the attribute was not found
760893
protected final TagAttribute getRequiredAttribute(String localName) throws TagException
    {
        TagAttribute attr = this.getAttribute(localName);
        if (attr == null)
        {
            throw new TagException(this.tag, "Attribute '" + localName + "' is required");
        }
        
        return attr;
    }
112330
public boolean hasAttributeNS(String namespaceURI, String localName)
  {
    return DTM.NULL != dtm.getAttributeNode(node,namespaceURI,localName);
  }
1313144
public Tag use(String tagClassName, String tagBundleName, String tagBundleVersion, String fullname, int attrType) throws PageException {
	return use(tagClassName, tagBundleName, tagBundleVersion, fullname, attrType, null);
    }
725373
public boolean containsTagHandler(String ns, String localName)
    {
        if (containsNamespace(ns))
        {
            Map<String, TagHandlerFactory> map = _factories.get(ns);
            if (map == null)
            {
                return false;
            }
            return map.containsKey(localName);
        }
        else
        {
            return false;
        }
    }
1013928
public Object getAttribute(String domain, String beanName, String attributeName) throws Exception {
		return getAttribute(ObjectNameUtil.makeObjectName(domain, beanName), attributeName);
	}
744514
public static Element getElement(Element element, String tagName) {
		final NodeList nodeList = element.getElementsByTagName(tagName);
		if (nodeList == null || nodeList.getLength() < 1) {
			return null;
		}
		int length = nodeList.getLength();
		for (int i = 0; i < length; i++) {
			Element childEle = (Element) nodeList.item(i);
			if (childEle == null || childEle.getParentNode() == element) {
				return childEle;
			}
		}
		return null;
	}
352240
protected Element findTag(String tagName, Element element) {
        Node result = element.getFirstChild();
        
        while (result != null) {
            if (result instanceof Element
                    && (tagName.equals(((Element) result).getNodeName()) || tagName
                            .equals(((Element) result).getLocalName()))) {
                break;
            }
            result = result.getNextSibling();
        }
        
        return (Element) result;
    }
538882
function (domNode) {
                if (domNode.localName) {
                    return domNode.localName;
                }

                var localName = LocalNameCache[domNode.tagName];
                if (localName) {
                    return localName;
                }
                var st = domNode.tagName.split(":");

                LocalNameCache[domNode.tagName] = st[st.length - 1];


                return LocalNameCache[domNode.tagName];
            }
283838
public static Object getAttribute(String key) {
		Object value = localAttributeHolder.get().get(key);
		if(value == null) {
			value = inheritableAttributeHolder.get().get(key);
		}
		return value;
	}
1070150
protected Object fromXml(String xml, String tagName) throws Exception {
        Document document = XMLUtil.parseXMLFromString(xml);
        NodeList nodeList = document.getElementsByTagName(tagName);
        
        if (nodeList == null || nodeList.getLength() != 1) {
            throw new DOMException(DOMException.NOT_FOUND_ERR, "Top level tag '" + tagName + "' was not found.");
        }
        
        Element element = (Element) nodeList.item(0);
        Class<?> beanClass = getBeanClass(element);
        BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(beanClass);
        doParse(element, builder);
        DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
        factory.setParentBeanFactory(SpringUtil.getAppContext());
        AbstractBeanDefinition beanDefinition = builder.getBeanDefinition();
        factory.registerBeanDefinition(tagName, beanDefinition);
        return factory.getBean(tagName);
    }
325288
public boolean containsTagHandler(String ns, String localName)
    {
        return containsNamespace(ns) && _factories.containsKey(localName);
    }
838949
public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException
    {
        for (int i = 0; i < this.libraries.length; i++)
        {
            if (this.libraries[i].containsTagHandler(ns, localName))
            {
                return this.libraries[i].createTagHandler(ns, localName, tag);
            }
        }
        return null;
    }
169619
public static Literal getAttributeLiteral(Tag tag, String attrName) throws EvaluatorException {
	Attribute attr = tag.getAttribute(attrName);
	if (attr != null && attr.getValue() instanceof Literal) return ((Literal) attr.getValue());
	throw new EvaluatorException("attribute [" + attrName + "] must be a constant value");
    }
855637
private void required(String attributeName, String attributValue) throws ApplicationException {
	if (StringUtil.isEmpty(attributValue))
	    throw new ApplicationException("invalid attribute constellation for the tag zip", "attribute [" + attributeName + "] is required, if action is [" + action + "]");
    }
773498
public Element tagName(String tagName) {
        Validate.notEmpty(tagName, "Tag name must not be empty.");
        tag = Tag.valueOf(tagName, NodeUtils.parser(this).settings()); // maintains the case option of the original parse
        return this;
    }
585732
private boolean isLocalDita(final Attributes atts) {
        final String classValue = atts.getValue(ATTRIBUTE_NAME_CLASS);
        if (classValue == null
                || (TOPIC_IMAGE.matches(classValue))) {
            return false;
        }

        String scopeValue = atts.getValue(ATTRIBUTE_NAME_SCOPE);
        if (scopeValue == null) {
            scopeValue = ATTR_SCOPE_VALUE_LOCAL;
        }
        String formatValue = atts.getValue(ATTRIBUTE_NAME_FORMAT);
        if (formatValue == null) {
            formatValue = ATTR_FORMAT_VALUE_DITA;
        }

        return scopeValue.equals(ATTR_SCOPE_VALUE_LOCAL) && formatValue.equals(ATTR_FORMAT_VALUE_DITA);

    }
443511
private String getRequiredAttribute(Element node, String name) {
        String value = node.getAttribute(name);
        
        if (value.isEmpty()) {
            throw new IllegalArgumentException("Missing " + name + " attribute on node: " + node.getTagName());
        }
        
        return value;
    }