/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }