Revision 3640
Added by Aaron Marcuse-Kubitza over 12 years ago
xml_func.py | ||
---|---|---|
108 | 108 |
value = items[0][1] # pass through first arg |
109 | 109 |
elif row_mode and (is_rel_func(name) or func == None): # row-based mode |
110 | 110 |
value = sql_io.put(db, name, dict(items)) # evaluate using DB |
111 |
elif column_mode and not name in structural_funcs: # column-based mode |
|
112 |
if is_rel_func(name): return # preserve relational functions |
|
113 |
# otherwise XML-only, so just replace with last param |
|
114 |
value = pop_value(items, None) |
|
111 |
elif (column_mode and not name in structural_funcs) or func == None: |
|
112 |
# local XML function can't be used or does not exist |
|
113 |
if column_mode and is_rel_func(name): return # preserve relational funcs |
|
114 |
# otherwise XML-only in column mode, or DB-only in XML output mode |
|
115 |
value = pop_value(items, None) # just replace with last param |
|
115 | 116 |
else: # local XML function |
116 | 117 |
try: value = func(items, node) |
117 | 118 |
except Exception, e: # also catch non-wrapped exceptions (XML func bugs) |
Also available in: Unified diff
xml_func.py: process(): If local XML function can't be found, just replace with last param instead of returning an error. This allows DB-only functions to be ignored in XML output mode.