Project

General

Profile

« Previous | Next » 

Revision 1482

xpath_func.py: process(): Fixed bug where XPath elem's other_branches were not also processed

View differences:

lib/xpath_func.py
10 10
def process(path):
11 11
    if path == []: return path
12 12
    
13
    # Process subpaths
13 14
    path[1:] = process(path[1:])
15
    branches = path[0].other_branches
16
    for i, branch in enumerate(branches): branches[i] = process(branch)
17
    
14 18
    name = path[0].name
15 19
    if name.startswith('_') and name in funcs:
16 20
        return funcs[name](path.pop(0).attrs, path)

Also available in: Unified diff