- How to define your own XML schema?
- How to configure the XML processor?
- How to add custom actions and tabs to Smart Document Pane?
- How to configure callback handler?
- How to configure Schematron content validation rules?
- How to configure track-changes content validation rules?
- How to configure content validation rules?
How to configure Schematron content validation rules?
The Schematron Content Validation Rules Sample provides a Schematron Rules Engine (http://www.schematron.com) based content assertion and validation. The system integrator can configure a rules XML that asserts document rules. The nodes that fail the document validation are flagged as failing the rule. The user can also configure the highlight color to be used for the erroneous nodes.
As a sample demonstration, the sample also provides an example Schematron rules file ‘rules.xml‘ which asserts that an author should be associated with the document.
Configuration
To configure the Content Validation Rules Sample, follow the steps mentioned below:
- Copy the following files to the Quark XML Author installation folder, e.g. “C:\Program Files (x86)\Quark\Quark XML Author”
- Quark.CMSAdapters.Samples.XA.ContentValidation.Schematron.dll
- Quark.CMSAdapters.Samples.XA.ContentValidation.Schematron.pdb
- rules.xml
- Download, extract and copy the following assemblies from http://sourceforge.net/projects/dotnetopensrc (NMatrix.Schematron.0.6.zip), these provide a .Net based implementation of the Schematron specification:
- GotDotNet.Exslt.dll
- NMatrix.Schematron.dll
<Method id="SchematronValidationRule" assembly="Quark.CMSAdapters.Samples.XA.ContentValidation.Schematron" class="Quark.CMSAdapters.Samples.XA.ContentValidation.Schematron.ExtensibilityMethods" method="SchematronValidationRule">
<Argument type="XomRoot"/>
<Argument type="Tokens">
<Token>ruleFilePath=rules.xml</Token>
<Token>highlightcolor=Orange</Token>
</Argument>
</Method>
<Method id="SchematronValidationRuleInfo" assembly="Quark.CMSAdapters.Samples.XA.ContentValidation.Schematron" class="Quark.CMSAdapters.Samples.XA.ContentValidation.Schematron.ExtensibilityMethods" method="SchematronValidationRuleInfo" >
</Method>
<ContentValidationRules>
<RuleSet componentRoot="topic" productLine="busdoc">
<Rule id="SaveRules" trigger="SAVE" condition="" policy="PROHIBIT" externalMethodIds="SchematronValidationRule"/>
</RuleSet>
</ContentValidationRules>