public abstract class XMLWriterNamespaceBase extends java.lang.Object implements IXMLWriter
| Constructor and Description |
|---|
XMLWriterNamespaceBase(java.lang.String[] uris)
Constructor.
|
XMLWriterNamespaceBase(XMLWriterNamespaceBase base,
java.lang.String[] uris)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[][] |
getExtensionNamespaces()
Get extension namespace URIs added to those in mapping.
|
int |
getNamespaceCount()
Get the number of namespaces currently defined.
|
java.lang.String |
getNamespacePrefix(int index)
Get current prefix defined for namespace.
|
java.lang.String[] |
getNamespaces()
Get namespace URIs for mapping.
|
java.lang.String |
getNamespaceUri(int index)
Get URI for namespace.
|
int |
getNestingDepth()
Get the current element nesting depth.
|
int |
getPrefixIndex(java.lang.String prefix)
Get index of namespace mapped to prefix.
|
int[] |
openNamespaces(int[] nums,
java.lang.String[] prefs)
Open the specified namespaces.
|
void |
popExtensionNamespaces()
Remove extension namespace URIs.
|
void |
popTranslationTable()
Pop a translation table used for converting namespace index numbers to
values matching the internal lookup.
|
void |
pushExtensionNamespaces(java.lang.String[] uris)
Append extension namespace URIs to those in mapping.
|
void |
pushTranslationTable(int[] table)
Push a translation table to be used for converting namespace index
numbers passed as arguments to values used for internal lookup.
|
void |
reset()
Reset to initial state for reuse.
|
int |
translateNamespace(int index)
Translate a namespace index number to match internal tables.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAttribute, close, closeEmptyTag, closeStartTag, endTag, flush, indent, init, setIndentSpaces, startTagClosed, startTagNamespaces, startTagOpen, writeCData, writeComment, writeDocType, writeEntityRef, writePI, writeTextContent, writeXMLDeclpublic XMLWriterNamespaceBase(java.lang.String[] uris)
uris - ordered array of URIs for namespaces used in document (must
be constant; the value in position 0 must always be the empty string "",
and the value in position 1 must always be the XML namespace
"http://www.w3.org/XML/1998/namespace")public XMLWriterNamespaceBase(XMLWriterNamespaceBase base, java.lang.String[] uris)
base - existing instanceuris - ordered array of URIs for namespaces used in documentpublic int[] openNamespaces(int[] nums,
java.lang.String[] prefs)
throws java.io.IOException
openNamespaces in interface IXMLWriternums - array of namespace indexes defined by this element (reference
kept until namespaces are closed, values may be modified by this method)prefs - array of namespace prefixes mapped by this element (no
null values, use "" for default namespace declaration)java.io.IOException - on error writing to documentpublic final int getNestingDepth()
getNestingDepth in interface IXMLWriterpublic final int getNamespaceCount()
getNamespaceCount in interface IXMLWriterpublic void reset()
reset in interface IXMLWriterpublic final java.lang.String[] getNamespaces()
getNamespaces in interface IXMLWriterpublic final java.lang.String getNamespaceUri(int index)
getNamespaceUri in interface IXMLWriterindex - namespace URI index numbernull if the namespace index
is invalidpublic final java.lang.String getNamespacePrefix(int index)
getNamespacePrefix in interface IXMLWriterindex - namespace URI index numbernull if the namespace is not
currently mappedpublic final int getPrefixIndex(java.lang.String prefix)
getPrefixIndex in interface IXMLWriterprefix - text to match (non-null, use "" for default
prefix)public void pushExtensionNamespaces(java.lang.String[] uris)
pushExtensionNamespaces in interface IXMLWriteruris - namespace URIs to extend those in mappingpublic void popExtensionNamespaces()
pushExtensionNamespaces(java.lang.String[]).popExtensionNamespaces in interface IXMLWriterpublic final java.lang.String[][] getExtensionNamespaces()
getExtensionNamespaces in interface IXMLWriternull if
none)public int translateNamespace(int index)
index - raw namespace indexpublic void pushTranslationTable(int[] table)
pushTranslationTable in interface IXMLWritertable - translation table to be used (null if no
change)public void popTranslationTable()
popTranslationTable in interface IXMLWriter