コード例 #1
0
 /**
  * Method for getting namespace instance that represents the specified URI, and if it is not yet
  * bound, tries to bind it to given prefix. Note however that actual prefix used may be different
  * due to conflicts: most important thing is that the specified URI will be bound to a valid
  * prefix. Actual prefix can be checked by looking at returned namespace object
  *
  * @return Namespace object which is bound to given namespace URI for scope of this container
  */
 public final SMNamespace getNamespace(String uri, String prefPrefix) {
   return _context.getNamespace(uri, prefPrefix);
 }
コード例 #2
0
 /**
  * Convenience method for getting namespace instance that uniquely represents the specified URI
  * (uniquely meaning that for a given output context there are never more than one instances for a
  * given URI; which means that identity comparison is enough to check for equality of two
  * namespaces). Calls {@link SMOutputContext} to find the actual namespace instance.
  *
  * @return Namespace object which is bound to given namespace URI for scope of this container
  */
 public final SMNamespace getNamespace(String uri) {
   return _context.getNamespace(uri);
 }