Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jaxen
Interface NamespaceContext

All Known Implementing Classes:
  SimpleNamespaceContext

public interface NamespaceContext

Resolves namespace prefixes to namespace URIs.

The prefixes used within an XPath expression are independent of those used within any target document. When evaluating an XPath against a document, only the resolved namespace URIs are compared, not their prefixes.

A `NamespaceContext` is responsible for translating prefixes as they appear in XPath expressions into URIs for comparison. A document's prefixes are resolved internal to the document based upon its own namespace nodes.

Author:
  bob mcwhirter
See Also:
  `BaseXPath`, `Navigator.getElementNamespaceUri(java.lang.Object)`, `Navigator.getAttributeNamespaceUri(java.lang.Object)`

Method Summary
`String` | `translateNamespacePrefixToUri(String prefix)` Translate the provided namespace prefix into the matching bound namespace URI.

Method Detail

### translateNamespacePrefixToUri

    public String translateNamespacePrefixToUri(String prefix)

  Translate the provided namespace prefix into the matching bound namespace URI.

  In XPath, there is no such thing as a 'default namespace'. The empty prefix always resolves to the empty namespace URI. This method should return null for the empty prefix. Similarly, the prefix "xml" always resolves to the URI "http://www.w3.org/XML/1998/namespace".

  Parameters:
    `prefix` - the namespace prefix to resolve
  Returns:
    the namespace URI bound to the prefix; or null if there is no such namespace

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 Codehaus. All Rights Reserved.