tng         2002/08/19 07:39:57

  Modified:    c/src/xercesc/parsers AbstractDOMParser.cpp
  Log:
  [Bug 1471] getInternalSubset returns NDATA with "" .
  Also fix internalsubset to include notation.
  
  Revision  Changes    Path
  1.21      +34 -4     xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp
  
  Index: AbstractDOMParser.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AbstractDOMParser.cpp     14 Aug 2002 15:20:38 -0000      1.20
  +++ AbstractDOMParser.cpp     19 Aug 2002 14:39:57 -0000      1.21
  @@ -126,7 +126,7 @@
       fScanner->setDocTypeHandler(this);
   
       fNodeStack = new ValueStackOf<DOMNode*>(64);
  -    this->reset();   
  +    this->reset();
   }
   
   
  @@ -1203,9 +1203,7 @@
               fInternalSubset.append(chSpace);
               fInternalSubset.append(XMLUni::fgNDATAString);
               fInternalSubset.append(chSpace);
  -            fInternalSubset.append(chDoubleQuote);
               fInternalSubset.append(id);
  -            fInternalSubset.append(chDoubleQuote);
           }
           id = entityDecl.getValue();
           if (id !=0) {
  @@ -1238,6 +1236,38 @@
       DOMNode* rem = fDocumentType->getNotations()->setNamedItem( notation );
       if (rem)
           rem->release();
  +
  +    if (fDocumentType->isIntSubsetReading())
  +    {
  +        //add thes chars to internalSubset variable
  +        fInternalSubset.append(chOpenAngle);
  +        fInternalSubset.append(chBang);
  +        fInternalSubset.append(XMLUni::fgNotationString);
  +        fInternalSubset.append(chSpace);
  +
  +        fInternalSubset.append(notDecl.getName());
  +
  +        const XMLCh* id = notation->getPublicId();
  +        if (id != 0) {
  +            fInternalSubset.append(chSpace);
  +            fInternalSubset.append(XMLUni::fgPubIDString);
  +            fInternalSubset.append(chSpace);
  +            fInternalSubset.append(chDoubleQuote);
  +            fInternalSubset.append(id);
  +            fInternalSubset.append(chDoubleQuote);
  +        }
  +        id = notation->getSystemId();
  +        if (id != 0) {
  +            fInternalSubset.append(chSpace);
  +            fInternalSubset.append(XMLUni::fgSysIDString);
  +            fInternalSubset.append(chSpace);
  +            fInternalSubset.append(chDoubleQuote);
  +            fInternalSubset.append(id);
  +            fInternalSubset.append(chDoubleQuote);
  +
  +        }
  +        fInternalSubset.append(chCloseAngle);
  +    }
   }
   
   void AbstractDOMParser::startAttList
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to