Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Bosak XPath / XSLTNew to Visual Studio Code? Get it now.
Bosak XPath / XSLT

Bosak XPath / XSLT

Fytala

|
4 installs
| (0) | Free
Language support for XPath 3.1 and XSLT 3.0 using the Bosak engine
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bosak XPath / XSLT — VS Code Extension

Language support for XPath 3.1 and XSLT 3.0 powered by the Bosak engine.

Engine alignment (0.2.5 candidate)

Version 0.2.5 prepares released engine 1.16.5, including structural record subtyping and the intervening XSLT fixes. Requires .NET 10. Experimental 4.0 coverage remains bounded. Package-dependent editor signatures and external module acquisition retain their existing limits. This refresh adds no insertion UI. Publication is pending separate approval.

Engine alignment (0.2.4)

Version 0.2.4 is published on the VS Code Marketplace, bundling released engine 1.8.0 and updating the transitive brace-expansion dependency to 2.1.7. Public package contents, diagnostics and isolated editor live correction verify. Requires .NET 10. Update the extension and reload VS Code. Package-dependent editor signatures and external module acquisition retain their existing limits. This engine refresh does not add an insertion UI.

Engine alignment (0.2.3)

Version 0.2.3 bundles released engine 1.7.1, including lexical original binding in escaping inline functions. Package-dependent editor signatures and external module acquisition keep their existing coverage limits. Requires the .NET 10 runtime. Version 0.2.3 is published on the VS Code Marketplace. Update the extension and reload VS Code.

Engine alignment (0.2.2)

Version 0.2.2 bundles released engine 1.7.0, including bounded direct and transitive abstract optional function overrides. Package-dependent editor signatures and external module acquisition retain their existing coverage limits. Requires the .NET 10 runtime. Version 0.2.2 is published on the VS Code Marketplace. Update the extension and reload VS Code.

Engine alignment (0.2.1)

Version 0.2.1 bundles engine 1.6.0. This refresh includes the released used-package optional argument and public optional override behavior in the runtime. Editor package-dependent signatures and external module acquisition retain their existing coverage limits; a newer bundle does not enable those editor checks. The .NET 10 runtime remains required. Version 0.2.1 is published on the VS Code Marketplace. Update the extension and reload VS Code.

Engine alignment (0.2.0)

Version 0.2.0 bundles Bosak 1.4.0, including bounded XSLT 4.0 optional/default arguments and private functions without a namespace. Editor diagnostics use the effective stylesheet context, refresh during editing and report incomplete validation coverage as warnings. External include/import resolution remains deferred in this editor integration. The .NET server launches through dotnet for DLL bundles; runtime language-client dependencies are included. Startup provider registration and diagnostic report serialization are corrected. Requires the .NET 10 runtime. Version 0.2.0 is published on the VS Code Marketplace. Update the extension and reload VS Code.

Highlighting correction (0.1.6)

XML attribute names and plain attribute values have separate scopes. In XSLT expression attributes such as select="concat('a','b')", attribute names, function calls, strings, variables and numbers use distinct token categories. Both XML quote styles and multiline values are supported. Colors follow the active theme; Dark+ displays select light blue, concat yellow and the strings orange.

Version 0.1.6 is published on the VS Code Marketplace. Update the Bosak extension and reload VS Code. A local VSIX is also available. Use Extensions: Install from VSIX..., select the candidate package, then Developer: Reload Window. The language mode for .xsl/.xslt files should be XSLT. Attribute value templates and arbitrary aliases of the XSLT namespace prefix remain outside this focused correction.

Features

  • Syntax highlighting for XPath (.xpath), XSLT (.xsl, .xslt), and XQuery (.xq, .xqy, .xquery) files
  • Realtime diagnostics — compile errors for XPath expressions, XSLT stylesheets, and XQuery documents
  • Auto-completion — XPath functions, axes, keywords, XSLT instructions, and XQuery keywords
  • Hover — function signatures and descriptions for XPath/XQuery functions
  • Go to definition — jump to user-defined XSLT functions, variables, parameters, and named templates; XQuery functions and variables
  • Semantic highlighting — function names, variables, namespace prefixes, keywords, and type names in XPath, XQuery, and XSLT
  • Code actions — quick fixes for common diagnostics (e.g. declaring a default element namespace)
  • Code lens — inline evaluation results for XPath/XQuery expressions, plus one-click "Run XSLT transformation" and "Run initial template" actions
  • Document outline — top-level XSLT declarations (templates, functions, variables, keys, output, imports) and XQuery declarations (modules, imports, functions, variables)
  • Evaluate XPath — run the current .xpath file and show the result
  • Run XSLT Transformation — run the current stylesheet against a selected source XML document
  • Run XQuery — run the current .xq file and show the result

Prerequisites

Tool Version Notes
.NET SDK 10.0+ Required to build and run the language server
Node.js 18.x+ Required to build the extension
VS Code 1.80+

Installation

Option 1 — Install from the VS Code Marketplace (recommended for users)

