# coding=utf-8

import lxml

E = lxml.objectify.ElementMaker(annotate=False)

from openprovider.modules import customer
from openprovider.modules import domain
from openprovider.modules import extension
from openprovider.modules import financial
from openprovider.modules import nameserver
from openprovider.modules import nsgroup
from openprovider.modules import reseller
from openprovider.modules import ssl

@@ -71,16 +71,497 @@
 False)%0A%0A
+%0Adef OE(element, value, transform=lambda x: x):%0A    %22%22%22%0A    Create an Optional Element.%0A%0A    Returns an Element as ElementMaker would, unless value is None. Optionally the value can be%0A    transformed through a function.%0A%0A    %3E%3E%3E OE('elem', None)%0A    None%0A%0A    %3E%3E%3E lxml.etree.tostring(OE('elem', 'value'))%0A    %3Celem%3Evalue%3C/elem%3E%0A%0A    %3E%3E%3E lxml.etree.tostring(OE('elem', True, int))%0A    %3Celem%3E1%3C/elem%3E%0A    %22%22%22%0A    return E(element, transform(value)) if value is not None else None%0A%0A%0A
 from ope

Implement an Optional Element function