def check_flag(kwargs, name):
    flag = kwargs.get(name)
    if flag is not None:
        if flag:
            kwargs[name] = name
        else:
            del kwargs[name]
enforce XML rules for flags.
dataset/ETHPy150Open kdart/pycopia/WWW/pycopia/WWW/XHTML.py/check_flag