You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a general issue for tracking progress on creating support for Relax-NG (and possibly in the future, XML Schema).
The original proposal can be found here
Progress so far
The Relax-NG parser:
I've created a rudimentary parser in a separate project:
Written in Typescript, but the build step outputs a standalone javascript file that can be included in a webpage.
A standalone library that simply converts a Relax-NG document as string into a Xema object for use with Lexonomy.
No longer use a Xema, but directly generate a DocSpec This is needed to support most of the features below, but Xonomy itself needs some work for this to be possible/easy
Supports nested choice trees (e.g. element A must contain B&C, or contain D) These are flattened into A must contain B&C&D for now
Use validation warnings from the schema in Xonomy Warnings are stripped at the moment, and the only warnings you will see in Xonomy are those the Xematron generates based on the Xema
Regex pattern validation for attribute values Relax-NG supports this, but the Xema does not, so it's not in yet
Lexonomy itself
Changes here are very specific to my local development setup, just some hard edits to make it run and hook in the parser code.
But I've included it here for completeness. https://github.com/INL/lexonomy/tree/relax-ng-support
Made some minor fixes to make it run on Windows
Edits to the xematron to enable separating element name from docspec element definition
The Xonomy library:
I've worked some on getting a better editor experience when developing Xonomy. I hope to create a small NPM package that I can use as dependency in the Relax-NG parser. I noticed several Github issues also discussing changes not unlike these, so it seemed like a worthwhile approach to tackle this in the context of this project.
A typescript version with only minimal changes, basically adding argument and return type annotations to all functions.
Adding support for separating the name of an element from its rules in the DocSpec This is a big one for supporting schemas. To preserve backward compatibility, this is an opt-in feature of the docspec
Some tests to validate everything still works as expected It would be nice to have access to some examples of customizations users have made to the editor
Publish to NPM (this probably needs a little involvement from you guys/Michal)
Add any required features in new major/minor versions, ideally with backward compat. With how pluggable Xonomy is, it doesn't seem like this will be required much.
How to integrate with the existing codebase?
Right now Lexonomy is very old-school in its way of development on the javascript side of things: No build step and no dependency manager. This makes it hard to integrate code that's written using a more modern approach, or code written in typescript, it also makes it hard to work with modern language features (browser support..), getting better autocomplete in editors, etc.
I would be in favor of at least setting up some dependency management and a small build step, so we can go on to develop with some more modern amenities.
For now I've not done any of this, and the parser integrates laterally - just run the build step in that project, and copy over the output into lexonomy.
The text was updated successfully, but these errors were encountered:
This is a general issue for tracking progress on creating support for Relax-NG (and possibly in the future, XML Schema).
The original proposal can be found here
Progress so far
The Relax-NG parser:
I've created a rudimentary parser in a separate project:
Written in Typescript, but the build step outputs a standalone javascript file that can be included in a webpage.
This is needed to support most of the features below, but Xonomy itself needs some work for this to be possible/easy
These are flattened into A must contain B&C&D for now
Warnings are stripped at the moment, and the only warnings you will see in Xonomy are those the Xematron generates based on the Xema
Relax-NG supports this, but the Xema does not, so it's not in yet
Lexonomy itself
Changes here are very specific to my local development setup, just some hard edits to make it run and hook in the parser code.
But I've included it here for completeness.
https://github.com/INL/lexonomy/tree/relax-ng-support
xematron
to enable separating element name from docspec element definitionThe Xonomy library:
I've worked some on getting a better editor experience when developing Xonomy. I hope to create a small NPM package that I can use as dependency in the Relax-NG parser. I noticed several Github issues also discussing changes not unlike these, so it seemed like a worthwhile approach to tackle this in the context of this project.
see here
This is a big one for supporting schemas. To preserve backward compatibility, this is an opt-in feature of the docspec
It would be nice to have access to some examples of customizations users have made to the editor
How to integrate with the existing codebase?
Right now Lexonomy is very old-school in its way of development on the javascript side of things: No build step and no dependency manager. This makes it hard to integrate code that's written using a more modern approach, or code written in typescript, it also makes it hard to work with modern language features (browser support..), getting better autocomplete in editors, etc.
I would be in favor of at least setting up some dependency management and a small build step, so we can go on to develop with some more modern amenities.
For now I've not done any of this, and the parser integrates laterally - just run the build step in that project, and copy over the output into lexonomy.
The text was updated successfully, but these errors were encountered: