Start a new section on a given namespace. Called from startElement when we encounter an element whose namepsace does not match the current section namespace or if we get an element declared as a new section trigger in the NVDL script.

{
// creates a new section having the current section as parent section
Section section = new Section(uri, currentSection);
// get the programs of the current section
Vector childPrograms = currentSection.childPrograms;
// clear the current no result (validation) actionsnoResultActions.clear();
// iterates current section programsfor (int i = 0, len = childPrograms.size(); i < len; i++) {
Program program = (Program)childPrograms.elementAt(i);
// get the mode usage for the program// and determine the use mode from the mode usage based on the current section context// and then get the element actions from that determined mode// that apply to the new namespace
ActionSet actions = program.modeUsage.getMode(currentSection.context).getElementActions(uri);
// check if we have a result action attach/unwrap// and perform it on the program handler and the new section
ResultAction resultAction = actions.getResultAction();
if (resultAction != null)
resultAction.perform(program.handler, section);
// get the no result (validate, allow, reject) actions
NoResultAction[] nra = actions.getNoResultActions();
for (int j = 0; j < nra.length; j++) {
NoResultAction tem = nra[j];
// if we did not encountered this action already then perform it on the// section and add it to the noResultActions listif (!noResultActions.contains(tem)) {
nra[j].perform(section);
noResultActions.add(tem);
}
}
}
// iterate the validators on the new section and set their content// handler to receive notifications and set the locator,// call start document, and bind the current namespace context. for (int i = 0, len = section.validators.size(); i < len; i++)
initHandler(((Validator)section.validators.elementAt(i)).getContentHandler());
// store the new section as the current sectioncurrentSection = section;
}