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; }
/** * The argument MUST be an interned string or <code>null</code>. * * @param context */ public final void setFragmentContext(@Local String context) { this.contextName = context; this.contextNamespace = "http://www.w3.org/1999/xhtml"; this.contextNode = null; this.fragment = (contextName != null); this.quirks = false; }
/** * @see java.lang.Object#toString() */ @Override public @Local String toString() { return name; }
private int findLastInTableScopeTdTh() { for (int i = currentPtr; i > 0; i--) { @Local String name = stack[i].name; if ("td" == name || "th" == name) { return i; } else if (name == "table") { return TreeBuilder.NOT_FOUND_ON_STACK; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
/** * The argument MUST be an interned string or <code>null</code>. * * @param context */ public final void setFragmentContext(@Local String context) { this.contextName = context; this.contextNamespace = "http://www.w3.org/1999/xhtml"; this.contextNode = null; this.fragment = (contextName != null); this.quirks = false; }
private int findLastOrRoot(@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 0; }
protected void appendDoctypeToDocument(@Local String name, String publicIdentifier, String systemIdentifier) throws SAXException { }
private int findLastInTableScopeTdTh() { for (int i = currentPtr; i > 0; i--) { @Local String name = stack[i].name; if (stack[i].ns == "http://www.w3.org/1999/xhtml") { if ("td" == name || "th" == name) { return i; } else if (name == "table" || name == "template") { return TreeBuilder.NOT_FOUND_ON_STACK; } } } return TreeBuilder.NOT_FOUND_ON_STACK; }
protected ElementName(@Local String name) { this.name = name; this.camelCaseName = name; this.flags = TreeBuilder.OTHER | CUSTOM; }
/** * 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); }