@designliquido/xpath
    Preparing search index...

    Interface XPathBaseParserOptions

    Parser options that include XSLT extensions support.

    interface XPathBaseParserOptions {
        version?: "1.0" | "2.0" | "3.0" | "3.1";
        extensions?: XSLTExtensions;
        cache?: boolean;
        strict?: boolean;
        enableNamespaceAxis?: boolean;
        staticContext?: XPathStaticContext;
        xpath10CompatibilityMode?: boolean;
        warningConfig?: WarningConfiguration;
        warningCollector?: WarningCollector;
    }
    Index

    Properties

    version?: "1.0" | "2.0" | "3.0" | "3.1"

    XPath specification version to use.

    • '1.0': XPath 1.0 (default, fully implemented)
    • '2.0': XPath 2.0 (adds if-then-else, for, quantified expressions, type system)
    • '3.0': XPath 3.0 (not yet implemented, falls back to 2.0 parser)
    • '3.1': XPath 3.1 (not yet implemented, falls back to 2.0 parser)

    When using XPath10Parser, only '1.0' is valid. When using XPath20Parser, only '2.0' is valid (in strict mode). Use createXPathParser() factory for automatic version selection.

    Default: '1.0'

    extensions?: XSLTExtensions

    Optional XSLT extensions to enable. When provided, the parser will recognize and allow calling XSLT functions.

    cache?: boolean

    Whether to cache parsed expressions for reuse. Default: false

    strict?: boolean

    Strict mode: throw errors for unsupported features. When false, unsupported features may be silently ignored or cause warnings. Default: true

    enableNamespaceAxis?: boolean

    Enable support for the deprecated namespace axis (namespace::). Default: false (raises XPST0010 when used).

    staticContext?: XPathStaticContext

    Static context configuration (in-scope types, functions, collations, variables). Defaults to an empty static context with XPath-defined namespaces.

    xpath10CompatibilityMode?: boolean

    Enable XPath 1.0 backward compatibility mode.

    When true, XPath 2.0+ expressions follow XPath 1.0 type conversion rules. This enables:

    • XPath 1.0 boolean conversion semantics
    • XPath 1.0 numeric conversion (with NaN for empty sequences)
    • XPath 1.0 comparison rules (node-set to string conversion)
    • XPath 1.0 logical operator behavior (short-circuit, error suppression)

    This option is only meaningful when version is '2.0' or higher. When version is '1.0', this option is ignored (1.0 semantics are used).

    Default: false (XPath 2.0 semantics when using 2.0+ parser)

    warningConfig?: WarningConfiguration

    Warning configuration for deprecated features and migration guidance (Phase 8.2). Configure how warnings are collected, filtered, and reported. Default: warnings enabled with 'info' minimum severity

    warningCollector?: WarningCollector

    Warning collector instance for gathering warnings during parsing. If not provided, a new collector will be created based on warningConfig. Passing an existing collector allows aggregating warnings across multiple parses.