Skip to content
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 #adm1 that has the attribute +name (possibly among others).
  • #adm1-name — match any column tagged with #adm1 that does not have the attribute +name (though it may have others).
  • #affected+f-children — match any column tagged with #affected that has the attribute +f but does not have the attribute +children (regardless of what other attributes may appear).

Examples

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