HtmlAttributes emptyAttributes() { // [NOCPP[ if (newAttributesEachTime) { return new HtmlAttributes(mappingLangToXmlLang); } else { // ]NOCPP] return HtmlAttributes.EMPTY_ATTRIBUTES; // [NOCPP[ } // ]NOCPP] }
HtmlAttributes emptyAttributes() { // [NOCPP[ if (newAttributesEachTime) { return new HtmlAttributes(mappingLangToXmlLang); } else { // ]NOCPP] return HtmlAttributes.EMPTY_ATTRIBUTES; // [NOCPP[ } // ]NOCPP] }
HtmlAttributes emptyAttributes() { // [NOCPP[ if (newAttributesEachTime) { return new HtmlAttributes(mappingLangToXmlLang); } else { // ]NOCPP] return HtmlAttributes.EMPTY_ATTRIBUTES; // [NOCPP[ } // ]NOCPP] }
public void initializeWithoutStarting() throws SAXException { confident = false; strBuf = null; line = 1; // CPPONLY: attributeLine = 1; // [NOCPP[ metaBoundaryPassed = false; wantsComments = tokenHandler.wantsComments(); if (!newAttributesEachTime) { attributes = new HtmlAttributes(mappingLangToXmlLang); } // ]NOCPP] resetToDataState(); }
public HtmlAttributes cloneAttributes() throws SAXException { assert (length == 0 && xmlnsLength == 0 ) || mode == 0 || mode == 3; HtmlAttributes clone = new HtmlAttributes(0); for (int i = 0; i < length; i++) { clone.addAttribute(names[i], values[i] , XmlViolationPolicy.ALLOW ); } for (int i = 0; i < xmlnsLength; i++) { clone.addAttribute(xmlnsNames[i], xmlnsValues[i], XmlViolationPolicy.ALLOW); } return clone; // XXX!!! }
public HtmlAttributes cloneAttributes(Interner interner) throws SAXException { assert (length == 0 && xmlnsLength == 0 ) || mode == 0 || mode == 3; HtmlAttributes clone = new HtmlAttributes(0); for (int i = 0; i < length; i++) { clone.addAttribute(names[i], values[i] , XmlViolationPolicy.ALLOW ); } for (int i = 0; i < xmlnsLength; i++) { clone.addAttribute(xmlnsNames[i], xmlnsValues[i], XmlViolationPolicy.ALLOW); } return clone; // XXX!!! }
public HtmlAttributes cloneAttributes(Interner interner) throws SAXException { assert (length == 0 && xmlnsLength == 0) || mode == 0 || mode == 3; HtmlAttributes clone = new HtmlAttributes(0); for (int i = 0; i < length; i++) { clone.addAttribute(names[i].cloneAttributeName(interner), Portability.newStringFromString(values[i]) // [NOCPP[ , XmlViolationPolicy.ALLOW // ]NOCPP] ); } // [NOCPP[ for (int i = 0; i < xmlnsLength; i++) { clone.addAttribute(xmlnsNames[i], xmlnsValues[i], XmlViolationPolicy.ALLOW); } // ]NOCPP] return clone; // XXX!!! }
private void attributeNameComplete() throws SAXException { // if (strBufOffset != -1) { // attributeName = AttributeName.nameByBuffer(buf, strBufOffset, // strBufLen, namePolicy != XmlViolationPolicy.ALLOW); // } else { attributeName = AttributeName.nameByBuffer(strBuf, 0, strBufLen // [NOCPP[ , namePolicy != XmlViolationPolicy.ALLOW // ]NOCPP] , interner); // } if (attributes == null) { attributes = new HtmlAttributes(mappingLangToXmlLang); } /* * When the user agent leaves the attribute name state (and before * emitting the tag token, if appropriate), the complete attribute's * name must be compared to the other attributes on the same token; if * there is already an attribute on the token with the exact same name, * then this is a parse error and the new attribute must be dropped, * along with the value that gets associated with it (if any). */ if (attributes.contains(attributeName)) { errDuplicateAttribute(); attributeName.release(); attributeName = null; } }
private void attributeNameComplete() throws SAXException { attributeName = AttributeName.nameByBuffer(strBuf, strBufLen, interner); if (attributeName == null) { // [NOCPP[ attributeName = AttributeName.createAttributeName( Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner), namePolicy != XmlViolationPolicy.ALLOW); // ]NOCPP] // CPPONLY: nonInternedAttributeName.setNameForNonInterned(Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner)); // CPPONLY: attributeName = nonInternedAttributeName; } clearStrBufAfterUse(); if (attributes == null) { attributes = new HtmlAttributes(mappingLangToXmlLang); } /* * When the user agent leaves the attribute name state (and before * emitting the tag token, if appropriate), the complete attribute's * name must be compared to the other attributes on the same token; if * there is already an attribute on the token with the exact same name, * then this is a parse error and the new attribute must be dropped, * along with the value that gets associated with it (if any). */ if (attributes.contains(attributeName)) { errDuplicateAttribute(); attributeName = null; } }
private void attributeNameComplete() throws SAXException { attributeName = AttributeName.nameByBuffer(strBuf, strBufLen, interner); if (attributeName == null) { // [NOCPP[ attributeName = AttributeName.createAttributeName( Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner), namePolicy != XmlViolationPolicy.ALLOW); // ]NOCPP] // CPPONLY: nonInternedAttributeName.setNameForNonInterned(Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner)); // CPPONLY: attributeName = nonInternedAttributeName; } clearStrBufAfterUse(); if (attributes == null) { attributes = new HtmlAttributes(mappingLangToXmlLang); } /* * When the user agent leaves the attribute name state (and before * emitting the tag token, if appropriate), the complete attribute's * name must be compared to the other attributes on the same token; if * there is already an attribute on the token with the exact same name, * then this is a parse error and the new attribute must be dropped, * along with the value that gets associated with it (if any). */ if (attributes.contains(attributeName)) { errDuplicateAttribute(); attributeName = null; } }
HtmlAttributes formAttrs = new HtmlAttributes(0); int actionIndex = attributes.getIndex(AttributeName.ACTION); if (actionIndex > -1) { appendIsindexPrompt(stack[currentPtr].node); HtmlAttributes inputAttributes = new HtmlAttributes( 0); inputAttributes.addAttribute(