Revision 70
Added by Aaron Marcuse-Kubitza about 13 years ago
simplify_xpath | ||
---|---|---|
10 | 10 |
line = sys.stdin.readline() |
11 | 11 |
if line == '': break |
12 | 12 |
# Forward * abbrs |
13 |
line = re.sub(r'(?i)(/)(\w+)(?=\w*(?:->/[^/]*)?/\2\b)', r'\1*', line)
|
|
13 |
line = re.sub(r'(?i)(\w+)(?=\w*(?:->/[^/]*)?/\1\b)', r'*', line)
|
|
14 | 14 |
# Backward * abbrs |
15 |
line = re.sub(r'(?i)(/(\w+)->/[^/]*/[^/]*\[)\2', r'\1*', line)
|
|
15 |
line = re.sub(r'(?i)((\w+)->/[^/]*/[^/]*\[)\2', r'\1*', line) |
|
16 | 16 |
sys.stdout.write(line) |
17 | 17 |
|
18 | 18 |
main() |
Also available in: Unified diff
Finished VegX-VegBank mapping and created VegBank joins of mappings to VegX