Class XmlRouteSchema

Namespace: redb.Route.Xml
Assembly: redb.Route.Xml.dll

The XSD of the route format, GENERATED from the element registry: the parser, the
schema and the catalog read one list, so they cannot drift apart. The schema covers the
container skeleton (<routes>/<context>, <bean>,
<route>) plus every registered element with its attributes, enum hints and
content model. Package contributions appear automatically; the endpoint children of the
structured form (§7.2) are open content until a component catalog supplies the scheme
elements. One namespace, urn:redb:route:1.0; foreign-namespace attributes are
tolerated (anyAttribute ##other lax), foreign elements are not.

public static class XmlRouteSchema

Inheritance

Object→XmlRouteSchema

Properties

CoreSet

The compiled schema of the core element set — generated and compiled once.

public static XmlSchemaSet CoreSet { get; }

Methods

For(ElementRegistry)

The compiled schema for a registry (cached per registry instance).

public static XmlSchemaSet For(ElementRegistry registry)

Generate(ElementRegistry, IReadOnlyList<CatalogComponent>?)

Generates the schema document for a registry — also the file the tooling ships.

public static XDocument Generate(ElementRegistry registry, IReadOnlyList<CatalogComponent>? catalog = null)

Validate(XDocument, ElementRegistry, IReadOnlyList<CatalogComponent>)

Validates against a schema that also knows the component catalog: the §7.2 endpoint

public static IReadOnlyList<(int Line, int Column, string Message)> Validate(XDocument document, ElementRegistry registry, IReadOnlyList<CatalogComponent> catalog)

Validate(XDocument, ElementRegistry)

Validates a document against the registry's schema. Returns one positioned message per

public static IReadOnlyList<(int Line, int Column, string Message)> Validate(XDocument document, ElementRegistry registry)

Validate(XDocument, XmlSchemaSet)

Validates against an already-compiled set (the loader's hot path).

public static IReadOnlyList<(int Line, int Column, string Message)> Validate(XDocument document, XmlSchemaSet schema)