net.sf.xolite.dom
Class DomPrefixResolver

java.lang.Object
  extended by net.sf.xolite.dom.DomPrefixResolver
All Implemented Interfaces:
NamespaceContext

public class DomPrefixResolver
extends Object
implements NamespaceContext

Implementation of the NamespaceContext interface based on a DOM node.
You give it a DOM node and it creates the namespace context of this Node = all the namespaces declared in the path from this node to the document root.


Constructor Summary
DomPrefixResolver(Node base)
           
 
Method Summary
 String getNamespaceURI(String prefix)
          Get namespace URI corresponding to the given prefix.
 String getPrefix(String namespaceURI)
          Get the first perfix mapped to the given namespace.
 Iterator<String> getPrefixes(String namespaceURI)
          Get all the prefixs mapped to the given namespace.
 void setNode(Node newBase)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomPrefixResolver

public DomPrefixResolver(Node base)
Method Detail

setNode

public void setNode(Node newBase)

getNamespaceURI

public String getNamespaceURI(String prefix)
Get namespace URI corresponding to the given prefix.

Specified by:
getNamespaceURI in interface NamespaceContext
See Also:
NamespaceContext.getNamespaceURI(java.lang.String)

getPrefix

public String getPrefix(String namespaceURI)
Get the first perfix mapped to the given namespace.

Specified by:
getPrefix in interface NamespaceContext
See Also:
NamespaceContext.getPrefix(java.lang.String)

getPrefixes

public Iterator<String> getPrefixes(String namespaceURI)
Get all the prefixs mapped to the given namespace.

Specified by:
getPrefixes in interface NamespaceContext
See Also:
NamespaceContext.getPrefixes(java.lang.String)


Copyright © 2012. All Rights Reserved.