1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! FO tree data structures
//!
//! This module provides the tree structure for storing formatting objects.
//! Uses arena allocation with index-based handles for memory efficiency.
//!
//! # Architecture
//!
//! - **Arena allocation**: All nodes stored in contiguous memory (cache-friendly)
//! - **Index-based handles**: NodeId is just usize (no Rc/RefCell overhead)
//! - **Tree builder**: SAX-like parser that constructs tree from XML events
//! - **Validation**: Element nesting rules enforcement
//!
//! # Example
//!
//! ```no_run
//! use fop_core::FoTreeBuilder;
//! use std::io::Cursor;
//!
//! let xml = r#"<?xml version="1.0"?>
//! <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
//! <fo:layout-master-set>
//! <fo:simple-page-master master-name="A4">
//! <fo:region-body/>
//! </fo:simple-page-master>
//! </fo:layout-master-set>
//! </fo:root>"#;
//!
//! let builder = FoTreeBuilder::new();
//! let arena = builder.parse(Cursor::new(xml)).unwrap();
//!
//! println!("Parsed {} nodes", arena.len());
//! ```
pub use ;
pub use FoTreeBuilder;
pub use IdRegistry;
pub use ;
pub use NestingValidator;