public void addValidator ( Schema schema , ModeUsage modeUsage ) { // adds the schema to this section schemas schemas . addElement ( schema ) ; // creates the validator Validator validator = createValidator ( schema ) ; // adds the validator to this section validators validators . addElement ( validator ) ; // add the validator handler to the list of active handlers activeHandlers . addElement ( validator . getContentHandler ( ) ) ; // add the mode usage to the active handlers attribute mode usage list activeHandlersAttributeModeUsage . addElement ( modeUsage ) ; // compute the attribute processing attributeProcessing = Math . max ( attributeProcessing , modeUsage . getAttributeProcessing ( ) ) ; // add a child mode with this mode usage and the validator content handler childPrograms . addElement ( new Program ( modeUsage , validator . getContentHandler ( ) ) ) ; if ( modeUsage . isContextDependent ( ) ) contextDependent = true ; }
Adds a validator .