public static Map<String,String> updateNamespaces( Object xmlPart, Map<String,String> previousNsAbbreviations ) {
		if( !(xmlPart instanceof XMLOpenTag) ) return previousNsAbbreviations;
		XMLOpenTag openTag = (XMLOpenTag)xmlPart;
		Map<String,String> newNsAbbreviations = previousNsAbbreviations;
		for( Iterator<String> i=openTag.attributes.keySet().iterator(); i.hasNext(); ) {
			String attrKey = i.next();
			String attrValue = openTag.attributes.get(attrKey);
			if( "xmlns".equals(attrKey) ) {
				if( newNsAbbreviations == previousNsAbbreviations ) newNsAbbreviations = new HashMap<String,String>(previousNsAbbreviations); 
				newNsAbbreviations.put( "", attrValue );
			} else if( attrKey.startsWith("xmlns:") ) {
				if( newNsAbbreviations == previousNsAbbreviations ) newNsAbbreviations = new HashMap<String,String>(previousNsAbbreviations);
				newNsAbbreviations.put( attrKey.substring(6), attrValue );
			}
		}
		return newNsAbbreviations; 
	}