fsteimke wrote:However, i was unable to assign the schematron schema to the Relax NG Document. The Menu Item for "Assign Schema" is grayed out.
This action was disabled deliberately because there are some situations when it could be used erroneously. For instance, I think there is no reason to associate a DTD schema or another RNG schema with the current edited RNG document.
However, if you want to validate your RNG document as a regular XML document then you could open it as an XML document(from the Project view you have to use the contextual action "Open with" -> "Internal editor". This action will display a dialog in which you should select the "XML document" entry). The RNG document will be opened with the XML editor that allows you to associate and validate the edited document with an external schema.
fsteimke wrote:To conclude: my question is, is there a way to check semantic constraints on RELAX NG grammars with self-defined Schematron rules?
In my opinion, the best solution is to create a validation scenario for the RNG document. This allows you to edit it as a normal RNG document and also to check it against a Schematron schema.
Next, I will give you two ways to define a validation scenario and you have to choose one depending on your needs.
1. The first and fastest solution is to create and associate a validation scenario for the edited RNG document. This assumes that the RNG document is already opened in the application.
* To create a new validatin scenario click the 'Configure the validation Scenario(s)' action from the toolbar. This action will display an dialog that allows you to manage the validation scenarios.
* Create a new one by clicking the New button. In the new displayed dialog you will define your validation scenario by specifying two validation units:
** the first validation unit will validate your document as a normal RNG document;
** the second validation unit will validate your document as an XML document against your Schematron schema.
* After you have defined the validation units press OK to confirm the new created scenario.
* To use it, you should associate it with the edited document (the checkbox from the right side of the scenario name should be checked).
Press 'Apply associated' and your document will be validated twice: first as an RNG document and second with the specified Schematron schema.
More about validation scenarios could be found here:http://www.oxygenxml.com/doc/ug-editor/ ... nario.html
2. If you want to impose these rules to any RNG document (elements from any RNG document should been documented), you could define a default validation scenario for the 'Relax NG' document type. In this case, when you validate a RNG document it will be validated also against the rules defined in the Schematron schema.
To edit the Relax NG document type in order to add a new default validation scenario you have to follow this procedure:
* Open the Preferences dialog by using the menu action: Options/Preferences
* Find the 'Document Type Association' options page, the easiest way is to write 'Document Type Association' in the quick filter;
3. Find and edit the 'Relax NG' document type
4. In the 'Document Type' dialog select the Validation tab
5. Define a new validation scenario similar with the one created above;
6. To make it the default validation scenario you have to select it in 'Validation' tab
Please see more details here:http://www.oxygenxml.com/doc/ug-editor/ ... arios.html
Do not hesitate to contact us if you have additional questions.