Expand description
Main XSD parser event loop
This module provides the main parser that processes XSD documents using a frame-based state machine. Each XSD element type is handled by a corresponding frame that validates structure and collects content.
§Architecture
The parser uses:
TrackedReaderfor XML parsing with byte position trackingNamespaceContextfor scoped namespace management- Frame stack for nested element handling
create_framefactory for frame instantiation
§Example
use xsd_schema::parser::parse::parse_schema;
use xsd_schema::SchemaSet;
let mut schema_set = SchemaSet::new();
let xsd = r#"<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="xs:string"/>
</xs:schema>"#;
let doc_id = parse_schema(xsd.as_bytes(), "test.xsd", &mut schema_set)
.expect("parse failed");
assert_eq!(doc_id, 0);Structs§
- Parser
Config - Parser configuration options
Functions§
- parse_
schema - Parse an XSD schema document
- parse_
schema_ with_ chameleon - Parse an XSD schema document with chameleon namespace support.
- parse_
schema_ with_ config - Parse an XSD schema document with custom configuration.