/** * @param startTagToken * @return true if no id attribute or class attribute */ protected boolean isRemovingNodeReasonablySafe(TagNode startTagToken) { return !startTagToken.hasAttribute("id") && !startTagToken.hasAttribute("name") && !startTagToken.hasAttribute("class"); }
/** * * @param startTagToken * @return true if no id attribute or class attribute */ protected boolean isRemovingNodeReasonablySafe(TagNode startTagToken) { return !startTagToken.hasAttribute("id") && !startTagToken.hasAttribute("name") && !startTagToken.hasAttribute("class"); }
@Override public boolean hasAttribute(final String name) { return tagNode.hasAttribute(name); }
@Override public void addAttribute(final String name, final String value) { if (tagNode.hasAttribute(name)) { tagNode.removeAttribute(name); } tagNode.addAttribute(name, value); }
private void setAttribute(TagNode tagNode, String attrName, String attrValue) { if (tagNode.hasAttribute(attrName)) { tagNode.removeAttribute(attrName); } tagNode.addAttribute(attrName, attrValue); }
if (headElement.hasAttribute("prefix")) if (metaElement.hasAttribute("property")) target = "property"; else if (metaElement.hasAttribute("name")) target = "name";
if (cleanTimeValues.rootNode.hasAttribute("xmlns")) { cleanTimeValues.rootNode.addNamespaceDeclaration("", cleanTimeValues.rootNode.getAttributeByName("xmlns"));
if (startingTag.hasAttribute("xmlns")) { cleanTimeValues.namespace.pop(); if (startTagToken.hasAttribute("xmlns")) { boolean certainty = startTagToken.hasAttribute("id") ? false : true; properties.fireHtmlError(certainty, (TagNode) nodeList.get(lastTagPos.position), ErrorType.UnpermittedChild); List closed = closeSnippet(nodeList, lastTagPos, startTagToken, cleanTimeValues);
boolean certainty = startTagToken.hasAttribute("id") ? false : true; properties.fireHtmlError(certainty, (TagNode)nodeList.get(lastTagPos.position), ErrorType.UnpermittedChild); List closed = closeSnippet(nodeList, lastTagPos, startTagToken, cleanTimeValues);