Hi,
The start mode determines the set if rules that are applied on the root section, on the section that starts with the document root element. Further sections will be processed with the useMode of the actions that apply on the root section - if no useMode is specified then the same mode (set of rules) will be used further.
Triggers do not have an active role in dispatching. They are only used to obtain the element sections from the initial document. Basically the NVDL processing has 3 stages:
- obtaining element and attribute sections from the input document and the set of triggers
- deterniming what actions are applied on each section (interpretations) and getting the validation candidates (document fragments) by attaching and unwrapping sections
- perform the validate actions on the validation candidates
The first 2 processing stages are inplemented also in the oNVDL XSLT 2.0 implementation of NVDL. You may give that a try, you will be able to see the XSLT 2.0 equivalent of an NVDL script that performs the second step from the above description. The 1st step is performed by a stylesheet that converts the input document into an augumented XML document adding the section information.
In your example the root section will be processed with the rules that represent mode a. The child section of the root section will be processed with the modes that compose mode c, that is with:
<namespace ns="
http://b">
<validate schema="c.rnc" useMode="b"/>
</namespace>
In both XML input example the second section will be processed with the above rule and the second section is
in the case of test1 <b:group> </b:group>
in the case of test2 <b:section> </b:section>
In both cases teh namespace rule is matched so the section will be validated against the c.rnc schema that does not accept the group element.
Best Regards,
George