Create a new XPath lexer.
OptionalversionOrOptions: XPathVersion | XPathLexerOptionsEither an XPath version string ('1.0', '2.0', '3.0', '3.1') or an options object with a version property. Defaults to '1.0' for backward compatibility.
Get the XPath version this lexer is configured for.
Register additional function names to be recognized by the lexer. Used for XSLT extension functions.
Check if character is a valid start of an identifier. Supports Unicode letters according to XML NCName specification.
Check if character is valid in an identifier (after the first character). Supports Unicode letters and digits according to XML NCName specification. Note: Hyphen is handled separately in parseIdentifier for reserved words.
Parse string template: Hello {$name}!
Returns the entire template as-is for the parser to handle interpolation.
Parse EQName (Expanded QName): Q{uri}local-name XPath 3.0 syntax for directly specifying namespace URIs. Example: Q{http://www.w3.org/2005/xpath-functions/math}pi
Lexer (tokenizer) for XPath expressions.
Converts XPath expression strings into a sequence of tokens that can be parsed by XPath10Parser or XPath20Parser.
Example