According to the help file, "As RELAX NG does not define an association mechanism, you can ... select a grammar using a file dialog." However, it's a bit of a hassle to have to do this every time. In the absence of a standard mechanism, have you considered using a custom Processing Instruction to associate the RNG file with the document? e.g.
<?xmlcopyeditor_rng_grammar file:///path/to/my_custom_grammar.rng?>
If present, the validate (F6) option should use that grammar instead of asking the user to select the same file again and again; if not, the PI could be automatically added after the RNG file has been selected the first time (or have a checkbox option on the select dialog to have it add the PI if you don't want to make this mandatory). Any other application will not recognise the PI so should ignore it.
XMLSpy uses a similar method to associate a sample XML document with XSLT files you are editing, so you can test changes to the transformation with a single keypress.
Logged In: YES
user_id=1298822
Originator: NO
Yes, you're right. I will try to add an 'Associate RELAX NG grammar' function as you describe it.
Thanks!
Gerald
Logged In: YES
user_id=1298822
Originator: NO
PS Before I forget, you can also achieve single-keypress RNG validation by dropping your grammar into the rng folder. Up to 9 RELAX NG grammars are automatically made accessible in this way.
Logged In: YES
user_id=247081
Originator: YES
You mean the Ctrl-1 to Ctrl-9 shortcuts? There were already more than 9 RNG files in that directory after the initial installation - what determines which ones are assigned to the shortcuts? I don't see anything for it in the Options.
Logged In: YES
user_id=1298822
Originator: NO
Apologies, I hadn't realised there were so many already (I started with just a few). My suggestion would be to move all rng files you're not going to need elsewhere (could delete them too).
I could also permit more than 9 entries and use Shift+Ctrl+[0-9].
That reminds me I've also been meaning to lift the need for an rng extension so rncs can be activated in this way too.
Will need to wait until after the holiday though :(
Best,
Gerald
+1 for this feature.
However, see related feature request 163.
I would rather see a more standardized PI, like <?xml-model?>, than an editor-specific one like <?xmlcopyeditor_rng_grammar?>.
Thanks for your work on this useful software.