Beispiel #1
0
 protected final void _forceChildOutput() throws XMLStreamException {
   SMOutputtable child = _firstChild;
   _firstChild = null;
   _lastChild = null;
   for (; child != null; child = child._next) {
     child._forceOutput(_context);
   }
 }
Beispiel #2
0
 protected void _linkNewChild(SMOutputtable n) {
   SMOutputtable last = _lastChild;
   if (last == null) {
     _lastChild = n;
     _firstChild = n;
   } else {
     last._linkNext(n);
     _lastChild = n;
   }
 }
Beispiel #3
0
 /**
  * Method that will try to close and output all child nodes that can be (ones that are not
  * buffered), and returns true if that succeeds; or false if there was at least one buffered
  * descendant.
  *
  * @return True if all descendants (children, recursively) were succesfully output, possibly
  *     closing them first if necessary
  */
 protected final boolean _closeAndOutputChildren() throws XMLStreamException {
   while (_firstChild != null) {
     if (!_firstChild._output(_context, true)) {
       // Nope, node was buffered or had buffered child(ren)
       return false;
     }
     _firstChild = _firstChild._next;
   }
   _lastChild = null;
   return true;
 }
Beispiel #4
0
 /**
  * Method that will try to close and output all children except for the last, and if that
  * succeeds, output last child if it need not be closed (true for non-element/simple children).
  */
 protected final boolean _closeAllButLastChild() throws XMLStreamException {
   SMOutputtable child = _firstChild;
   while (child != null) {
     SMOutputtable next = child._next;
     /* Need/can not force closing of the last child, but all
      * previous can and should be closed:
      */
     boolean notLast = (next != null);
     if (!_firstChild._output(_context, notLast)) {
       // Nope, node was buffered or had buffered child(ren)
       return false;
     }
     _firstChild = child = next;
   }
   _lastChild = null;
   return true;
 }