graph LR
Extension_Core["Extension Core"]
Configuration_Service["Configuration Service"]
Globals_Provider["Globals Provider"]
Lexical_Engine["Lexical Engine"]
Symbol_Index["Symbol Index"]
Language_Service_Layer["Language Service Layer"]
Task_Integration["Task Integration"]
Document_Event_Hub["Document Event Hub"]
Unclassified["Unclassified"]
Extension_Core -- "activates and reads language‑specific settings" --> Configuration_Service
Extension_Core -- "provides Globals Provider instance to Lexical Engine" --> Globals_Provider
Extension_Core -- "instantiates lexers with configuration" --> Lexical_Engine
Extension_Core -- "registers symbol‑provider instances" --> Symbol_Index
Extension_Core -- "registers language‑service providers" --> Language_Service_Layer
Extension_Core -- "registers Saxon task providers" --> Task_Integration
Extension_Core -- "creates and wires document change handler" --> Document_Event_Hub
Lexical_Engine -- "resolves imports via Globals Provider" --> Globals_Provider
Lexical_Engine -- "emits parsed symbols to Symbol Index" --> Symbol_Index
Document_Event_Hub -- "triggers fresh lexing on document change" --> Lexical_Engine
Document_Event_Hub -- "notifies Symbol Index to refresh cache after re‑lexing" --> Symbol_Index
Language_Service_Layer -- "queries Symbol Index for completions, hover, definitions, references, diagnostics" --> Symbol_Index
Language_Service_Layer -- "reads language‑specific settings for completions and validation" --> Configuration_Service
Task_Integration -- "reports task progress/completion via VS Code UI" --> Extension_Core
Globals_Provider -- "surfaces import errors through diagnostics flow" --> Language_Service_Layer
click Extension_Core href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Extension_Core.md" "Details"
click Configuration_Service href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Configuration_Service.md" "Details"
click Lexical_Engine href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Lexical_Engine.md" "Details"
click Symbol_Index href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Symbol_Index.md" "Details"
click Language_Service_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Language_Service_Layer.md" "Details"
click Task_Integration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Task_Integration.md" "Details"
click Document_Event_Hub href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/vscode-xslt-tokenizer/Document_Event_Hub.md" "Details"
The XSLT‑XPath VS Code extension is built around a lightweight Extension Core that initializes the plug‑in and connects six functional subsystems. A Configuration Service supplies typed language settings to all parts. The Lexical Engine (full XSLT lexer, light XSLT lexer, XPath lexer) parses source files into token streams and, via the Globals Provider, resolves imported XSLT modules to produce global‑instruction data. Parsed symbols are stored in the Symbol Index, a workspace‑wide map refreshed on every document change by the Document Event Hub. Editor‑side features—completion, hover, definition, reference, diagnostics, formatting, and code‑actions—are implemented in the Language Service Layer, each provider querying the Symbol Index and Configuration Service to deliver precise, schema‑aware results. Task Integration exposes Saxon‑Java and Saxon‑JS executions as VS Code tasks, using the same configuration data and reporting status through the native VS Code task UI. This separation yields a clear flow: activation → configuration → lexing → symbol indexing → language services, with document events and task execution feeding back into the core loop.
Extension Core [Expand]
Boots the extension, creates the Configuration Service, Globals Provider, Lexical Engine and Document Event Hub; registers all VS Code contributions (symbol providers, completion providers, task providers, link providers, formatting, diagnostics, UI commands).
Related Classes/Methods:
Configuration Service [Expand]
Centralised, typed access to all language‑specific settings (XSLT, XPath, DCP, Schematron, XML, XSLT‑Light, XProc). Provides LanguageConfiguration objects consumed by the lexer, token‑providers and formatters.
Related Classes/Methods:
languageConfigurations.XSLTConfigurationlanguageConfigurations.XPathConfigurationlanguageConfigurations.DCPConfigurationlanguageConfigurations.SchConfigurationlanguageConfigurations.XMLConfigurationlanguageConfigurations.XSLTLightConfiguration
Reads external XSLT files referenced by xsl:import / xsl:include and returns the global instruction data needed by the lexer for cross‑file symbol resolution.
Related Classes/Methods:
Lexical Engine [Expand]
Turns raw XSLT / XPath source text into token streams and global instruction data. Includes full XSLT lexer (XslLexer), light XSLT lexer (XslLexerLight) for fast global‑instruction extraction, and XPath lexer (XPathLexer).
Related Classes/Methods:
Symbol Index [Expand]
Maintains a workspace‑wide map of XSLT/DCP symbols (templates, functions, variables, keys, etc.). Updated on document changes, queried by all language‑service providers.
Related Classes/Methods:
Language Service Layer [Expand]
Implements VS Code language‑service APIs (completion, hover, definition, reference, diagnostics, formatting, code‑actions). Each provider consumes the Symbol Index and the Configuration Service to produce editor‑side results.
Related Classes/Methods:
xsltTokenCompletions.XsltTokenCompletionsxsltHoverProvider.XSLTHoverProviderxsltDefinitionProvider.XsltDefinitionProviderxsltReferenceProvider.XSLTReferenceProviderxsltTokenDiagnostics.XsltTokenDiagnosticsxmlDocumentFormattingProvider.XMLDocumentFormattingProviderxsltCodeActions.XSLTCodeActions
Task Integration [Expand]
Wraps Saxon‑Java and Saxon‑JS command‑line executions as VS Code Task objects. Reads configuration (paths, options) and reports task completion via VS Code UI.
Related Classes/Methods:
Document Event Hub [Expand]
Listens to VS Code document‑change events, debounces them and triggers re‑lexing + symbol‑index refreshes. Also drives on‑type suggestion triggers for XPath.
Related Classes/Methods:
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
Related Classes/Methods: None