// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! XPath 1.0 for Zig 0.17, over a [ztree][] document. //! //! [ztree]: https://git.jcollie.dev/jeff/ztree //! //! Compiling and evaluating are separate, because they answer to different //! contexts. A prefix in an expression means whatever the *document the //! expression was written in* said it meant, which is settled once, when the //! expression is compiled; the context node and the variables are settled //! every time it runs. //! //! ```zig //! const zxpath = @import("zxpath"); //! //! var compiled = try zxpath.Compiled.init(gpa, "//book[@lang='en']/title", .none); //! defer compiled.deinit(); //! //! var ev: zxpath.Evaluator(error{}) = .init(gpa); //! const v = try ev.eval(compiled.expr, .{ .node = doc.ref(doc.root) }); //! defer v.deinit(gpa); //! ``` const std = @import("std"); pub const xpath = @import("xpath.zig"); pub const value = @import("value.zig"); pub const eval = @import("eval.zig"); pub const functions = @import("functions.zig"); // The compiler and the evaluator are what this library is, so their names are // the library's names. pub const compile = xpath.compile; pub const Compiled = xpath.Compiled; pub const CompileError = xpath.CompileError; pub const Expr = xpath.Expr; pub const Step = xpath.Step; pub const Axis = xpath.Axis; pub const NodeTest = xpath.NodeTest; pub const BinOp = xpath.BinOp; pub const NsResolver = xpath.NsResolver; pub const MapResolver = xpath.MapResolver; pub const Value = value.Value; pub const NodeSetBuilder = value.NodeSetBuilder; pub const numberToString = value.numberToString; pub const stringToNumber = value.stringToNumber; pub const Evaluator = eval.Evaluator; pub const CoreError = eval.CoreError; pub const Focus = eval.Focus; pub const matchesTest = eval.matchesTest; pub const max_depth = eval.max_depth; test { std.testing.refAllDecls(@This()); }