def toElement(self):
    element = generic.Request.toElement(self)
    query = element.addElement((self.requestNamespace, 'query'))
    if (self.options is None):
        form = None
    elif (self.options is False):
        form = data_form.Form(formType='cancel')
    else:
        form = data_form.Form(formType='submit', formNamespace=self.formNamespace)
        form.makeFields(self.options)
    if (form is not None):
        query.addChild(form.toElement())
    return element
def toElement(self):
    element = generic.Request.toElement(self)
    query = element.addElement((self.requestNamespace, 'query'))
    if (self.options is None):
        form = None
    elif (self.options is False):
        form = data_form.Form(formType='cancel')
    else:
        form = data_form.Form(formType='submit', formNamespace=self.formNamespace)
        form.makeFields(self.options)
    if (form is not None):
        query.addChild(form.toElement())
    return element