Project

General

Profile

« Previous | Next » 

Revision 3424

xml_func.py: process(): Changed rel_funcs param to a callback is_rel_func, so that caller can specify any dynamic function to determine if a name is a relational function rather than having to list out all known relational functions

View differences:

map
335 335
                
336 336
                # Strip XML functions not in the DB
337 337
                special_funcs = db_xml.put_table_special_funcs | rel_funcs
338
                xml_func.process(root, rel_funcs=special_funcs)
338
                xml_func.process(root, is_rel_func=lambda f: f in special_funcs)
339 339
                if debug: log_debug('Putting stripped:\n'+str(root))
340 340
                    # only calc if debug
341 341
                
......
422 422
                pool.share_vars(locals())
423 423
                
424 424
                row_root = root.cloneNode(True) # deep copy so don't modify root
425
                xml_func.process(row_root, on_error, rel_funcs, out_db)
425
                xml_func.process(row_root, on_error, lambda f: f in rel_funcs,
426
                    out_db)
426 427
                if not xml_dom.is_empty(row_root):
427 428
                    assert xml_dom.has_one_child(row_root)
428 429
                    try:

Also available in: Unified diff