Here I’ll end up with an syntax error message (“csl/csl-temp.rnc:1:1: error: syntax error”).
Next try: Convert in one step:
trang csl.rnc csl.xsd
Here, I’ll end up with “csl.rnc:619:8: warning: choice between attributes and children cannot be represented; approximating”
If I use this to validate a style in VS Code it says “Cannot find the declaration of element ‘style’”
RNG is a richer language than XSD, and relies on at least one of those features (interleave); that’s why you get that error.
So it’s possible an editor validating against an XSD conversion would flag some/many styles as invalid, or that it could create “valid” files that are not valid against the RNG schema.
I prefer VScode to Atom, but I cannot use RNG with the available XML helper packages. XSD would be an option though. But not if this could produce false negatives/positives…
To be clear, I’m just speculating. Interleave allows you to specify an unordered list of requirements. Normally, to convert that to a language that does not support unordered statements (like XSD), you’d need a looser definition.
So logically, what I suggest is possible. Not sure how big a practical problem it is though.
That does/did work, but Atom is no longer maintained. Among other things, github integration is broken, which makes it much less fun to work with.
There is now theoretically RNG validation support in VS-Code, but Dennis and I haven’t been able to get that to work when we last tried.
I tried to figure it out, but ran into a brick wall of a massively annoying config process. Like, not only does it not work ATM, but I can’t figure out why; there’s no indication I can see of whether it’s trying to use a schema, and why it may not actually be (bad path? something else?).