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

## BEA WebLogic Server 9.0 API Reference

## weblogic.apache.xerces.util
Class NamespaceSupport

    java.lang.Object
      weblogic.apache.xerces.util.NamespaceSupport

All Implemented Interfaces:
  NamespaceContext

Direct Known Subclasses:
  SchemaNamespaceSupport

Deprecated. please use JDK supplied XML parsers and transformers

public class NamespaceSupport
extends Object
implements NamespaceContext

Namespace support for XML document handlers. This class doesn't perform any error checking and assumes that all strings passed as arguments to methods are unique symbols. The SymbolTable class can be used for this purpose.

Field Summary
`protected int[]` | `fContext` Deprecated. Context indexes.
`protected int` | `fCurrentContext` Deprecated. The current context.
`protected String[]` | `fNamespace` Deprecated. Namespace binding information.
`protected int` | `fNamespaceSize` Deprecated. The top of the namespace information array.

Fields inherited from interface weblogic.apache.xerces.xni.NamespaceContext
`XML_URI, XMLNS_URI`

Constructor Summary
`NamespaceSupport()` Deprecated. Default constructor.
`NamespaceSupport(NamespaceContext context)` Deprecated. Constructs a namespace context object and initializes it with the prefixes declared in the specified context.

Method Summary
`boolean` | `declarePrefix(String prefix, String uri)` Deprecated. Declare a Namespace prefix.
`String` | `getDeclaredPrefixAt(int index)` Deprecated. Returns the prefix at the specified index in the current context.
`int` | `getDeclaredPrefixCount()` Deprecated. Return a count of all prefixes currently declared, including the default prefix if bound.
`NamespaceContext` | `getParentContext()` Deprecated. Returns the parent namespace context or null if there is no parent context.
`String` | `getPrefix(String uri)` Deprecated. Look up a namespace URI and get one of the mapped prefix.
`String` | `getURI(String prefix)` Deprecated. Look up a prefix and get the currently-mapped Namespace URI.
`void` | `popContext()` Deprecated. Revert to the previous Namespace context.
`void` | `pushContext()` Deprecated. Start a new Namespace context.
`void` | `reset()` Deprecated. Reset this Namespace support object for reuse.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fContext

    protected int[] fContext

  Deprecated.
  Context indexes. This array contains indexes into the namespace information array. The index at the current context is the start index of declared namespace bindings and runs to the size of the namespace information array.

  See Also:
    `fNamespaceSize`

### fCurrentContext

    protected int fCurrentContext

  Deprecated.
  The current context.

### fNamespace

    protected String[] fNamespace

  Deprecated.
  Namespace binding information. This array is composed of a series of tuples containing the namespace binding information: <prefix, uri>. The default size can be set to anything as long as it is a power of 2 greater than 1.

  See Also:
    `fNamespaceSize`, `fContext`

### fNamespaceSize

    protected int fNamespaceSize

  Deprecated.
  The top of the namespace information array.

Constructor Detail

### NamespaceSupport

    public NamespaceSupport()

  Deprecated.
  Default constructor.

### NamespaceSupport

    public NamespaceSupport(NamespaceContext context)

  Deprecated.
  Constructs a namespace context object and initializes it with the prefixes declared in the specified context.

Method Detail

### declarePrefix

    public boolean declarePrefix(String prefix,
                                 String uri)

  Deprecated.
  Declare a Namespace prefix.

  This method declares a prefix in the current Namespace context; the prefix will remain in force until this context is popped, unless it is shadowed in a descendant context.

  To declare a default Namespace, use the empty string. The prefix must not be "xml" or "xmlns".

  Note that you must not declare a prefix after you've pushed and popped another Namespace.

  Parameters:
    `prefix` - The prefix to declare, or null for the empty string.
    `uri` - The Namespace URI to associate with the prefix.
  Returns:
    true if the prefix was legal, false otherwise
  See Also:
    `getURI(java.lang.String)`, `getDeclaredPrefixAt(int)`

### getDeclaredPrefixAt

    public String getDeclaredPrefixAt(int index)

  Deprecated.
  Returns the prefix at the specified index in the current context.

  Specified by:
    `getDeclaredPrefixAt` in interface `NamespaceContext`

### getDeclaredPrefixCount

    public int getDeclaredPrefixCount()

  Deprecated.
  Return a count of all prefixes currently declared, including the default prefix if bound.

  Specified by:
    `getDeclaredPrefixCount` in interface `NamespaceContext`

### getParentContext

    public NamespaceContext getParentContext()

  Deprecated.
  Returns the parent namespace context or null if there is no parent context. The total depth of the namespace contexts matches the element depth in the document.

  Note: This method may return the same NamespaceContext object reference. The caller is responsible for saving the declared prefix mappings before calling this method.

  Specified by:
    `getParentContext` in interface `NamespaceContext`

### getPrefix

    public String getPrefix(String uri)

  Deprecated.
  Look up a namespace URI and get one of the mapped prefix.

  This method looks up the namespace URI in the current context.

  Parameters:
    `uri` - The namespace URI to look up.
  Returns:
    one of the associated prefixes, or null if the uri does not map to any prefix.
  See Also:
    `getPrefix(java.lang.String)`

### getURI

    public String getURI(String prefix)

  Deprecated.
  Look up a prefix and get the currently-mapped Namespace URI.

  This method looks up the prefix in the current context. Use the empty string ("") for the default Namespace.

  Specified by:
    `getURI` in interface `NamespaceContext`
  Parameters:
    `prefix` - The prefix to look up.
  Returns:
    The associated Namespace URI, or null if the prefix is undeclared in this context.
  See Also:
    `getDeclaredPrefixAt(int)`

### popContext

    public void popContext()

  Deprecated.
  Revert to the previous Namespace context.

  Normally, you should pop the context at the end of each XML element. After popping the context, all Namespace prefix mappings that were previously in force are restored.

  You must not attempt to declare additional Namespace prefixes after popping a context, unless you push another context first.

  See Also:
    `pushContext()`

### pushContext

    public void pushContext()

  Deprecated.
  Start a new Namespace context.

  Normally, you should push a new context at the beginning of each XML element: the new context will automatically inherit the declarations of its parent context, but it will also keep track of which declarations were made within this context.

  The Namespace support object always starts with a base context already in force: in this context, only the "xml" prefix is declared.

  See Also:
    `popContext()`

### reset

    public void reset()

  Deprecated.
  Reset this Namespace support object for reuse.

  It is necessary to invoke this method before reusing the Namespace support object for a new session.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs90 Copyright 2005 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD