Saturday, 30 May 2026

One XML instance with many possible schemas

 I find it understandable why we might want one XML instance to be valid according to one primary structural, but many possible secondary schemas, typically one secondary schema for each possible context. 


For example, ChatGPT can ‘understand’ it as follows:


“The core schema defines the common platform. The secondary schemas define variants, profiles, configurations, or specializations of that platform. Just as a software product family may contain many product-line variants built upon a shared core architecture, a document ecosystem may contain many contextual validation overlays built upon a shared canonical structure.

Seen this way, the existence of many secondary schemas is not a sign of fragmentation or poor design. It is an expected consequence of separating structural stability from contextual variability. The core schema remains relatively stable because the fundamental concepts of the domain change slowly. The secondary schemas proliferate because contexts, technologies, regulations, workflows, organizations, and business requirements change much more rapidly.

Indeed, in a mature ecosystem one might expect the number of secondary schemas to greatly exceed the number of primary schemas. There may be a single canonical business-document structure but hundreds of contextual overlays accumulated over time. New overlays can be added as new requirements emerge without forcing redesign of the foundational vocabulary.

This perspective also helps explain why the notion of "the schema" can become misleading. In conventional XML discussions, one often speaks as though a document has a single schema that completely defines it. In an overlay-oriented architecture, however, validation becomes a layered process. A document may simultaneously participate in multiple validation regimes, each contributing a different aspect of its interpretation. The primary schema provides structural legitimacy. The secondary schemas provide contextual legitimacy.

The result is a model in which a document is not characterized by one absolute type, but by a combination of structural conformance and contextual conformance. The canonical structure supplies continuity and interoperability, while the overlay schemas supply specialization and adaptability. That division of responsibility is precisely what makes the architecture capable of evolving over long periods without requiring continual redefinition of the core standard itself.”

No comments:

Post a Comment