Project

General

Profile

« Previous | Next » 

Revision 4243

xml_func.py: simplify(): Removed no longer needed hardcoded _if simplifying code now that there is an _if() simplifying function

View differences:

lib/xml_func.py
105 105
                value = param_node.firstChild
106 106
                
107 107
                is_agg_func = param.isdigit() or func == '_name'
108
                if is_agg_func or (func == '_if' and param == 'else'):
109
                    xml_dom.replace(node, value)
110
                elif func == '_if': xml_dom.remove(node) # only cond or then arg
108
                if is_agg_func: xml_dom.replace(node, value)
111 109
        else: func(node)
112 110
    # Pruning optimizations
113 111
    else: # these should not run on functions because they would remove args

Also available in: Unified diff