Skip to main content

blackline_core/
lib.rs

1//! # blackline-core
2//!
3//! Shared foundations for the `blackline` Office toolkit:
4//!
5//! - [`package`] — in-memory OPC (ZIP) packages: parts, lossless untouched
6//!   bytes, save / extract / rebuild from a directory.
7//! - [`xml`] — a small XML DOM tuned for OOXML editing.
8//! - [`formula`] — query layer: RFC 5261 / XPath-subset selectors and
9//!   formulas (`count(//ins)`, `text(//p[0])`) evaluated against [`XmlNode`].
10//! - [`patch`] — RFC 5261 `add` / `replace` / `remove`, compiled to [`TreeOp`].
11//! - [`update`] — XQuery Update verbs, compiled to [`TreeOp`].
12//! - [`tree`] — path-addressed XML mutations (`TreeOp`) that every
13//!   higher layer compiles down to.
14//! - [`rels`] / [`ctypes`] — relationships and `[Content_Types].xml`.
15//! - [`mod@diff`] / [`textutil`] — tokenization, sentence splits, LCS.
16//! - [`validate`] — structured package health checks.
17
18pub mod ctypes;
19pub mod diff;
20pub mod error;
21pub mod formula;
22pub mod ns;
23pub mod opc;
24pub mod package;
25pub mod patch;
26pub mod rels;
27pub mod textutil;
28pub mod time;
29pub mod tree;
30pub mod update;
31pub mod validate;
32pub mod xml;
33
34pub use ctypes::ContentTypes;
35pub use diff::{diff, diff_minimal, mark, mark_minimal, minimize_hunks, DiffHunk, Granularity};
36pub use error::CoreError;
37pub use formula::{
38    eval_str, select_str, Formula, Match as FormulaMatch, Selector, Value as FormulaValue,
39};
40pub use package::Package;
41pub use patch::{parse_ops as parse_patch_ops, PatchOp};
42pub use rels::{Relationship, Relationships};
43pub use tree::{NodePath, TreeOp, TreeOpReport};
44pub use update::{parse_ops as parse_update_ops, UpdateOp};
45pub use validate::{check, HealthReport};
46pub use xml::{XmlDocument, XmlNode};