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

void com::thaiopensource::validate::nvdl::SchemaImpl::Handler::startElement ( String  uri,
String  localName,
String  qName,
Attributes  attributes 
) throws SAXException [inline]

Start element callback.

Parameters:
uri The namespace uri for this element.
localName The element local name.
qName The element qualified name.
attributes The attributes of this element.

Definition at line 390 of file SchemaImpl.java.

References ceh, error(), foreignDepth, com::thaiopensource::validate::nvdl::SchemaImpl::NVDL_URI, nvdlStack, parseAllow(), parseAnyNamespace(), parseAttach(), parseAttachPlaceholder(), parseCancelNestedActions(), parseContext(), parseIncludedMode(), parseMode(), parseNamespace(), parseNestedMode(), parseOption(), parseReject(), parseRules(), parseTrigger(), parseUnwrap(), parseValidate(), and xmlBaseHandler.

                                {
      // call delegate handler
      super.startElement(uri, localName, qName, attributes);
      // handle xml:base
      xmlBaseHandler.startElement();
      String xmlBase = attributes.getValue(WellKnownNamespaces.XML, "base");
      if (xmlBase != null)
        xmlBaseHandler.xmlBaseAttribute(xmlBase);
      // ignore foreign elements
      if (!NVDL_URI.equals(uri) || foreignDepth > 0) {
        foreignDepth++;
        return;
      }
      // stop if we got errors.
      if (ceh.getHadErrorOrFatalError())
        return;
      // dispatch based on the element name
      if (localName.equals("rules"))
        parseRules(attributes);
      else if (localName.equals("mode")) {
            String parent = (String)nvdlStack.peek();
        if ("rules".equals(parent))
          parseMode(attributes);
        else if ("mode".equals(parent))
          // mode inside mode - included mode.
          parseIncludedMode(attributes);
        else
          // nested mode
          parseNestedMode(attributes);
      }
      else if (localName.equals("namespace"))
        parseNamespace(attributes);
      else if (localName.equals("anyNamespace"))
        parseAnyNamespace(attributes);
      else if (localName.equals("validate"))
        parseValidate(attributes);
      else if (localName.equals("reject"))
        parseReject(attributes);
      else if (localName.equals("attach"))
        parseAttach(attributes);
      else if (localName.equals("unwrap"))
        parseUnwrap(attributes);
      else if (localName.equals("attachPlaceholder"))
        parseAttachPlaceholder(attributes);
      else if (localName.equals("allow"))
        parseAllow(attributes);
      else if (localName.equals("context"))
        parseContext(attributes);
      else if (localName.equals("option"))
        parseOption(attributes);
      else if (localName.equals("trigger"))
        parseTrigger(attributes);
      else if (localName.equals("schema"))
        error("embedded_schemas");
      else if (localName.equals("cancelNestedActions"))
        parseCancelNestedActions(attributes);
      else if (localName.equals("message"))
      ;  // noop
      else
        throw new RuntimeException("unexpected element \"" + localName + "\"");
      // add the NVDL element on the stack
      nvdlStack.push(localName);
      
    }


Generated by  Doxygen 1.6.0   Back to index