|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.apache.xerces.util.NamespaceSupport
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 |
protected int[] fContext
fNamespaceSize
protected int fCurrentContext
protected String[] fNamespace
fNamespaceSize
,
fContext
protected int fNamespaceSize
Constructor Detail |
public NamespaceSupport()
public NamespaceSupport(NamespaceContext context)
Method Detail |
public boolean declarePrefix(String prefix, String uri)
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.
prefix
- The prefix to declare, or null for the empty
string.uri
- The Namespace URI to associate with the prefix.
getURI(java.lang.String)
,
getDeclaredPrefixAt(int)
public String getDeclaredPrefixAt(int index)
getDeclaredPrefixAt
in interface NamespaceContext
public int getDeclaredPrefixCount()
getDeclaredPrefixCount
in interface NamespaceContext
public NamespaceContext getParentContext()
Note: This method may return the same NamespaceContext object reference. The caller is responsible for saving the declared prefix mappings before calling this method.
getParentContext
in interface NamespaceContext
public String getPrefix(String uri)
This method looks up the namespace URI in the current context.
uri
- The namespace URI to look up.
getPrefix(java.lang.String)
public String getURI(String prefix)
This method looks up the prefix in the current context. Use the empty string ("") for the default Namespace.
getURI
in interface NamespaceContext
prefix
- The prefix to look up.
getDeclaredPrefixAt(int)
public void popContext()
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.
pushContext()
public void pushContext()
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.
popContext()
public void reset()
It is necessary to invoke this method before reusing the Namespace support object for a new session.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs90 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |