private void readPages() {
        for (Map.Entry<ComponentId,Element> pageElement : pageElementsByPageId.entrySet()) {
            try {
                PageTemplate page = registry.getComponent(pageElement.getValue().getAttribute("id"));
                readPageContent(pageElement.getValue(), page);
            }
            catch (IllegalArgumentException e) {
                throw new IllegalArgumentException("Could not read page template '" + pageElement.getKey() + "'",e);
            }
        }
    }
Throws an exception if the name is not corresponding to the id
container-search/src/main/java/com/yahoo/search/pagetemplates/config/PageTemplateXMLReader.java