public PageTemplateRegistry read(List<NamedReader> pageReaders,boolean validateReaderNames) {
        // Initialize state
        registry=new PageTemplateRegistry();

        // Phase 1
        pageElementsByPageId=createPages(pageReaders,validateReaderNames);
        // Phase 2
        readPages();
        return registry;
    }
Reads all page template xml files in a given list of readers. This is called from the Vespa configuration model.

@param validateReaderNames should be set to true if the readers were created by files, not otherwise
@throws RuntimeException if <code>directory</code> is not a readable directory, or if there is some error in the XML
container-search/src/main/java/com/yahoo/search/pagetemplates/config/PageTemplateXMLReader.java