private Object readFieldValue(Element field, String name, String targetDescription, QueryProfileRegistry registry) {
        Element ref = XML.getChild(field,"ref");
        if (ref != null) {
            String referencedName = XML.getValue(ref);
            QueryProfile referenced = registry.getComponent(referencedName);
            if (referenced == null)
                throw new IllegalArgumentException("Could not find query profile '" + referencedName + "' referenced as '" +
                                                   name + "' in " + targetDescription);
            return referenced;
        }
        else {
            return XML.getValue(field);
        }
    }
Throws an exception if the name is not corresponding to the id
container-search/src/main/java/com/yahoo/search/query/profile/config/QueryProfileXMLReader.java