String oldPrefix = broker.getNamespacePrefix(uri); if (oldPrefix == null) { if (prefix == null || prefix.length() == 0)  prefix = "#" + uri;  broker.registerNamespace(uri, prefix); } else prefix = oldPrefix;  prefixes.push(prefix);
nsMappings.put(prefix, uri);
	public void startPrefixMapping(String prefix, String uri) {		// skip the eXist namespace		if (uri.equals("http://exist.sourceforge.net/NS/exist")) {			ignorePrefix = prefix;			return;		}		// get the prefix for this namespace if one has been stored		// before		String oldPrefix = broker.getNamespacePrefix(uri);		if (oldPrefix == null) {			if (prefix == null || prefix.length() == 0)				// xmlns="namespace"				prefix = "#" + uri;			broker.registerNamespace(uri, prefix);		} else			prefix = oldPrefix;		prefixes.push(prefix);	}