Skip to content

POC for a Schematron extension to the LemMinX XML Language Server

License

Notifications You must be signed in to change notification settings

datho7561/lemminx-schematron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

This is a proof of concept for a Schematron extension to the LemMinX XML language server.

It uses schxslt and Saxon-HE in order to validate an XML document against a schema.

Usage

  1. In VS Code, install Red Hat's XML extension
  2. Run mvn clean package, which generates a shaded uber jar in ./target/lemminx-schematron-0.1.0-SNAPSHOT.jar
  3. Add the following to your package.json:
"xml.extension.jars": [
  "/path/to/lemminx-schematron/lemminx-schematron-0.1.0-SNAPSHOT.jar",
],
  1. Add the following snippet to your XML, with href pointing to your Schematron schema:
<?xml-model href="./my-schematron.sch"?>
  1. The XML document should be validated. If the schema file is invalid, a diagnostic will appear at the top of the document indicating this.

Limitations

  • You can only validate with local .sch files
  • Not tested thoroughly
  • The .jar is prohibitively large to include as a part of the standard LemMinX distribution

About

POC for a Schematron extension to the LemMinX XML Language Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages