private void popOnEof() throws SAXException { StackNode<T> node = stack[currentPtr]; assert clearLastStackSlot(); currentPtr--; markMalformedIfScript(node.node); elementPopped(node.ns, node.popName, node.node); node.release(); }
private void popOnEof() throws SAXException { StackNode<T> node = stack[currentPtr]; assert debugOnlyClearLastStackSlot(); currentPtr--; markMalformedIfScript(node.node); elementPopped(node.ns, node.popName, node.node); node.release(this); }
private void pushHeadPointerOntoStack() throws SAXException { assert headPointer != null; assert !fragment; assert mode == AFTER_HEAD; fatal(); silentPush(new StackNode<T>(ElementName.HEAD, headPointer // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] )); }
private void pushHeadPointerOntoStack() throws SAXException { assert headPointer != null; assert mode == AFTER_HEAD; fatal(); silentPush(createStackNode(ElementName.HEAD, headPointer // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] )); }
private Tokenizer newTokenizer(TokenHandler handler, boolean newAttributesEachTime) { if (errorHandler == null && transitionHandler == null && contentNonXmlCharPolicy == XmlViolationPolicy.ALLOW) { return new Tokenizer(handler, newAttributesEachTime); } ErrorReportingTokenizer tokenizer = new ErrorReportingTokenizer(handler, newAttributesEachTime); tokenizer.setErrorProfile(errorProfileMap); return tokenizer; }
private void startTagGenericRawText(ElementName elementName, HtmlAttributes attributes) throws SAXException { appendToCurrentNodeAndPushElementMayFoster(elementName, attributes); originalMode = mode; mode = TEXT; tokenizer.setStateAndEndTagExpectation(Tokenizer.RAWTEXT, elementName); }
private Tokenizer newTokenizer(TokenHandler handler, boolean newAttributesEachTime) { if (errorHandler == null && transitionHandler == null && contentNonXmlCharPolicy == XmlViolationPolicy.ALLOW) { return new Tokenizer(handler, newAttributesEachTime); } else { return new ErrorReportingTokenizer(handler, newAttributesEachTime); } }
private void pop() throws SAXException { StackNode<T> node = stack[currentPtr]; assert clearLastStackSlot(); currentPtr--; elementPopped(node.ns, node.popName, node.node); node.release(); }
private boolean annotationXmlEncodingPermitsHtml(HtmlAttributes attributes) { String encoding = attributes.getValue(AttributeName.ENCODING); if (encoding == null) { return false; } return Portability.lowerCaseLiteralEqualsIgnoreAsciiCaseString( "application/xhtml+xml", encoding) || Portability.lowerCaseLiteralEqualsIgnoreAsciiCaseString( "text/html", encoding); }
private boolean handleTag() throws SAXException { boolean stop = handleTagInner(); Portability.releaseString(content); content = null; Portability.releaseString(charset); charset = null; httpEquivState = HTTP_EQUIV_NOT_SEEN; return stop; }
/** * Returns the buffer as a local name. The return value is released in * emitDoctypeToken(). * * @return the buffer as local name */ private void strBufToDoctypeName() { doctypeName = Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner); clearStrBufAfterUse(); }
private void startTagScriptInHead(ElementName elementName, HtmlAttributes attributes) throws SAXException { // XXX need to manage much more stuff here if supporting document.write() appendToCurrentNodeAndPushElementMayFoster(elementName, attributes); originalMode = mode; mode = TEXT; tokenizer.setStateAndEndTagExpectation(Tokenizer.SCRIPT_DATA, elementName); }
private Tokenizer newTokenizer(TokenHandler handler, boolean newAttributesEachTime) { if (errorHandler == null && transitionHandler == null && contentNonXmlCharPolicy == XmlViolationPolicy.ALLOW) { return new Tokenizer(handler, newAttributesEachTime); } else { return new ErrorReportingTokenizer(handler, newAttributesEachTime); } }
private boolean annotationXmlEncodingPermitsHtml(HtmlAttributes attributes) { String encoding = attributes.getValue(AttributeName.ENCODING); if (encoding == null) { return false; } return Portability.lowerCaseLiteralEqualsIgnoreAsciiCaseString( "application/xhtml+xml", encoding) || Portability.lowerCaseLiteralEqualsIgnoreAsciiCaseString( "text/html", encoding); }
private void startTagGenericRawText(ElementName elementName, HtmlAttributes attributes) throws SAXException { appendToCurrentNodeAndPushElementMayFoster(elementName, attributes); originalMode = mode; mode = TEXT; tokenizer.setStateAndEndTagExpectation(Tokenizer.RAWTEXT, elementName); }
private Tokenizer newTokenizer(TokenHandler handler, boolean newAttributesEachTime) { if (errorHandler == null && transitionHandler == null && contentNonXmlCharPolicy == XmlViolationPolicy.ALLOW) { return new Tokenizer(handler, newAttributesEachTime); } else { return new ErrorReportingTokenizer(handler, newAttributesEachTime); } }
private void startTagTitleInHead(ElementName elementName, HtmlAttributes attributes) throws SAXException { appendToCurrentNodeAndPushElementMayFoster(elementName, attributes); originalMode = mode; mode = TEXT; tokenizer.setStateAndEndTagExpectation(Tokenizer.RCDATA, elementName); }
private Tokenizer newTokenizer(TokenHandler handler, boolean newAttributesEachTime) { if (errorHandler == null && transitionHandler == null && contentNonXmlCharPolicy == XmlViolationPolicy.ALLOW) { return new Tokenizer(handler, newAttributesEachTime); } else { return new ErrorReportingTokenizer(handler, newAttributesEachTime); } }