Esempio n. 1
0
void IXMLHandler::impl::startElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh* const qname, const xerces::Attributes &attrs)
{
    HandlerBase::startElement(uri, localname, qname, attrs);

    StringCollection<String> attributes;
    XMLSize_t count = attrs.getLength();
    for(XMLSize_t i = 0; i < count; i++)
    {
        attributes.set(attrs.getLocalName(i), attrs.getValue(i));
    }

    m_handler->onStartElement(localname, attributes);
}
Esempio n. 2
0
  void IsisXMLParameter::startElement(const XMLCh* const uri,
                                      const XMLCh* const localname,
                                      const XMLCh* const qname,
                                      const XERCES::Attributes& attributes) {

    if ((string)XERCES::XMLString::transcode(localname) == (string)"type") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces,
                                           parser, &parameter->type);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"brief")  {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces,
                                           parser, &parameter->brief);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"description") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces,
                                           parser, &parameter->description);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"default") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->defaultValues);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"internalDefault") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser,
                                           &parameter->internalDefault);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"count") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser,
                                           &parameter->count);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"list") {
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"option") {
      if (listHandler != NULL) {
        delete listHandler;
        listHandler = NULL;
      }
      unsigned int index = parameter->listOptions.size();
      parameter->listOptions.resize (index + 1);
      Isis::iString lo = XERCES::XMLString::transcode (attributes.getValue((unsigned int)0));
      lo.UpCase();
      parameter->listOptions[index].value = lo;
      listHandler = new IsisXMLList (encodingName, expandNamespaces, parser,
                                     &parameter->listOptions[index]);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"minimum") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      Isis::iString mi = XERCES::XMLString::transcode (attributes.getValue((unsigned int)0));
      mi.DownCase();
      parameter->minimum_inclusive = mi;
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces,
                                             parser, &parameter->minimum);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"maximum") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      Isis::iString mi = XERCES::XMLString::transcode (attributes.getValue((unsigned int)0));
      mi.DownCase();
      parameter->maximum_inclusive = mi;
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser,
                                           &parameter->maximum);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"greaterThan") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                           parser, &parameter->greaterThan);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"greaterThanOrEqual") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->greaterThanOrEqual);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"lessThan") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->lessThan);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"lessThanOrEqual") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->lessThanOrEqual);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"notEqual") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->notEqual);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"odd") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      parameter->odd = "TRUE";
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser);

    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"exclusions") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->exclude);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"inclusions") {
      if (multipleValuesHandler != NULL) {
        delete multipleValuesHandler;
        multipleValuesHandler = NULL;
      }
      multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces,
                                                         parser, &parameter->include);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"filter") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, &parameter->filter);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"defaultPath") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser,
                                           &parameter->path);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"fileMode") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, &parameter->fileMode);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"pixelType") {
      if (generalHandler != NULL) {
        delete generalHandler;
        generalHandler = NULL;
      }
      generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, &parameter->pixelType);
    }
    else if ((string)XERCES::XMLString::transcode(localname) == (string)"helpers") {
      if (helpersHandler != NULL) {
        delete helpersHandler;
        helpersHandler = NULL;
      }
      helpersHandler = new IsisXMLHelpers (encodingName, expandNamespaces, parser, 
                                       &parameter->helpers);
    } 
    else {
      if (ignoreHandler != NULL) {
        delete ignoreHandler;
        ignoreHandler = NULL;
      }
      ignoreHandler = new IsisXMLIgnore (encodingName, expandNamespaces, parser,
                                         (string)XERCES::XMLString::transcode(localname));
    }
  }