/** * Add an element to the element table. * * @param eName The element name */ public static final void addElement(String eName) { int localNameIndex = serializerVoc.localName.obtainIndex(eName); if (localNameIndex > -1) System.out.println("Duplicate Element found: " + eName); else parserVoc.localName.add(eName); idx = serializerVoc.elementName.getNextIndex(); name = new QualifiedName("", "", eName, idx, -1, -1, idx); parserVoc.elementName.add(name); entry = serializerVoc.elementName.obtainEntry(eName); entry.addQualifiedName(name); }
/** * Add an attribute to the attribute table. * * @param aName The attribute name */ public static final void addAttribute(String aName) { int localNameIndex = serializerVoc.localName.obtainIndex(aName); if (localNameIndex > -1) System.out.println("Duplicate Attribute found: " + aName); else parserVoc.localName.add(aName); idx = serializerVoc.attributeName.getNextIndex(); name = new QualifiedName("", "", aName, idx, -1, -1, idx); name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE); parserVoc.attributeName.add(name); entry = serializerVoc.attributeName.obtainEntry(aName); entry.addQualifiedName(name); }