substance / texture

A visual editor for research.
MIT License
1k stars 86 forks source link

Integrating Schematron rules for references #550

Open JGilbert-eLife opened 6 years ago

JGilbert-eLife commented 6 years ago

eLife is implementing a set of Schematron rules to validate the content of references. We would like to integrate these into the Texture reference tool to ensure that the reference list and in-text citations match our style requirements.

https://github.com/elifesciences/reference-schematron

We have set up an API service to run XML files against the Schematron at two stages in the production process - just after the article is typeset and just before publication - using slightly different sets of rules (the first will generate queries to the authors to request missing details).

michael commented 6 years ago

This is an important functionality but think we should wait until we have the user interface + data model in place generally.

The approach we want to take is to display an issue pane, where all problematic places are shown. And by clicking on them you get taken to the corresponding form field. We can have a relatively simple rule set evaluated in Javascript to accomplish that. We need to investigate how hard it is to compile schematron rules and evaluate them in Javascript. Ideally we can use a light-weight toolchain (ideally all Javascript) so we don't need to connect to a service to perform rule checking.

michael commented 5 years ago

I think we should not integrate schematron into the editor at this point. You can run the checks after editing in a separate process. Let's see how far we get with live-validation inside Texture and then consider plugging in more complex schematron rules or translating them to rules we can evaluate in the browser.