protected AttributesImplSerializer m_attributes = new AttributesImplSerializer();
int index; if (uri == null || localName == null || uri.length() == 0) index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri, localName); if (m_tracer != null) old_value = m_attributes.getValue(index); if (value.equals(old_value)) old_value = null; m_attributes.setValue(index, value); was_added = false; if (old_value != null) m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true; if (m_tracer != null)
index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri,localName); m_attributes.setValue(index,value); was_added = false; m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true;
/** * Process the attributes, which means to write out the currently * collected attributes to the writer. The attributes are not * cleared by this method * * @param writer the writer to write processed attributes to. * @param nAttrs the number of attributes in m_attributes * to be processed * * @throws org.xml.sax.SAXException */ public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException,SAXException { /* * process the collected attributes */ for (int i = 0; i < nAttrs; i++) { processAttribute( writer, m_attributes.getQName(i), m_attributes.getValue(i), m_elemContext.m_elementDesc); } }
/** * This method sets the attributes, previous attributes are cleared, * it also keeps the hashtable up to date for quick lookup via * getIndex(qName). * @param atts the attributes to copy into these attributes. * @see org.xml.sax.helpers.AttributesImpl#setAttributes(Attributes) * @see #getIndex(String) */ public final void setAttributes(Attributes atts) { super.setAttributes(atts); // we've let the super class add the attributes, but // we need to keep the hash table up to date ourselves for the // potentially new qName/index pairs for quick lookup. int numAtts = atts.getLength(); if (MAX <= numAtts) switchOverToHash(numAtts); }
this.m_attributes.clear(); this.m_CdataElems = null; this.m_cdataTagOpen = false;
index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri,localName); m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true;
int nAttrs = m_attributes.getLength(); if (nAttrs > 0)
index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri,localName); m_attributes.setValue(index,value); was_added = false; m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true;
/** * This method is called when all the data needed for a call to the * SAX handler's startElement() method has been gathered. */ protected void closeStartTag() throws SAXException { m_elemContext.m_startTagOpen = false; final String localName = getLocalName(m_elemContext.m_elementName); final String uri = getNamespaceURI(m_elemContext.m_elementName, true); // Now is time to send the startElement event if (m_needToCallStartDocument) { startDocumentInternal(); } m_saxHandler.startElement(uri, localName, m_elemContext.m_elementName, m_attributes); // we've sent the official SAX attributes on their way, // now we don't need them anymore. m_attributes.clear(); if(m_state != null) m_state.setCurrentNode(null); }
index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri,localName); m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true;
int index; if (uri == null || localName == null || uri.length() == 0) index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri, localName); if (m_tracer != null) old_value = m_attributes.getValue(index); if (value.equals(old_value)) old_value = null; m_attributes.setValue(index, value); was_added = false; if (old_value != null) m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true; if (m_tracer != null)
index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri,localName); m_attributes.setValue(index,value); was_added = false; m_attributes.addAttribute(uri, localName, rawName, type, value); was_added = true;
/** * Process the attributes, which means to write out the currently * collected attributes to the writer. The attributes are not * cleared by this method * * @param writer the writer to write processed attributes to. * @param nAttrs the number of attributes in m_attributes * to be processed * * @throws org.xml.sax.SAXException */ public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException,SAXException { /* * process the collected attributes */ for (int i = 0; i < nAttrs; i++) { processAttribute( writer, m_attributes.getQName(i), m_attributes.getValue(i), m_elemContext.m_elementDesc); } }
/** * This method sets the attributes, previous attributes are cleared, * it also keeps the hashtable up to date for quick lookup via * getIndex(qName). * @param atts the attributes to copy into these attributes. * @see org.xml.sax.helpers.AttributesImpl#setAttributes(Attributes) * @see #getIndex(String) */ public final void setAttributes(Attributes atts) { super.setAttributes(atts); // we've let the super class add the attributes, but // we need to keep the hash table up to date ourselves for the // potentially new qName/index pairs for quick lookup. int numAtts = atts.getLength(); if (MAX <= numAtts) switchOverToHash(numAtts); }
/** * This method is called when all the data needed for a call to the * SAX handler's startElement() method has been gathered. */ protected void closeStartTag() throws SAXException { m_elemContext.m_startTagOpen = false; // Now is time to send the startElement event m_saxHandler.startElement( EMPTYSTRING, m_elemContext.m_elementName, m_elemContext.m_elementName, m_attributes); m_attributes.clear(); }