private int findLast(@Local String name) { for (int i = currentPtr; i > 0; i--) { if (stack[i].name == name) { return i; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
private int findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker( @Local String name) { for (int i = listPtr; i >= 0; i--) { StackNode<T> node = listOfActiveFormattingElements[i]; if (node == null) { return -1; } else if (node.name == name) { return i; } } return -1; }
private int findLast(@Local String name) { for (int i = currentPtr; i > 0; i--) { if (stack[i].ns == "http://www.w3.org/1999/xhtml" && stack[i].name == name) { return i; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
/** * @see java.lang.Object#toString() */ @Override public @Local String toString() { return name; }
/** * Reports a stray end tag. * @param name the name of the stray tag * * @throws SAXException */ private void errStrayEndTag(@Local String name) throws SAXException { err("Stray end tag \u201C" + name + "\u201D."); }
private void errStartTagInTableBody(@Local String name) throws SAXException { if (errorHandler == null) { return; } errNoCheck("\u201C" + name + "\u201D start tag in table body."); }
private void errHtmlStartTagInForeignContext(@Local String name) throws SAXException { if (errorHandler == null) { return; } errNoCheck("HTML start tag \u201C" + name + "\u201D in a foreign namespace context."); }
public @Local String getXmlnsLocalName(int index) { if (index < xmlnsLength && index >= 0) { return xmlnsNames[index].getLocal(mode); } else { return null; } }
private int findLastInListScope(@Local String name) { for (int i = currentPtr; i > 0; i--) { if (stack[i].name == name) { return i; } else if (stack[i].isScoping() || stack[i].name == "ul" || stack[i].name == "ol") { return TreeBuilder.NOT_FOUND_ON_STACK; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
private void errStartTagWithSelectOpen(@Local String name) throws SAXException { if (errorHandler == null) { return; } errNoCheck("\u201C" + name + "\u201D start tag with \u201Cselect\u201D open."); }
private void errStartTagInTable(@Local String name) throws SAXException { if (errorHandler == null) { return; } errNoCheck("Start tag \u201C" + name + "\u201D seen in \u201Ctable\u201D."); }
/** * Allocates a new local name object. In C++, the refcount must be set up in such a way that * calling <code>releaseLocal</code> on the return value balances the refcount set by this method. */ public static @Local String newLocalNameFromBuffer(@NoLength char[] buf, int length, Interner interner) { return new String(buf, 0, length).intern(); }
/** * Variant of <code>getLocalName(int index)</code> without bounds check. * @param index a valid attribute index * @return the local name at index */ public @Local String getLocalNameNoBoundsCheck(int index) { return names[index].getLocal(mode); }
private int findLastInScope(@Local String name) { for (int i = currentPtr; i > 0; i--) { if (stack[i].ns == "http://www.w3.org/1999/xhtml" && stack[i].name == name) { return i; } else if (stack[i].isScoping()) { return TreeBuilder.NOT_FOUND_ON_STACK; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
private void errBadStartTagInHead(@Local String name) throws SAXException { if (errorHandler == null) { return; } errNoCheck("Bad start tag in \u201C" + name + "\u201D in \u201Chead\u201D."); }
private void errEndTagViolatesNestingRules(@Local String name) throws SAXException { if (errorHandler == null) { return; } errNoCheck("End tag \u201C" + name + "\u201D violates nesting rules."); }
/** * Creator for use when the XML violation policy requires an attribute name * to be changed. * * @param name * the name of the attribute to create */ static AttributeName create(@Local String name) { return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); }
protected T createAndInsertFosterParentedElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form, T table, T stackParent // CPPONLY: , @Creator Object creator ) throws SAXException { return createAndInsertFosterParentedElement(ns, name, attributes, table, stackParent); };
protected T createAndInsertFosterParentedElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form, T table, T stackParent // CPPONLY: , @Creator Object creator ) throws SAXException { return createAndInsertFosterParentedElement(ns, name, attributes, table, stackParent); };
private void appendVoidElementToCurrent( @Local String name, HtmlAttributes attributes, T form) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // Can't be called for custom elements T elt = createElement("http://www.w3.org/1999/xhtml", name, attributes, fragment ? null : form); StackNode<T> current = stack[currentPtr]; appendElement(elt, current.node); elementPushed("http://www.w3.org/1999/xhtml", name, elt); elementPopped("http://www.w3.org/1999/xhtml", name, elt); }