def render(self, doc):
        """Render all elements using specified document.
        @param doc: the writable document to render to.
        @type doc: document.IWritableDocument
        @return: a deferred fired with the specified document
                 when the rendering is done.
        @rtype: defer.Deferred
        """
        d = defer.succeed(doc)
        for element in self._elements:
            d.addCallback(element.render)
        return d
Render all elements using specified document.
        @param doc: the writable document to render to.
        @type doc: document.IWritableDocument
        @return: a deferred fired with the specified document
                 when the rendering is done.
        @rtype: defer.Deferred