public @Local String getLocalName(int index) { if (index < length && index >= 0) { return names[index].getLocal(mode); } else { return null; } }
public int getIndex(String uri, String localName) { for (int i = 0; i < length; i++) { if (names[i].getLocal(mode).equals(localName) && names[i].getUri(mode).equals(uri)) { return i; } } return -1; }
public @Local String getXmlnsLocalName(int index) { if (index < xmlnsLength && index >= 0) { return xmlnsNames[index].getLocal(mode); } else { return null; } }
/** * 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); }
public int getIndex(String uri, String localName) { for (int i = 0; i < length; i++) { if (names[i].getLocal(mode).equals(localName) && names[i].getUri(mode).equals(uri)) { return i; } } return -1; }
public @Local String getLocalName(int index) { if (index < length && index >= 0) { return names[index].getLocal(mode); } else { return null; } }
/** * 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); }
public @Local String getXmlnsLocalName(int index) { if (index < xmlnsLength && index >= 0) { return xmlnsNames[index].getLocal(mode); } else { return null; } }
public int getIndex(String uri, String localName) { for (int i = 0; i < length; i++) { if (names[i].getLocal(mode).equals(localName) && names[i].getUri(mode).equals(uri)) { return i; } } return -1; }
public @Local String getXmlnsLocalName(int index) { if (index < xmlnsLength && index >= 0) { return xmlnsNames[index].getLocal(mode); } else { return null; } }
@Override protected void errDuplicateAttribute() throws SAXException { err("Duplicate attribute \u201C" + attributeName.getLocal(AttributeName.HTML) + "\u201D."); }
public @Local String getLocalName(int index) { if (index < length && index >= 0) { return names[index].getLocal(mode); } else { return null; } }
@Override protected void errDuplicateAttribute() throws SAXException { err("Duplicate attribute \u201C" + attributeName.getLocal(AttributeName.HTML) + "\u201D."); }
@Override protected void errDuplicateAttribute() throws SAXException { err("Duplicate attribute \u201C" + attributeName.getLocal(AttributeName.HTML) + "\u201D."); }
void processNonNcNames(TreeBuilder<?> treeBuilder, XmlViolationPolicy namePolicy) throws SAXException { for (int i = 0; i < length; i++) { AttributeName attName = names[i]; if (!attName.isNcName(mode)) { String name = attName.getLocal(mode); switch (namePolicy) { case ALTER_INFOSET: names[i] = AttributeName.create(NCName.escapeName(name)); // fall through case ALLOW: if (attName != AttributeName.XML_LANG) { treeBuilder.warn("Attribute \u201C" + name + "\u201D is not serializable as XML 1.0."); } break; case FATAL: treeBuilder.fatal("Attribute \u201C" + name + "\u201D is not serializable as XML 1.0."); break; } } } }
void processNonNcNames(TreeBuilder<?> treeBuilder, XmlViolationPolicy namePolicy) throws SAXException { for (int i = 0; i < length; i++) { AttributeName attName = names[i]; if (!attName.isNcName(mode)) { String name = attName.getLocal(mode); switch (namePolicy) { case ALTER_INFOSET: names[i] = AttributeName.create(NCName.escapeName(name)); // fall through case ALLOW: if (attName != AttributeName.XML_LANG) { treeBuilder.warn("Attribute \u201C" + name + "\u201D is not serializable as XML 1.0."); } break; case FATAL: treeBuilder.fatal("Attribute \u201C" + name + "\u201D is not serializable as XML 1.0."); break; } } } }
void processNonNcNames(TreeBuilder<?> treeBuilder, XmlViolationPolicy namePolicy) throws SAXException { for (int i = 0; i < length; i++) { AttributeName attName = names[i]; if (!attName.isNcName(mode)) { String name = attName.getLocal(mode); switch (namePolicy) { case ALTER_INFOSET: names[i] = AttributeName.create(NCName.escapeName(name)); // fall through case ALLOW: if (attName != AttributeName.XML_LANG) { treeBuilder.warn("Attribute \u201C" + name + "\u201D is not serializable as XML 1.0."); } break; case FATAL: treeBuilder.fatal("Attribute \u201C" + name + "\u201D is not serializable as XML 1.0."); break; } } } }