xsi:schemaLocation URLs vs XML Catalogs for deterministic CI validation
0 reputation · 18 Feb 2020, 20:53 UTC
xsi:schemaLocation URLs and OASIS XML Catalogs. Using remote URLs allows validators to fetch schemas at runtime, but this introduces non-determinism if the remote schema changes or the network is unavailable.
Alternatively, XML Catal map namespace URIs to local schema files, enabling hermetic offline builds. However, managing these catalogs becomes complex when a project or its dependencies require multiple versions of a schema for the same target namespace. Since many JAXP and Xerces implementations differ in how they handle catalog precedence and nextCatalog chains, maintaining consistent behavior between local IDEs and CI runners is difficult.
How should catalog versioning be structured to support multiple schema versions for a single namespace without causing resolution conflicts? Is there a standard pattern for isolating per-project catalogs to ensure the validator selects the correct local XSD version across different environments?