@@ -4,20 +4,52 @@ Our XPath implementation in TypeScript.
44
55## Current Status
66
7- - ** XPath 1.0** : ✅ Fully implemented and tested (1176 tests passing across 36 test suites)
8- - ** XPath 2.0/3.0/3.1** : 🔧 Infrastructure prepared, awaiting implementation
7+ - ** XPath 1.0** : ✅ Fully implemented and tested
8+ - ** XPath 2.0/3.0/3.1** : ✅ Fully implemented, including maps, arrays, and JSON support (99.9% test pass rate)
99
1010## Features
1111
12- - ✅ Complete XPath 1.0 specification support
13- - ✅ Pure TypeScript implementation with strong typing
14- - ✅ XSLT Extensions API for XSLT 1.0 functions
15- - ✅ Version infrastructure for future XPath 2.0+ support
16- - ✅ Custom function support
17- - ✅ Flexible context system
18- - ✅ Comprehensive test coverage (1176 tests, 77% code coverage)
19- - ✅ Complete TypeDoc API documentation
20- - ✅ Automated GitHub Pages publishing
12+ ### Core Capabilities
13+
14+ - ** Pure TypeScript** : Written in strictly typed TypeScript for robustness and ease of use.
15+ - ** Supported Versions** : Full support for XPath 1.0, 2.0, 3.0, and 3.1.
16+ - ** Extensible** : Custom function support and XSLT Extensions API.
17+ - ** Isomorphic** : Runs in Node.js and modern browsers.
18+
19+ ### XPath 3.1 & JSON Support
20+
21+ - ** Maps & Arrays** : Native support for XDM Maps and Arrays, fully interoperable with JSON.
22+ - ** JSON Functions** : ` parse-json ` (with liberal mode support), ` json-to-xml ` , ` xml-to-json ` .
23+ - ** Lookup Operator** : Drill down into data structures using the ` ? ` operator (e.g., ` $data?users?1?name ` ).
24+ - ** Constructors** : Create maps and arrays using ` map { ... } ` and ` array { ... } ` (or square brackets ` [] ` ).
25+
26+ ### Advanced Expressions
27+
28+ - ** Arrow Operator (` => ` )** : Chain function calls for cleaner code (e.g., ` $str => upper-case() => normalize-space() ` ).
29+ - ** String Templates** : Interpolated strings using backticks (`` `Hello {$name}` `` ).
30+ - ** Inline Functions** : Define anonymous functions/lambdas (e.g., ` function($x) { $x * 2 } ` ).
31+ - ** Range Operator** : Generate sequences easily with ` 1 to 10 ` .
32+ - ** Control Flow** : Support for ` if/then/else ` , ` for ` , ` some/every ` quantifiers, and ` try/catch ` .
33+
34+ ### Schema & Types
35+
36+ - ** Schema-Awareness** : Full support for validating nodes against XML Schemas and handling typed values.
37+ - ** Type Checking** : Advanced type system handling ` instance of ` , ` castable as ` , and ` treat as ` .
38+ - ** Union Types** : Support for complex type definitions and checking.
39+
40+ ### Performance & Streaming
41+
42+ - ** Streaming Evaluation** : Capable of processing large documents with low memory footprint using XSLT 3.0 capabilities (posture and sweep analysis).
43+ - ** Profiler** : Built-in expression profiler to analyze execution time and memory usage.
44+ - ** Optimizer** : Static analysis tools to suggest query optimizations.
45+
46+ ### Enhanced Function Library
47+
48+ - ** Regular Expressions** : Full XPath regex support including flags (` i ` , ` m ` , ` s ` , ` x ` ) and ` analyze-string ` .
49+ - ** Date/Time** : Comprehensive duration, date, and time manipulation.
50+ - ** Environment** : Access system environment variables via ` fn:environment-variable ` .
51+ - ** Node Functions** : Advanced node operations like ` generate-id ` , ` path ` , ` innermost ` , and ` outermost ` .
52+ - ** Higher-Order Functions** : Functional programming with ` map ` , ` filter ` , ` fold-left ` , ` fold-right ` , and ` sort ` .
2153
2254## Documentation
2355
0 commit comments