Project

General

Profile

« Previous | Next » 

Revision 70

Finished VegX-VegBank mapping and created VegBank joins of mappings to VegX

View differences:

xpath.py
81 81
            if not self._match_str('/'): break
82 82
        
83 83
        # Expand * abbrs
84
        elem_idx = 0
85
        for elem in tree:
84
        for i in reversed(xrange(len(tree))):
85
            elem = tree[i]
86 86
            id_ = backward_id(elem)
87 87
            if id_ != None: elem = id_[0]; offset = -2
88 88
            elif elem.is_ptr: offset = 2
89 89
            else: offset = 1
90 90
            before, abbr, after = elem.name.partition('*')
91 91
            if abbr != '':
92
                try: elem.name = before+tree[elem_idx+offset].name+after
92
                try: elem.name = before+tree[i+offset].name+after
93 93
                except IndexError: pass # no replacement elem
94
            elem_idx += 1
95 94
        
96 95
        return tree
97 96

  

Also available in: Unified diff