Logo Search packages:      
Sourcecode: jing-trang version File versions  Download package

void com::thaiopensource::validate::nvdl::SchemaImpl::Handler::parseMode ( Attributes  attributes  )  throws SAXException [inline, private]

Parse a mode element.

Parameters:
attributes The element attributes.
Exceptions:
SAXException 

Definition at line 538 of file SchemaImpl.java.

References com::thaiopensource::validate::nvdl::SchemaImpl::Handler::ModeData::currentMode, error(), com::thaiopensource::validate::nvdl::SchemaImpl::getModeAttribute(), locator, and md.

Referenced by startElement().

                                                                      {
      // Get the mode (create it if it does not exists) corresponding to the name attribute.
      md.currentMode = getModeAttribute(attributes, "name");
      // If already defined, report errors.
      if (md.currentMode.isDefined()) {
        error("duplicate_mode", md.currentMode.getName());
        error("first_mode", md.currentMode.getName(), md.currentMode.getWhereDefined());
      }
      else {
        // Check if we have a base mode and set that as the base mode for this mode.
        Mode base = getModeAttribute(attributes, "extends");
        if (base != null)
          md.currentMode.setBaseMode(base);
        // record the location where this mode is defined.
        md.currentMode.noteDefined(locator);
      }
    }


Generated by  Doxygen 1.6.0   Back to index