Search for "Bosak XPath / XSLT" in the Extensions view (Ctrl+Shift+X), or install directly from marketplace.visualstudio.com/items?itemName=fytala.vscode-bosak. Published versions: 0.2.3 (2026-10-15) - engine 1.7.1 bundle alignment; 0.2.2 (2026-10-15) - engine 1.7.0 bundle alignment; 0.2.1 (2026-10-15) - engine 1.6.0 bundle alignment; 0.2.0 (2026-10-14) - engine 1.4.0, contextual XSLT diagnostics and executable/protocol packaging corrections; 0.1.6 (2026-10-14) - distinct XML attribute/value and embedded XPath highlighting; 0.1.5 (2026-10-07) — TextMate grammar JSON-escape fix; 0.1.4 (2026-10-05) — refreshed language-server bundle.

Option 2 — Development / Sideload (recommended for contributors)

  1. Build the language server

    cd /path/to/Bosak
    dotnet build src/Bosak.LanguageServer/Bosak.LanguageServer.csproj
    
  2. Install extension dependencies

    cd vscode-bosak
    npm install
    
  3. Compile the extension

    npm run compile
    
  4. Open in VS Code and press F5
    This opens a new Extension Development Host window with Bosak loaded.

Option 3 — Install from VSIX

  1. Build the extension package

    cd vscode-bosak
    npm install
    npm run compile
    npx vsce package
    
  2. Install the VSIX in VS Code

    • Open VS Code → Extensions view (Ctrl+Shift+X)
    • Click ⋯ (More Actions) → Install from VSIX…
    • Select vscode-bosak-0.1.5.vsix

Option 4 — Custom server path

If the extension cannot find the language server automatically, set the path manually:

// .vscode/settings.json
{
  "bosak.server.path": "D:/Development/Bosak/src/Bosak.LanguageServer/bin/Debug/net10.0/Bosak.LanguageServer.exe"
}

Usage

Opening files

Create or open files with the following extensions:

Language Extensions
XPath .xpath
XSLT .xsl, .xslt
XQuery .xq, .xqy, .xquery

The extension activates automatically when an XPath, XSLT, or XQuery file is opened.

Diagnostics

Errors appear in the Problems panel (Ctrl+Shift+M) as you type:

  • XPath files — parser errors when the expression is invalid
  • XSLT files — XML well-formedness errors, missing root element (xsl:stylesheet / xsl:transform), and invalid XPath in select, test, match, and use-when attributes
  • XQuery files — prolog and expression compile errors

Completions

Press Ctrl+Space to trigger suggestions:

  • In XPath files: standard fn:* functions, axes (child::, descendant::, …), and keywords (for, let, if, …)
  • In XSLT files: all of the above plus XSLT instructions (xsl:template, xsl:apply-templates, …)

Commands

Command Where What it does
Bosak: Evaluate XPath Expression Editor context menu (.xpath files) Evaluates the current file and opens the result in a preview editor
Bosak: Run XSLT Transformation Editor context menu (.xsl / .xslt files) Prompts for a source XML document, runs the stylesheet, and opens the result
Bosak: Run XQuery Editor context menu (.xq files) Runs the current XQuery document and opens the result
Bosak: Evaluate XQuery Expression Command Palette (XQuery files) Same as Run XQuery
Bosak: Run XSLT Initial Template Command Palette (XSLT files) Runs the stylesheet via its initial template (chosen on the server) and opens the result

Results are evaluated by the language server and shown in a preview editor; errors appear as VS Code notifications.


Configuration

Setting Type Default Description
bosak.server.path string \| null null Absolute path to the Bosak.LanguageServer executable or DLL. When null, the extension searches the workspace for a built server.
bosak.trace.server string "off" Traces LSP communication between VS Code and the server. Values: "off", "messages", "verbose".

Enable verbose logging

{
  "bosak.trace.server": "verbose"
}

Open Output panel (Ctrl+Shift+U) → select Bosak XPath / XSLT to view the LSP traffic.


Troubleshooting

"Bosak language server not found"

The extension could not locate Bosak.LanguageServer.exe (or .dll). Make sure:

  1. You have built the .NET solution:
    dotnet build Bosak.sln
    
  2. The server binary exists at:
    src/Bosak.LanguageServer/bin/Debug/net10.0/Bosak.LanguageServer.exe
    
  3. Or set bosak.server.path explicitly in VS Code settings.

No diagnostics showing

  1. Check that the file has the correct extension (.xpath, .xsl, .xslt, .xq, .xqy, .xquery).
  2. Open Output → Bosak XPath / XSLT and look for connection errors.
  3. Enable "bosak.trace.server": "verbose" to inspect LSP messages.

Server crashes on startup

Run the server standalone to see the error:

dotnet src/Bosak.LanguageServer/bin/Debug/net10.0/Bosak.LanguageServer.dll

If it exits immediately, check for missing dependencies (dotnet --info).


Development

Project layout

vscode-bosak/
├── package.json              # Extension manifest
├── tsconfig.json             # TypeScript config
├── src/
│   └── extension.ts          # Client entry point
├── syntaxes/
│   ├── xpath.tmLanguage.json # XPath TextMate grammar
│   └── xslt.tmLanguage.json  # XSLT TextMate grammar
└── language-configuration.json # Bracket/symbol config

The language server itself lives in ../src/Bosak.LanguageServer/ (C# / .NET 10).

Rebuild after server changes

dotnet build src/Bosak.LanguageServer/Bosak.LanguageServer.csproj

Then reload the VS Code Extension Development Host (Ctrl+R or Developer: Reload Window).


License

Dual Usage License — See the root LICENSE.md for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft