Highlights
HTML Parser Rewrite
- Full WHATWG spec compliance — complete implementation of the tree construction algorithm including all insertion modes (InBody, InHead, InTable, InSelect, AfterHead, Frameset, etc.)
- Foreign content parsing — SVG element name case correction, foreign attribute namespace assignment (WHATWG 13.2.6)
- Fragment parsing — implement the HTML fragment parsing algorithm (WHATWG 13.4)
- Quirks mode — proper quirks mode determination
- Spec-correct edge cases — adoption agency algorithm, foster parenting, duplicate attribute deduplication, implicit insertion
XPath Evaluator — Near-Complete XPath 3.1 Support
- All operator types — logical (and/or), comparison (value + general + node), arithmetic, string concatenation (||), range (to), simple map (!), arrow (=>)
- All expression types — if/then/else, for, let, some/every (quantified), instance of, cast as, castable as, treat as
- All axes — forward (child, descendant, self, descendant-or-self, following-sibling, following, attribute, namespace) and reverse (parent, ancestor, preceding-sibling, preceding, ancestor-or-self)
- 100+ built-in functions across string, numeric, boolean, sequence, node, aggregate, regex, higher-order, map:, array:, and math:* namespaces
- Maps and arrays — constructor evaluation, map-as-function calling, postfix lookup (?key)
- Function items — named function references, inline functions, partial application via argument placeholders
- URI-qualified names — support in function calls and cast expressions
- Kind tests — element, attribute, comment, processing-instruction, document-node tests
Breaking Changes
This release includes a complete HTML parser rewrite. The parse tree now follows WHATWG browser behavior (e.g., implicit insertion in tables). If you were relying on the previous parser's non-standard tree shapes, your XPath expressions may need updating.
Full Changelog: v0.7.0-beta.2...v0.7.0