On 05/26/2014 12:37 PM, Martin Goik wrote:
Reading
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/schematron.html it
appears to me schematron rules can only be set on global XXE
configuration level.
My problem: We do have different business rules on top of Docbook 5.
Individual documents sharing identical RNG thus have to be in
compliance with different schematron rule sets.
Is it possible to define references to existing schematron rule sets
on instance level e.g. in a PI or similar?
The only way to implement this is to nevertheless put all your
patterns/rules in the same schematron file (e.g. "my.sch").
You'll group your patterns/rules in different *phases*. Let's suppose
you'll define 'phase1', 'phase2', 'phase3', each phase corresponding to
a different Docbook 5 document.
Add this declaration to your Docbook 5 configuration customization file:
<schematron location="my.sch"
phase="if(/descendant::processing-instruction('schematron-phase1'),
'phase1',
/descendant::processing-instruction('schematron-phase2'),
'phase2',
/descendant::processing-instruction('schematron-phase3'),
'phase3')"
evaluatePhase="true" />
Add any of the following processing-instructions to your documents (or
may be you'll find a better way to detect to determine which phase
applies to a document by examining the contents of this document):
<?schematron-phase1?>
<?schematron-phase2?>
<?schematron-phase3?>
Reference:
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/schematron.html
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support