Package org.apache.xml.serializer.dom3
Class NamespaceSupport
java.lang.Object
org.apache.xml.serializer.dom3.NamespaceSupport
public class NamespaceSupport extends Object
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
- Version:
- $Id: Exp $
- Author:
- Andy Clark, IBM
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classNamespaceSupport.Prefixes -
Field Summary
Fields Modifier and Type Field Description protected int[]fContextContext indexes.protected intfCurrentContextThe current context.protected String[]fNamespaceNamespace binding information.protected intfNamespaceSizeThe top of the namespace information array.protected String[]fPrefixesstatic StringXML_URIThe XML Namespace ("http://www.w3.org/XML/1998/namespace").static StringXMLNS_URIXML 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
Constructors Constructor Description NamespaceSupport()Default constructor. -
Method Summary
Modifier and Type Method Description booleandeclarePrefix(String prefix, String uri)EnumerationgetAllPrefixes()StringgetDeclaredPrefixAt(int index)intgetDeclaredPrefixCount()StringgetPrefix(String uri)StringgetURI(String prefix)voidpopContext()voidpushContext()voidreset()
-
Field Details
-
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_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/ -
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
-
fNamespaceSize
protected int fNamespaceSizeThe top of the namespace information array. -
fContext
protected int[] fContextContext 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 fCurrentContextThe current context. -
fPrefixes
-
-
Constructor Details
-
NamespaceSupport
public NamespaceSupport()Default constructor.
-
-
Method Details
-
reset
public void reset()- See Also:
org.apache.xerces.xni.NamespaceContext#reset()
-
pushContext
public void pushContext()- See Also:
org.apache.xerces.xni.NamespaceContext#pushContext()
-
popContext
public void popContext()- See Also:
org.apache.xerces.xni.NamespaceContext#popContext()
-
declarePrefix
- See Also:
org.apache.xerces.xni.NamespaceContext#declarePrefix(String, String)
-
getURI
- See Also:
org.apache.xerces.xni.NamespaceContext#getURI(String)
-
getPrefix
- See Also:
org.apache.xerces.xni.NamespaceContext#getPrefix(String)
-
getDeclaredPrefixCount
public int getDeclaredPrefixCount()- See Also:
org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount()
-
getDeclaredPrefixAt
- See Also:
org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixAt(int)
-
getAllPrefixes
- See Also:
org.apache.xerces.xni.NamespaceContext#getAllPrefixes()
-