| java.lang.Object org.apache.xml.serializer.ElemContext
ElemContext | final class ElemContext (Code) | | This class is a stack frame that consists of
information about the element currently being processed
by a serializer. Consider this example:
A stack frame will be pushed for "A" at depth 1,
then another one for "B1" at depth 2.
Then "B1" stackframe is popped. When the stack frame for "B2" is
pushed, this implementation re-uses the old stack fram object used
by "B1" to be efficient at not creating too many of these object.
This is by no means a public class, and neither are its fields or methods,
they are all helper fields for a serializer.
The purpose of this class is to be more consistent with pushing information
when a new element is being serialized and more quickly restoring the old
information about the parent element with a simple pop() when the
child element is done. Previously there was some redundant and error-prone
calculations going on to retore information.
|
Constructor Summary | |
| ElemContext() Constructor to create the root of the element contexts. |
m_currentElemDepth | final int m_currentElemDepth(Code) | | The nesting depth of the element inside other elements.
|
m_elementDesc | ElemDesc m_elementDesc(Code) | | HTML field, the element description of the HTML element
|
m_elementLocalName | String m_elementLocalName(Code) | | The local name of the element.
|
m_elementName | String m_elementName(Code) | | The fully qualified name of the element (with prefix, if any).
|
m_elementURI | String m_elementURI(Code) | | The URI of the element.
|
m_isCdataSection | boolean m_isCdataSection(Code) | | If the element is in the cdata-section-names list
then the value is true. If it is true the text children of the element
should be output in CDATA section blocks.
|
m_isRaw | boolean m_isRaw(Code) | | True if the current element has output escaping disabled.
This is true for SCRIPT and STYLE elements.
|
m_startTagOpen | boolean m_startTagOpen(Code) | | Set to true when a start tag is started, or open, but not all the
attributes or namespace information is yet collected.
|
ElemContext | ElemContext()(Code) | | Constructor to create the root of the element contexts.
|
pop | final ElemContext pop()(Code) | | Pop the current "stack frame".
Returns the parent "stack frame" of the one popped. |
push | final ElemContext push()(Code) | | This method pushes an element "stack frame"
but with no initialization of values in that frame.
This method is used for optimization purposes, like when pushing
a stack frame for an HTML "IMG" tag which has no children and
the stack frame will almost immediately be popped.
|
push | final ElemContext push(String uri, String localName, String qName)(Code) | | Push an element context on the stack. This context keeps track of
information gathered about the element.
Parameters: uri - The URI for the namespace for the element name, can be null if it is not yet known. Parameters: localName - The local name of the element (no prefix), can be null. Parameters: qName - The qualified name (with prefix, if any) of the element, this parameter is required. |
|
|