Uses thread-safe operation to populate cache that is potentially shared across threads that are running tests in parallel.
Uses thread-safe operation to populate cache that is potentially shared across threads that are running tests in parallel. We want only one compilation of a schema for a given URI schema source, because schema compilation can be quite expensive.
If compilation fails with diagnostics, the cache is not populated.
If the same URI is used, and it identifies a file, then if the modification time is such that the file is newer then when last compiled, the newer file will be compiled and cached.
If compileAllTopLevels is true, then all elements are compiled. If false, and no rootElementName is null, then the first element of the first schema file is used as the single root element. Otherwise the rootElementName must be provided. If ambiguous, the rootElementNamespace must also be supplied but this can be null if the name alone is unambiguous.
A cache of things associated with URISchemaSources.
Recompiles if URI is a file and the modification date has changed.
Thread safe so that multiple threads can share a compiled schema for the same URI. One thread will wait while the other compiles it.