if(ELEMENT_NODE == nexttype)
{
int attrIndex=NULL; // start with no previous sib
// Process attributes _now_, rather than waiting.
// Simpler control flow, makes NS cache available immediately.
NamedNodeMap attrs=next.getAttributes();
int attrsize=(attrs==null) ? 0 : attrs.getLength();
if(attrsize>0)
{
for(int i=0;i<attrsize;++i)
{
// No need to force nodetype in this case;
// addNode() will take care of switching it from
// Attr to Namespace if necessary.
attrIndex=addNode(attrs.item(i),
nextindex,attrIndex,NULL);
m_firstch.setElementAt(DTM.NULL,attrIndex);
// If the xml: prefix is explicitly declared
// we don't need to synthesize one.
//
// NOTE that XML Namespaces were not originally
// defined as being namespace-aware (grrr), and
// while the W3C is planning to fix this it's
// safer for now to test the QName and trust the
// parsers to prevent anyone from redefining the
// reserved xmlns: prefix
if(!m_processedFirstElement
&& "xmlns:xml".equals(attrs.item(i).getNodeName()))
m_processedFirstElement=true;
}
// Terminate list of attrs, and make sure they aren't
// considered children of the element
} // if attrs exist