Revision 3811
Added by Aaron Marcuse-Kubitza over 12 years ago
review | ||
---|---|---|
28 | 28 |
# Leave enough to include the table of a user-defined value |
29 | 29 |
xpath, n = re.subn(r'^(?:/(?!_)[\w*]+)*(?=(?:/(?!_)[\w*]+){2}(?:\[|/_|$))', |
30 | 30 |
r'', xpath) |
31 |
# Prepend / to show truncation |
|
32 | 31 |
if n > 0: truncated = True |
33 | 32 |
|
33 |
# Remove XML functions |
|
34 |
xpath = re.sub(r'/_\w+/\w+', r'', xpath) |
|
35 |
|
|
34 | 36 |
# Remove backward (child-to-parent) pointer's target ID attr |
35 | 37 |
xpath = re.sub(r'\[[\w*]+\]|(?<=\[)[\w*]+,', r'', xpath) |
36 | 38 |
|
Also available in: Unified diff
review: Remove XML functions. This should increase the number of matches between human-readable VegBIEN XPaths of VegX and DwC2.