-
Notifications
You must be signed in to change notification settings - Fork 11
Tag patterns
David Megginson edited this page Aug 25, 2015
·
3 revisions
Many parts of libhxl (both the Python library and the command-line tools) use tag patterns to select specific columns in a HXL dataset. Tag patterns are similar to tags, but they allow excluding attributes (with -) as well as including attributes (with +). Here are some examples:
-
#adm1+name— match any column tagged with#adm1that has the attribute+name(possibly among others). -
#adm1-name— match any column tagged with#adm1that does not have the attribute+name(though it may have others). -
#affected+f-children— match any column tagged with#affectedthat has the attribute+fbut does not have the attribute+children(regardless of what other attributes may appear).
| Tag pattern | Matches | Does not match |
|---|---|---|
| #org+code | #org+code #org+code+fts |
#org #org+name |
| #org-code | #org #org+name+fr |
#org+code #org+fts+code |
| #sector+cluster-code | #sector+cluster #sector+un+cluster |
#sector+code #sector+un |
Standard: http://hxlstandard.org | Mailing list: hxlproject@googlegroups.com