[Schematron] how to use "sub abstract types" in abstract rules ?
Joe Robe
joer00 at gmail.com
Fri Nov 7 11:11:23 EST 2008
Hello,
there seems to be no way to have nested rules. However abstract rules
make little sense to me without the ability to use other abstract
rules inside it. Is there any way to achieve this ? In below example
the SomeElement must have a SomeSubElement according to rule2. This
implies that anything which passes rule1 must pass rule2 ! But this
rule is never tested unless I explicitly create a rule for it.
Example:
<rule abstract="true" id="rule1">
<assert test="SomeElement">missing SomeElement</assert>
</rule>
<rule abstract="true" id="rule2">
<assert test="SomeSubElement">missing SomeSubElement</assert>
</rule>
<SomeElement>
<SomeSubElement>BlaBla</SomeSubElement>
</SomeElement>
What I want is:
<rule abstract="true" id="rule1">
<assert test="SomeElement">missing SomeElement</assert>
<extends id="rule2" context="SomeElement"/>
</rule>
More information about the Schematron
mailing list