@designliquido/xpath
    Preparing search index...

    Interface XPathLexerOptions

    Configuration options for the XPath lexer.

    interface XPathLexerOptions {
        version?: XPathVersion;
    }
    Index

    Properties

    Properties

    version?: XPathVersion

    XPath specification version to use for tokenization.

    • '1.0': XPath 1.0 keywords only (and, or, div, mod, axes, node types, core functions)
    • '2.0': Adds XPath 2.0 reserved words (if, then, else, for, return, some, every, etc.)
    • '3.0'/'3.1': Same as 2.0 (reserved words are forward-compatible)

    Default: '1.0'

    // XPath 1.0 lexer (treats 'if', 'then', 'else' as identifiers)
    const lexer10 = new XPathLexer({ version: '1.0' });

    // XPath 2.0 lexer (treats 'if', 'then', 'else' as reserved words)
    const lexer20 = new XPathLexer({ version: '2.0' });