public static List<String> splitAndDiscardEmpty(String field, String regex) {
        List<String> ret = new ArrayList<>();
        for (String t : field.split(regex)) {
            if (!t.isEmpty()) {
                ret.add(t);
            }
        }
        return ret;
    }
For searchers inside search chains, the id may be both a reference and an id at once, or just a reference.
In other cases, it is clear which one it is from context, so I think the difference is not worth bothering users
with, unless they are XML purists in which case they will have the option of writing this correctly.
- Jon
config-model/src/main/java/com/yahoo/config/model/builder/xml/XmlHelper.java