APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xml.internal.serializer.dom3

public Class NamespaceSupport

extends Object
Class Inheritance
Imports
java.util.Enumeration, .NoSuchElementException

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. Derived from org.apache.xerces.util.NamespaceSupport
Author
Andy Clark, IBM
Version
$Id: Exp $

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
protected int[]
fContext

Context indexes.

protected int
fCurrentContext

The current context.

protected String[]
fNamespace

Namespace binding information.

protected int
fNamespaceSize

The top of the namespace information array.

protected String[]
pack-priv static final String
pack-priv static final String
public static final String
XML_URI

The XML Namespace ("http://www.w3.org/XML/1998/namespace").

public static final String
XMLNS_URI

XML Information Set REC all namespace attributes (including those named xmlns, whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/

Constructor Summary

AccessConstructor and Description
public
NamespaceSupport()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
public Enumeration<String>
public String
public int
public String
public String
getURI(String prefix)

public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fContextback to summary
protected int[] fContext

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
fCurrentContextback to summary
protected int fCurrentContext

The current context.

fNamespaceback to summary
protected String[] fNamespace

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
fNamespaceSizeback to summary
protected int fNamespaceSize

The top of the namespace information array.

fPrefixesback to summary
protected String[] fPrefixes
PREFIX_XMLback to summary
pack-priv static final String PREFIX_XML
PREFIX_XMLNSback to summary
pack-priv static final String PREFIX_XMLNS
XML_URIback to summary
public static final String XML_URI

The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is the Namespace URI that is automatically mapped to the "xml" prefix.

XMLNS_URIback to summary
public static final String XMLNS_URI

XML Information Set REC all namespace attributes (including those named xmlns, whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/

Constructor Detail

NamespaceSupportback to summary
public NamespaceSupport()

Default constructor.

Method Detail

declarePrefixback to summary
public boolean declarePrefix(String prefix, String uri)
See Also
org.apache.xerces.xni.NamespaceContext#declarePrefix(String, String)
getAllPrefixesback to summary
public Enumeration<String> getAllPrefixes()
See Also
org.apache.xerces.xni.NamespaceContext#getAllPrefixes()
getDeclaredPrefixAtback to summary
public String getDeclaredPrefixAt(int index)
See Also
org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixAt(int)
getDeclaredPrefixCountback to summary
public int getDeclaredPrefixCount()
See Also
org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount()
getPrefixback to summary
public String getPrefix(String uri)
See Also
org.apache.xerces.xni.NamespaceContext#getPrefix(String)
getURIback to summary
public String getURI(String prefix)
See Also
org.apache.xerces.xni.NamespaceContext#getURI(String)
popContextback to summary
public void popContext()
See Also
org.apache.xerces.xni.NamespaceContext#popContext()
pushContextback to summary
public void pushContext()
See Also
org.apache.xerces.xni.NamespaceContext#pushContext()
resetback to summary
public void reset()
See Also
org.apache.xerces.xni.NamespaceContext#reset()
com.sun.org.apache.xml.internal.serializer.dom3 back to summary

protected final Class NamespaceSupport.Prefixes

extends Object
implements Enumeration<String>
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xml.internal.serializer.dom3.NamespaceSupport.Prefixes
All Implemented Interfaces
java.util.Enumeration

Field Summary

Modifier and TypeField and Description
private int
private String[]
private int

Constructor Summary

AccessConstructor and Description
public
Prefixes(String[] prefixes, int size)

Constructor for Prefixes.

Method Summary

Modifier and TypeMethod and Description
public boolean
hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

public String
nextElement()

Implements java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

counterback to summary
private int counter
prefixesback to summary
private String[] prefixes
sizeback to summary
private int size

Constructor Detail

Prefixesback to summary
public Prefixes(String[] prefixes, int size)

Constructor for Prefixes.

Method Detail

hasMoreElementsback to summary
public boolean hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Doc from java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

See Also
java.util.Enumeration#hasMoreElements()
nextElementback to summary
public String nextElement()

Implements java.util.Enumeration.nextElement.

Doc from java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

See Also
java.util.Enumeration#nextElement()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.