pub struct SchematronSchema {
pub title: Option<String>,
pub phases: HashMap<String, SchematronPhase>,
pub rules: HashMap<String, SchematronRule>,
pub pattern_groups: HashMap<String, Vec<String>>,
pub pattern_order: Vec<String>,
pub ns: HashMap<String, String>,
pub query_binding: String,
pub default_phase: Option<String>,
pub diagnostics: HashMap<String, SchematronDiagnostic>,
pub errors: Vec<String>,
}Expand description
A compiled ISO Schematron schema.
§UPSTREAM-PARITY
Mirrors libxml2’s xmlSchematron internal structure.
Fields§
§title: Option<String>Schema title.
phases: HashMap<String, SchematronPhase>Named phases (empty = use default phase = all rules).
rules: HashMap<String, SchematronRule>All defined rules, keyed by ID.
pattern_groups: HashMap<String, Vec<String>>Pattern-level grouping: pattern ID -> list of rule IDs.
pattern_order: Vec<String>Order of pattern groups (preserves document order).
ns: HashMap<String, String>Namespace prefix mappings.
query_binding: StringQuery binding (default “xslt”).
default_phase: Option<String>Default phase (if phases exist, the first one is default).
diagnostics: HashMap<String, SchematronDiagnostic>Diagnostics definitions.
errors: Vec<String>Errors encountered during parsing.
Implementations§
Source§impl SchematronSchema
impl SchematronSchema
Sourcepub fn resolve_rule(&self, rule_id: &str) -> Option<SchematronRule>
pub fn resolve_rule(&self, rule_id: &str) -> Option<SchematronRule>
Resolve a rule by ID, following extends chains.
Sourcepub fn active_rules(&self, phase_id: Option<&str>) -> Vec<SchematronRule>
pub fn active_rules(&self, phase_id: Option<&str>) -> Vec<SchematronRule>
Get the active rules for a given phase.
If phase_id is None, returns all non-abstract rules.
If a phase is specified, returns only rules referenced by that phase’s active patterns.
Trait Implementations§
Source§impl Clone for SchematronSchema
impl Clone for SchematronSchema
Source§fn clone(&self) -> SchematronSchema
fn clone(&self) -> SchematronSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchematronSchema
impl Debug for SchematronSchema
Auto Trait Implementations§
impl Freeze for SchematronSchema
impl RefUnwindSafe for SchematronSchema
impl Send for SchematronSchema
impl Sync for SchematronSchema
impl Unpin for SchematronSchema
impl UnsafeUnpin for SchematronSchema
impl UnwindSafe for SchematronSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more