Install
Usage
|
3:5: warning: duplicate id `x`; first used on line 2 [duplicate-id]
7:3: hint: `filler` is empty and has no attributes [empty-element]
Diagnostics
| Code | Severity | What it means |
|---|---|---|
not-well-formed |
Error | The document could not be parsed |
duplicate-id |
Warning | Two elements share an id |
empty-element |
Hint | An element with no children and no attributes |
Duplicate ids are legal XML but almost always a mistake — they break every tool that resolves references by id.
Design
The analysis lives in the library, not the binary, so it can be tested without a language-server transport in the way. An editor integration is mostly plumbing; the part worth testing is what it decides to say.
A parse error suppresses everything else. Once the tree cannot be built there is nothing further to say, and guessing at structure past a parse failure produces cascades of diagnostics that all describe the same underlying mistake.
Status
The analysis and a command-line front end work. The LSP JSON-RPC transport is not implemented yet — that should follow a decision about which editor to target first, and the useful part is already here and testable.
The oxml suite
Every member ships the same version number, so there is never a
compatibility table to consult. Versions advance in 0.0.1 steps along
the 0.0.x line; 0.1.0 follows 0.0.999.
| Crate | What it is |
|---|---|
oxml |
Core — parser, tree, XPath 1.0 |
oxml-cli |
Command-line querying and validation |
oxml-lsp |
Diagnostics for editors |
oxml-mcp |
Model Context Protocol server |
oxml-wasm |
WebAssembly bindings |
xmlschema |
XSD validation |
Contributing
See CONTRIBUTING.md. By participating you agree to the Code of Conduct.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.