Expand description
SchemaSet builder with compile() pattern
Provides a fluent API for loading multiple schemas before compilation, similar to .NET’s XmlSchemaSet pattern.
XSD version is set on the builder — the parser derives it automatically.
Use SchemaSetBuilder::xsd11() for XSD 1.1, SchemaSetBuilder::new() for XSD 1.0.
§Example
use xsd_schema::SchemaSetBuilder;
let compiled = SchemaSetBuilder::new()
.add_source(r#"<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="xs:string"/>
</xs:schema>"#, "schema.xsd")
.expect("parse failed")
.compile()
.expect("compile failed");
println!("Loaded {} documents", compiled.stats.documents_loaded);Structs§
- Compilation
Stats - Statistics from schema compilation.
- Compiled
Schema Set - Compiled schema set ready for validation.
- Schema
SetBuilder - Builder for creating compiled schema sets.