pub fn bind_node(
arena: &mut AstArena,
id: AstNodeId,
ctx: &XPathContext<'_>,
binder: &mut NameBinder,
) -> Result<(), XPathError>Expand description
Bind an AST node and all its children.
This function performs static analysis on the AST:
- Resolves function calls to
FunctionId - Resolves variable references to slot indices
- Validates namespace prefixes
§Arguments
arena- The AST arena containing all nodesid- The ID of the node to bindctx- The static context for namespace resolutionbinder- The name binder for variable slot allocation
§Returns
Ok(())if binding succeedsErr(XPathError)with appropriate error code if binding fails
§Errors
XPST0081- Undefined namespace prefixXPST0017- Function not foundXPST0008- Undefined variable