Ignore:
Timestamp:
Jan 5, 2014, 7:04:30 AM (5 years ago)
Author:
cameron
Message:

Namespace bug fix for icXML-0.95

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icXML/icXML-0.95/src/icxmlc/XMLParserImpl.c

    r3563 r3602  
    267267XMLParserImpl<XMLScannerType>::
    268268scanElementPage()
    269 {     
     269{
     270    assert (fDocumentDesseminator);
     271
    270272    START_PAPI_COUNTER(fPapiCounter, PAPI_MEASURE_DD);
    271273
     
    273275    DEBUG_MESSAGE("PRINT ELEMENT PAGE:");
    274276    DEBUG_MESSAGE("######################################################################");
    275     if (fDocumentDesseminator)
    276     {
    277         fDocumentDesseminator->scanPage();
    278     }
     277
     278    try
     279    {
     280        if (fDocumentDesseminator)
     281        {
     282            fDocumentDesseminator->scanPage();
     283        }
     284    }
     285    catch (const std::exception & ex)
     286    {
     287        std::cerr << "Error scanning element page! " << ex.what() << std::endl;
     288        exit(-1);
     289    }
     290
     291    DEBUG_MESSAGE(" -- done scanning element page.")
    279292
    280293    STOP_PAPI_COUNTER(fPapiCounter, PAPI_MEASURE_DD);
     
    391404        }
    392405
    393         if (unlikely(fNamespaceResolver.getMaxScope() <= fMaxScope))
    394         {
    395             fNamespaceResolver.setMaxScope(fMaxScope);
    396             fChildren.resizeToFit(fScope, fNamespaceResolver.getMaxScope());
    397             fContentFlag.resizeToFit(fScope, fMaxScope);
    398             DEBUG_MESSAGE(" -- resizing scopes to fit " << fMaxScope << " -> " << fNamespaceResolver.getMaxScope() << ',' << fChildren.capacity() << ',' << fGidStack.capacity() << ',' << fContentFlag.capacity())
    399         }
     406        fNamespaceResolver.setMaxScope(fMaxScope + 1);
     407        fChildren.resizeToFit(fScope, fNamespaceResolver.getMaxScope());
     408        fContentFlag.resizeToFit(fScope, fNamespaceResolver.getMaxScope());
    400409
    401410        if (unlikely(fUriStream.capacity() <= fUriCount))
Note: See TracChangeset for help on using the changeset viewer.