Exactly which XPath
This tester evaluates XPath 1.0 (the 1999 recommendation) with its 27 core functions, using the browser’s built-in engine. Functions such as matches(), lower-case() and ends-with(), and constructs such as for/let, if-then-else and the ! and => operators, belong to XPath 2.0–3.1. Expressions that use them are flagged as unsupported before evaluation.
Results keep their declared type: a node-set lists each node with its kind, qualified name, expanded name and source line; numbers, strings and booleans are shown as values. Zero matches, an invalid expression and a broken document are three different outcomes.
Default namespaces
In XPath 1.0 an unprefixed name matches only elements in no namespace. If the document has a default namespace, bind a prefix to it in the namespace table (the tester suggests one) and use that prefix in the expression.
Questions
Does the query run in a worker?
No. The browser’s XPath engine needs DOMParser, which is not available in Web Workers, so it runs on the page with limits: documents up to 5 MB, expressions up to 2,000 characters, and at most 1,000 listed results.
Is the DOCTYPE used?
No. The document is checked by BeautifyXML’s own parser first, and the DOCTYPE is blanked out before the browser parser sees it, so nothing external is consulted.