Changeset 11319

Show
Ignore:
Timestamp:
04/20/07 19:02:43 (2 years ago)
Author:
mloskot
Message:

Improved fix for #755. The markup decl in DOCTYPE is not skipped but properly consumed to tokens now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/port

    • Property svn:ignore changed from
      cpl_config.h
      *.bak
      *.lib
      *.lo
      *.obj
      to
      cpl_config.h
      xmlreformat
      *.bak
      *.lib
      *.lo
      *.obj
  • trunk/gdal/port/cpl_minixml.cpp

    r11276 r11319  
    203203            } 
    204204             
    205             /* Skip the internal DTD subset as NOT SUPPORTED YET (Ticket #755). 
    206              * The markup declaration block within a DOCTYPE tag consists of: 
     205            /* The markup declaration block within a DOCTYPE tag consists of: 
    207206             * - a left square bracket [ 
    208207             * - a list of declarations 
     
    210209             * Example: 
    211210             * <!DOCTYPE RootElement [ ...declarations... ]> 
    212              * 
    213              * We need to skip all 3 parts, until closing >  
    214211             */ 
    215212            if( chNext == '[' ) 
    216213            { 
     214                AddToToken( psContext, chNext ); 
     215 
    217216                do 
    218217                { 
    219218                    chNext = ReadChar( psContext ); 
     219                    AddToToken( psContext, chNext ); 
    220220                } 
    221221                while( chNext != ']' 
    222222                    && !EQUALN(psContext->pszInput+psContext->nInputOffset,"]>", 2) ); 
    223223 
    224                 // Skip "]" character to point to the closing ">" 
    225224                chNext = ReadChar( psContext ); 
     225                AddToToken( psContext, chNext ); 
     226 
     227                // Skip ">" character, will be consumed below 
    226228                chNext = ReadChar( psContext ); 
    227229            }